Replacing msctls_updown32
-
How can I replace CSpinButton inside TabCtrl???? Cann't use "PreSubclassWindow()" as control may not be created at that time? May be someone has ideas how to detect when CTabCtrl created Spin? Thanks, Brian
-
How can I replace CSpinButton inside TabCtrl???? Cann't use "PreSubclassWindow()" as control may not be created at that time? May be someone has ideas how to detect when CTabCtrl created Spin? Thanks, Brian
The spin button sends a WM_PARENTNOTIFY msg to the tab control when it's created. If the low order word of wParam is WM_CREATE then get the child control's class name (lParam is a pointer to the child's HWND). If the class name is "msctls_updown32" then you hit the jackpot ;)
-
The spin button sends a WM_PARENTNOTIFY msg to the tab control when it's created. If the low order word of wParam is WM_CREATE then get the child control's class name (lParam is a pointer to the child's HWND). If the class name is "msctls_updown32" then you hit the jackpot ;)
Thanks, worked like a charm.... One more question... If I want to hide Spin, what would be the best way to do this...
-
Thanks, worked like a charm.... One more question... If I want to hide Spin, what would be the best way to do this...
subclass the spin control and then on WM_WINDOWPOSCHANGING set the flags like this: ((LPWINDOWPOS)lParam)->flags &= ~SWP_SHOWWINDOW; ((LPWINDOWPOS)lParam)->flags |= SWP_HIDEWINDOW;