windows_programming_notes.nbk: Home | Index | Next Page: win32 msgs: WM_PASTE | Previous Page: win32 msgs: WM_NCACTIVATE


 win32 msgs: WM_PALETTEISCHANGING

The WM_PALETTEISCHANGING message informs applications that an application is going to realize its logical palette.

A window receives this message through its WindowProc function.

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

Parameters

Return Values

If an application processes this message, it should return zero.

Remarks

The application changing its palette does not wait for acknowledgment of this message before changing the palette and sending the WM_PALETTECHANGED message. As a result, the palette may already be changed by the time an application receives this message.

If the application either ignores or fails to process this message and a second application realizes its palette while the first is using palette indexes, there is a strong possibility that the user will see unexpected colors during subsequent drawing operations.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: win32 msgs: WM_PASTE | Previous Page: win32 msgs: WM_NCACTIVATE


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