I have been skinning dialogs by using the WM_CTLCOLORSTATIC, WM_CTLCOLORBTN messages as such:-
case WM_CTLCOLORSTATIC:
case WM_CTLCOLORBTN:
hdc = (HDC)wParam;
hwndCtl = (HWND)lParam;
SetTextColor(hdc,RGB(0xff,0xff,0xff));
SetBkMode(hdc,TRANSPARENT);
pt.x = 0;
pt.y = 0;
MapWindowPoints(hwndCtl,_hwnd,&pt,1);
x = -pt.x;
y = -pt.y;
SetBrushOrgEx(hdc,x,y,NULL);
return (INT_PTR)_skinBrush;
This code sets the text color to white for all static elements as the background brush paints a low contrast image.
Ive (only) recently updated to use Common Controls 6 and the XP-Themeing look on my dialogs but all the text on controls has 'dissapeared' as its being drawn in the default black again.
Is there some other way to control the text color of controls under xp-themeing? Or do I need to consider ownerdraw now :-( ?
(And owner draw is really NOT an option - If I ownerdraw all my controls the entire motivation for switching to common controls 6 in the first place falls away).