Sign in to follow this  
Alexander311

Windows changing the palette (WM_PALETTECHANGED)

Recommended Posts

I have a directx game that uses 256 color 8-bit graphics. For some reason, Windows sometimes decides to alter my palette. I know this from capturing the WM_PALETTECHANGED message. If I change it back to my game palette, Windows changes it again, 3 seconds later. This only occurs sometimes, but once WindowsXP decides to change the palette, it keeps changing it after I change it back to what I need it to be. Is there any way to tell Windows Xp to not mess with my palette? I get this on 2 different Windows Xp machines.

Share this post


Link to post
Share on other sites
Try overriding the WM_PALETTECHANGE message in your window procedure by
catching the message, and return 0.
Don't use DefWindowProc() method when catching the message cause than, the window will still use its default behaviour for this message.

Share this post


Link to post
Share on other sites
WM_PALETTECHANGE is not a proper name of a message. Which one are you referring to? I know of WM_PALETTECHANGED, but then it is too late to do anything since the palettte has already been changed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this