.ctl32_OldProc = GetWindowLong(This.ctl32_controlHwnd, GWL_WNDPROC) Bindevent(This.ctl32_controlHwnd, WM_PAINT, This, [ctl32_WM_Paint], 1)MartinJ
> .ctl32_dwExStyle = 0 > .ctl32_lpClassName = [msctls_progress32] > .ctl32_lpWindowName = .ctl32_lpClassName + SYS(2015) > .ctl32_dwStyle = Bitor(WS_CHILD, WS_CLIPSIBLINGS) > .ctl32_hWndParent = .ctl32_HostHwnd > .ctl32_Left = .Left > .ctl32_Top = .Top > .ctl32_Width = .Width > .ctl32_Height = .Height > .ctl32_hMenu = 0 > .ctl32_hInstance = GetWindowLong(.ctl32_HostHwnd, GWL_HINSTANCE) > .ctl32_lpParam = 0 > > .ctl32_ControlHwnd = CreateWindowEx( ; > .ctl32_dwExStyle, ; > .ctl32_lpClassName, ; > .ctl32_lpWindowName, ; > .ctl32_dwStyle, ; > .ctl32_Left, ; > .ctl32_Top, ; > .ctl32_Width, ; > .ctl32_Height, ; > .ctl32_hWndParent, ; > .ctl32_hMenu, ; > .ctl32_hInstance, ; > .ctl32_lpParam) > >.ctl32_OldProc = GetWindowLong(_vfp.HWnd, GWL_WNDPROC) >Bindevent(This.ctl32_controlHwnd, WM_PAINT, This, [ctl32_WM_Paint], 1) >>
> If .Flat = .T. > SetWindowLong(.ctl32_ControlHwnd, GWL_EXSTYLE, 0) > Else > SetWindowLong(.ctl32_ControlHwnd, GWL_EXSTYLE, WS_EX_STATICEDGE) > Endif > > *!* Refresh control window so frame change gets redrawn > SetWindowPos(.ctl32_ControlHwnd, ; > HWND_TOP, ; > 0, ; > 0, ; > 0, ; > 0, ; > BITOR(SWP_NOMOVE, SWP_NOSIZE, SWP_NOZORDER, SWP_FRAMECHANGED)) >>
> m.lnDC = GetDC(.ctl32_ControlHwnd) > > m.lcRect = Space(16) > GetClientRect(.ctl32_ControlHwnd, @m.lcRect) > m.lnLeft = .uStrToLong(Substr(m.lcRect, 1,4)) > m.lnTop = .uStrToLong(Substr(m.lcRect, 5,4)) > m.lnRight = .uStrToLong(Substr(m.lcRect, 9,4)) - 1 > m.lnBottom = .uStrToLong(Substr(m.lcRect, 13,4)) - 1 > > MoveToEx(m.lnDC, m.lnLeft, m.lnTop, []) > > LineTo(m.lnDC, m.lnRight, m.lnTop) > LineTo(m.lnDC, m.lnRight, m.lnBottom) > LineTo(m.lnDC, m.lnLeft, m.lnBottom) > LineTo(m.lnDC, m.lnLeft, m.lnTop) > > ReleaseDC(.ctl32_ControlHwnd, m.lnDC) >>