diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-09 18:04:14 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-08-09 18:04:14 +0100 |
commit | ca1ca23d451007cd1e6d0636f912bfa7afd6d12f (patch) | |
tree | ad8f7b36fe9a146fbecad238728b22b66076b43d /src/corelib/gdi | |
parent | f2c283c58b718f14ac50b51faf5beb86a35d767b (diff) | |
download | fpGUI-ca1ca23d451007cd1e6d0636f912bfa7afd6d12f.tar.xz |
bugfix: gdi fullscreen - form was larger than screen dimensions.
This went unnoticed for a very long time, Mhen a from was set to
fullscreen, after it was already displayed (not at creation time), then
the size of the form was slightly bigger that the screen resolution.
I corrected the Win32 API calls, and now the form has the correct size at
all times.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index d5e2bf19..57dfba7c 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -1632,6 +1632,7 @@ begin UpdateWindowPosition; FWinStyle := WS_POPUP or WS_SYSMENU; + FWinStyle := FWinStyle and not(WS_CAPTION or WS_THICKFRAME); if aUpdate then begin @@ -1640,12 +1641,11 @@ begin {$ELSE} SetWindowLong(FWinHandle, GWL_STYLE, FWinStyle); {$ENDIF} - {According to MSDN, call SetWindowPos to apply changes made by SetWindowLong. - uFlags should be SWP_NOMOVE, SWP_NOSIZE, SWP_NOZORDER, SWP_FRAMECHANGED} - SetWindowPos(FWinHandle,0,0,0,0,0,SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_FRAMECHANGED); - ShowWindow(FWinHandle, SW_SHOW); + { According to MSDN, call SetWindowPos to apply changes made by SetWindowLong. } + SetWindowPos(FWinHandle,HWND_TOP,0,0,Width,Height,SWP_FRAMECHANGED or SWP_SHOWWINDOW or SWP_NOACTIVATE); end; - end else + end + else begin FWinStyle := FNonFullscreenStyle; if aUpdate then |