Makes the correction of the form height to avoid overlapping the menu be automatic.

git-svn-id: trunk@17693 -
This commit is contained in:
sekelsenmat 2008-12-05 16:11:36 +00:00
parent 15eeba4708
commit 1b7c183342
3 changed files with 3 additions and 6 deletions

View File

@ -218,7 +218,6 @@ type
{ Variables to be set by the user }
WinCETitlePolicy: TWinCETitlePolicy;
MaximizedWindowHeightCorrection: Integer;
end;
{$I wincelistslh.inc}

View File

@ -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

View File

@ -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}