From 1b7c183342a966910ede8c1af41c964f3490573b Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Fri, 5 Dec 2008 16:11:36 +0000 Subject: [PATCH] Makes the correction of the form height to avoid overlapping the menu be automatic. git-svn-id: trunk@17693 - --- lcl/interfaces/wince/winceint.pp | 1 - lcl/interfaces/wince/wincewsforms.pp | 4 +--- lcl/interfaces/wince/wincewsmenus.pp | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lcl/interfaces/wince/winceint.pp b/lcl/interfaces/wince/winceint.pp index 7fa963c74d..4b33262431 100644 --- a/lcl/interfaces/wince/winceint.pp +++ b/lcl/interfaces/wince/winceint.pp @@ -218,7 +218,6 @@ type { Variables to be set by the user } WinCETitlePolicy: TWinCETitlePolicy; - MaximizedWindowHeightCorrection: Integer; end; {$I wincelistslh.inc} diff --git a/lcl/interfaces/wince/wincewsforms.pp b/lcl/interfaces/wince/wincewsforms.pp index 819af27fa9..c34169210f 100644 --- a/lcl/interfaces/wince/wincewsforms.pp +++ b/lcl/interfaces/wince/wincewsforms.pp @@ -306,9 +306,7 @@ begin begin Left := WR.Left; Top := WR.Top; - Height := WR.Bottom - WR.Top - WinCEWidgetset.MaximizedWindowHeightCorrection; - // - GetSystemMetrics(SM_CYMENU) - //- GetSystemMetrics(SM_CXBORDER) * 2; + Height := WR.Bottom - WR.Top; Width := WR.Right - WR.Left; end else if (BorderStyle = bsDialog) then diff --git a/lcl/interfaces/wince/wincewsmenus.pp b/lcl/interfaces/wince/wincewsmenus.pp index 0d6b3fe647..24b286aa8a 100644 --- a/lcl/interfaces/wince/wincewsmenus.pp +++ b/lcl/interfaces/wince/wincewsmenus.pp @@ -302,7 +302,7 @@ begin // Correction for the position of the window // Avoids overlapping the menu, when it doesn't belong to the work area -{ if (Application.ApplicationType in [atPDA, atDefault]) and + if (Application.ApplicationType in [atPDA, atDefault]) and (AOwner.BorderStyle <> bsDialog) and (AOwner.BorderStyle <> bsNone) then begin GetWindowRect(mbi.hwndMB, R); @@ -310,7 +310,7 @@ begin if WR.Bottom > R.Top then SetWindowPos(wnd, 0, 0, 0, WR.Right - WR.Left, R.Top - WR.Top, SWP_NOZORDER or SWP_NOREPOSITION or SWP_NOMOVE); - end;} + end; //DrawMenuBar(wnd); {$endif}