mutAccessData.lock(); if (boolWindowed == true) { //Not windowed, as soon as this is hit and the message pump interrupts this thread the fullscreen settings //get overwritten. boolWindowed = false; //Set the windows handle to the fullscreen popup style (no border). SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP); SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, intFSWidth, intFSHeight, 0); //Display the screen with the new settings. ShowWindow(hWnd, SW_SHOW); mutAccessData.unlock(); } else { //We are now using a window boolWindowed = true; //Set the windows handle to the windowed settings with a normal framed window. SetWindowLongPtr(hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); //Put the window where we normally put it (accounting for half the frames pixels). SetWindowPos(hWnd, HWND_NOTOPMOST, intLeft, intTop, intWWidth + WINDOWFRAMEWIDTH, intWHeight + WINDOWFRAMEHEIGHT, 0); //Display the screen with the new settings. ShowWindow(hWnd, SW_SHOW); mutAccessData.unlock(); }
Here is a picture of what I am getting, halfway there.
Its got 1024, 768 display in a 1280, 1024 screen. However its not changed the resolution of the window.