Jump to content
  • Advertisement
Sign in to follow this  
Alexander311

Windows changing the palette (WM_PALETTECHANGED)

This topic is 4801 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!