From 04dc42a28482b27465b051674e089c62c7b4a311 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 16 Jan 2008 05:42:23 +0000 Subject: [PATCH] wince: port win32 fix #13755 (have not tested though) git-svn-id: trunk@13776 - --- lcl/interfaces/wince/winceproc.pp | 48 ++++++++++++++-------------- lcl/interfaces/wince/wincewsforms.pp | 2 ++ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/lcl/interfaces/wince/winceproc.pp b/lcl/interfaces/wince/winceproc.pp index b3a1fa2c9a..1ec8f320f9 100644 --- a/lcl/interfaces/wince/winceproc.pp +++ b/lcl/interfaces/wince/winceproc.pp @@ -1084,32 +1084,32 @@ begin case Application.ApplicationType of { Under Desktop or Handheld mode we get an application which looks similar to a desktop one, with sizable windows } - atDesktop,atHandheld: - begin - case Style of - bsSizeable, bsSizeToolWin: - Result := Result or (WS_OVERLAPPED or WS_THICKFRAME or WS_CAPTION); - bsSingle, bsToolWindow: - Result := Result or (WS_OVERLAPPED or WS_BORDER or WS_CAPTION); - bsDialog: - Result := Result or (WS_POPUP or WS_BORDER or WS_CAPTION); - bsNone: - Result := Result or WS_POPUP; + atDesktop, atHandheld: + begin + case Style of + bsSizeable, bsSizeToolWin: + Result := Result or (WS_OVERLAPPED or WS_THICKFRAME or WS_CAPTION); + bsSingle, bsToolWindow: + Result := Result or (WS_OVERLAPPED or WS_BORDER or WS_CAPTION); + bsDialog: + Result := Result or (WS_POPUP or WS_BORDER or WS_CAPTION); + bsNone: + Result := Result or WS_POPUP; + end; end; - end; - { Under PDA or Smartphone modes most windows are enlarged to fit the screen - Dialogs and borderless windows are exceptions } - atPDA,atSmartphone,atDefault: - begin - case Style of - bsDialog: - Result := Result or (WS_POPUP or WS_BORDER or WS_CAPTION); - bsNone: - Result := Result or WS_POPUP; - else - Result := WS_VISIBLE; + { Under PDA or Smartphone modes most windows are enlarged to fit the screen + Dialogs and borderless windows are exceptions } + atPDA, atSmartphone, atDefault: + begin + case Style of + bsDialog: + Result := Result or (WS_POPUP or WS_BORDER or WS_CAPTION); + bsNone: + Result := Result or WS_POPUP; + else + Result := WS_VISIBLE; + end; end; - end; end; end; diff --git a/lcl/interfaces/wince/wincewsforms.pp b/lcl/interfaces/wince/wincewsforms.pp index 46d8b1aec0..bcc23e09aa 100644 --- a/lcl/interfaces/wince/wincewsforms.pp +++ b/lcl/interfaces/wince/wincewsforms.pp @@ -218,6 +218,8 @@ var begin BorderStyle := GetDesigningBorderStyle(AForm); Flags := BorderStyleToWin32Flags(BorderStyle); + if AForm.Parent <> nil then + Flags := (Flags or WS_CHILD) and not WS_POPUP; FlagsEx := BorderStyleToWin32FlagsEx(BorderStyle); if (AForm.FormStyle in fsAllStayOnTop) then FlagsEx := FlagsEx or WS_EX_TOPMOST;