getwindowplacement

About this tag
The GetWindowPlacement function in the Windows API retrieves the current window placement data, including position, size, and show state. Discussions on WindowsForum.com focus on using GetWindowPlacement to save and restore window positions via the registry, with developers reporting potential bugs when handling minimized windows. Common issues involve the showCmd flag being set to SW_MINIMIZE and the need to set WPF_SETMINPOSITION flags correctly. The function is used in WM_DESTROY messages to persist window state and in InitInstance to restore it. Developers share code snippets and workarounds for reliable window placement restoration.
  1. Alex Sokolek

    I think I found a bug in GetWindowPlacement()

    Hi. I think I found a bug in GetWindow{Placement(). I save and restore the window placement using the registry as an intermidiary. For save... ``` (In WndProc) case WM_DESTROY: { WINDOWPLACEMENT wp; ZeroMemory(&wp, sizeof(wp)); wp.length =...
Back
Top