Jump to content
  • Advertisement
Sign in to follow this  

Windows changing the palette (WM_PALETTECHANGED)

This topic is 4740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!