Hi there,
just played around with MS DateTime control. Try to set colors.
The only way i found was to subclass it and handle WM_Paint.
Is there a better way to do it ?
rgds
Ralph
------------------
just played around with MS DateTime control. Try to set colors.
The only way i found was to subclass it and handle WM_Paint.
Is there a better way to do it ?
rgds
Ralph
Code:
FUNCTION CtrlProc(BYVAL hCtl AS LONG, _ BYVAL Msg AS LONG, _ BYVAL wParam AS LONG, _ BYVAL lParam AS LONG) EXPORT AS LONG STATIC lpAddress AS LONG STATIC hBrush AS LONG LOCAL rc AS rect IF hCtl = 0 THEN lpAddress = wParam HBrush = createsolidBrush ( %cyan ) END IF SELECT CASE Msg CASE %WM_PAINT LOCAL ps AS PAINTSTRUCT GetCLientRect hCtl, rc wParam = BeginPaint(hCtl, ps) FillRect wParam, rc, HBrush ''' hdc passed to default wndProc in wParam ''' no end paint CASE %WM_Destroy deleteObject hBrush END SELECT FUNCTION = CallWindowProc ( lpAddress, hCtl, Msg, wParam, lParam ) END FUNCTION
------------------
Comment