This message is sent to the parent window of a button when the button is about to be drawn. By responding to this message, the parent window can set the text and background colors of the child window by using the display-context handle given in the wParam parameter.
wParam
Contains a handle to the display context for the child window.
lParam
The lParam parameter contains the handle to the child window.
The DefWindowProc function selects the default system colors.
If an application processes the WM_CTLCOLORBTN message, it must return a handle to the brush that is to be used for painting the control background. Note that failure to return a valid brush handle will place the system in an unstable state.
The WM_CTLCOLORBTN message is never sent between threads. It is only sent within one thread.
WM_CTLCOLORDLG, WM_CTLCOLORLISTBOX, WM_CTLCOLORMSGBOX, WM_CTLCOLORSCROLLBAR, WM_CTLCOLORSTATIC