windows_programming_notes.nbk: Home | Index | Next Page: WM_SYSCOMMAND | Previous Page: WM_SYSCHAR
The WM_SYSCOLORCHANGE message is sent to all top-level windows when a change is made to a system color setting.
A window receives this message through its WindowProc function.
LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // WM_SYSCOLORCHANGE WPARAM wParam, // not used LPARAM lParam // not used );
This message has no parameters.
The system sends a WM_PAINT message to any window that is affected by a system color change.
Applications that have brushes using the existing system colors should delete those brushes and re-create them using the new system colors.
Top level windows that use common controls must forward the WM_SYSCOLORCHANGE message to the controls; otherwise, the controls will not be notified of the color change. This ensures that the colors used by your common controls are consistent with those used by other user interface objects. For example, a toolbar control uses the "3D Objects" color to draw its buttons. If the user changes the 3D Objects color but the WM_SYSCOLORCHANGE message is not forwarded to the toolbar, the toolbar buttons will remain in their original color while the color of other buttons in the system changes.
windows_programming_notes.nbk: Home | Index | Next Page: WM_SYSCOMMAND | Previous Page: WM_SYSCHAR
Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time