Author Topic: [Coding] Maximized window  (Read 791 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 1525
[Coding] Maximized window
« on: May 24, 2018, 12:46:55 am »
There are 2 types of fullscreen windows. The ones that are work-area fullscreen and the ones that are monitor-area fullscreen. Work-area is basically the monitor-area without additional bars (taskbar by default, but it's possible to register more). Windows of the first type take all of the work-area up when maximized, this is default for most applications like notepad, explorer, etc. Windows of the second type take all of the monitor-area up when maximized, this is used by fullscreen applications like games, video players, etc.

When you write an application, you expect it to occupy work-area only when you have it maximized. But it's not always the case. If your window has no caption or no maximize button (I mean window styles here), monitor-area will be assigned by Windows. That's a feature. To override this behavior handle WM_GETMINMAXINFO and limit max size and position getting needed values from GetMonitorInfo API.