1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
cal = CreateWindow(
DATETIMEPICK_CLASS,
NULL,
WS_BORDER|WS_CHILD|WS_VISIBLE,
95,75,120,25,
hwnd,
NULL,instance,NULL);
SendMessage(cal,WM_SETFONT,(WPARAM)tfont,(LPARAM)0);
//The above works fine.
HDC calhdc = GetDC(cal);
SetTextColor(calhdc,RGB(102,161,107));
//This part doesn't do anything.
SendMessage(cal,DTM_SETMCFONT,(WPARAM)tfont,(LPARAM)0);
SendMessage(cal,DTM_SETMCCOLOR,(WPARAM)MCSC_TITLEBK,(LPARAM)RGB(102,161,107));
SendMessage(cal,DTM_SETMCCOLOR,(WPARAM)MCSC_MONTHBK,(LPARAM)RGB(214,171,77));
SendMessage(cal,DTM_SETMCCOLOR,(WPARAM)MCSC_TEXT,(LPARAM)RGB(255,255,255));
SendMessage(cal,DTM_SETMCCOLOR,(WPARAM)MCSC_TITLETEXT,(LPARAM)RGB(255,255,255));
//All these messages change the colors for the calendar itself.
|