Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void switch_view()
- {
- RECT rc;
- SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, NULL);
- DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- if(style & WS_CAPTION)
- {
- SetWindowLongPtr(hwnd, GWL_STYLE, WS_OVERLAPPED);
- SetWindowLongPtr(hwnd, GWL_EXSTYLE, 0);
- SetWindowPos(hwnd, NULL, 0, 0, rc.right, rc.bottom,
- SWP_SHOWWINDOW | SWP_FRAMECHANGED);
- }
- else
- {
- SetWindowLongPtr(hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
- SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
- SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
- }
- }
Add Comment
Please, Sign In to add comment