Sign in to follow this  

A question about fullscreen code in dxut.cpp.

Recommended Posts

I'm studying dxut codes these days. And I see some codes that handles the fullscreen mode. But I can't understand some of the codes. if((wpFullscreen.flags & WPF_RESTORETOMAXIMIZED ) != 0 ) { // Restore the window to normal if the window was maximized then minimized. This causes the // WPF_RESTORETOMAXIMIZED flag to be set which will cause SW_RESTORE to restore the // window from minimized to maxmized which isn't what we want wpFullscreen.flags &= ~WPF_RESTORETOMAXIMIZED;//1 wpFullscreen.showCmd = SW_RESTORE;//2 SetWindowPlacement( DXUTGetHWNDDeviceFullScreen(), &wpFullscreen ); } This is the code that I couldn't understand. This code is in dxut sample code(dxut.cpp, dxutchangedevice function). I erased two lines which sets 'flags, showCmd'member to WPF_RESTOREMAXMIZED, SW_RESTORE to see what happens. But I don't see any differnce. Could some one please tell me what those codes are for?

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