Quote Originally Posted by 2kaud View Post
If you really want the code to set the text/background colour to be in the child procedure window, you could do something like this

in child window procedure
                HDC hdc = (HDC)wParam;
                SetTextColor(hdc, RGB(0, 0, 0));
                SetBkColor(hdc, RGB(255,0,0));
                return (LRESULT)GetStockObject(GRAY_BRUSH);
in parent window procedure
         case WM_CTLCOLORSTATIC:
		return SendMessage((HWND)lParam, WM_CTLCOLORSTATIC, wParam, lParam);
This works because for the WM_CTLCOLORSTATIC message sent to the control parent window, lParam is a handle to the child window from which the request came.
thanks for that.
let me ask 1 thing: when i use WM_PAINT in my child window(my label class), why the mouse messages aren't activated?