How to create a window with a title less than the border? when the window is maximized, it should not overlap the taskbar

I want to create a window using win32 without a title. The border should resize the window. But when I maximize the window, it also closes the taskbar, and I don't want to close the taskbar. How can i achieve this?

Thank.

+3
source share
2 answers

I think that if the window is in the MAXIMIZED state, it does not extend to the standard taskbar - however, you can force your window to be full-screen without maximizing it. To demonstrate:

// Force window to cover the taskbar...
case WM_SIZE:
  if( wParam == SIZE_MAXIMIZED )
  {
    ShowWindow( hWnd, SW_RESTORE ); // not MAXIMIZED any more

    // show on top at 1920x1080 size
    SetWindowPos( hWnd, HWND_TOPMOST,0,0,1920,1080,SWP_SHOWWINDOW );
  }
  break;

Please note that this has all the problems associated with the TOPMOST window!

... , , , , :

HMONITOR hmon= MonitorFromWindow(hDlg, MONITOR_DEFAULTTONEAREST );
MONITORINFO moninfo;
moninfo.cbSize= sizeof(moninfo);
GetMonitorInfo(hmon, &moninfo);

SetWindowPos(hWnd,0, moninfo.rcWork.left, moninfo.rcWork.top,
                     moninfo.rcWork.right,moninfo.rcWork.bottom, SWP_NOZORDER );

. MAXIMIZED, , ( / , , ).

+4

Windows ( ), . , , -, Power Point ..

, , .

, , , TonyWilk, ( ) , . , , , , , .

0

All Articles