A static control, or an edit control that is read-only or disabled, sends the WM_CTLCOLORSTATIC message to its parent window when the control is about to be drawn. By responding to this message, the parent window can use the specified device context handle to set the text and background colors of the static control. WM_CTLCOLORSTATIC hdcStatic = (HDC) wParam; // handle to display context hwndStatic = (HWND) lParam; // handle to static control Parameters hdcStatic Value of wParam. Handle to the device context for the static control window. hwndStatic Value of lParam. Handle to the static control. |