Read Microsoft documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761849(v=vs.85).aspx[
^]
By the way, this kind of thing is somehow hard to do with the API (and just a bit better with MFC) as message are sent to the parent windows instead of the control itself. This make it harder to make reusable controls.
WinForms (and WPF) are hundredth of time better for that. The color can be set directly in the designer or a single line of code is required to set the color in code.