windows_programming_notes.nbk: Home | Index | Next Page: WM_PARENTNOTIFY | Previous Page: WM_PAINTICON


 WM_PALETTECHANGED

The WM_PALETTECHANGED message is sent to all top-level and overlapped windows after the window with the keyboard focus has realized its logical palette, thereby changing the system palette. This message enables a window that uses a color palette but does not have the keyboard focus to realize its logical palette and update its client area.

A window receives this message through its WindowProc function.

    LRESULT CALLBACK WindowProc(
      HWND hwnd,       // handle to window
      UINT uMsg,       // WM_PALETTECHANGED
      WPARAM wParam,   // handle to window (HWND)
      LPARAM lParam    // not used
    );

Parameters

Remarks

This message must be sent to all top-level and overlapped windows, including the one that changed the system palette. If any child windows use a color palette, this message must be passed on to them as well.

To avoid creating an infinite loop, a window that receives this message must not realize its palette, unless it determines that wParam does not contain its own window handle.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: WM_PARENTNOTIFY | Previous Page: WM_PAINTICON


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time