DC/RC question

how can i change the display settings ONLY for my window?
when i use ChangeDisplaySettings(&devmode,CDS_FULLSCREEN,…), i change the “whole screen”,which i don’t want in windowed mode (when i go fullscreen,i don’t care about what’s behind the window…)

I played around with the MFC’s ResetDC() function,but i won’t get happy with it…

I don’t quite get your question holy !

Changing the display settings IS changing the screen itself !

I think you mean changing the pixel format of a window (am I wrong ???). I suppose you want to change the bit depth or something like that (don’t think about changing the refresh rate of your window : it is NOT possible ! ).

What you can do is override the OnCreate member function of your window. From there, use SetPixelFormat to set the pixel format of the window.

If you want to change this pixel format dynamically, I know only one way : destroy the window and recreate it (you can call SetPixelFormat only ONCE for a window). This method means that you have to save all members of your window class which can be tricky…


Oh ,i see!!

i’m quite a dumbass,hehe…