diff --git a/lcl/interfaces/wince/winceproc.pp b/lcl/interfaces/wince/winceproc.pp index 1f77abed9f..f8b7f89bbd 100644 --- a/lcl/interfaces/wince/winceproc.pp +++ b/lcl/interfaces/wince/winceproc.pp @@ -798,7 +798,8 @@ begin and (not Sender.ClientRectNeedsInterfaceUpdate) then exit; Result:=true; - if SendSizeMsgOnDiff then begin + if SendSizeMsgOnDiff then + begin //writeln('LCLBoundsNeedsUpdate B ',TheWinControl.Name,':',TheWinControl.ClassName,' Sending WM_SIZE'); Sender.InvalidateClientRectCache(true); // send message directly to LCL, some controls not subclassed -> message @@ -1313,7 +1314,7 @@ end; function GetWinCEPlatform: TApplicationType; {$ifdef Win32} begin - Result := atPDA; // just for testing, should actually be atDesktop + Result := atDesktop; end; {$else} var diff --git a/lcl/interfaces/wince/wincewinapi.inc b/lcl/interfaces/wince/wincewinapi.inc index 631d3327c9..b62a245537 100644 --- a/lcl/interfaces/wince/wincewinapi.inc +++ b/lcl/interfaces/wince/wincewinapi.inc @@ -2405,6 +2405,19 @@ begin Result := Windows.SetFocus(HWnd); end; +{------------------------------------------------------------------------------ + Method: SetForegroundWindow + Params: HWnd - The handle of the window + Returns: True if succesful + + The SetForegroundWindow function brings the specified window to top + (highest z-index level). + ------------------------------------------------------------------------------} +function TWinCEWidgetSet.SetForegroundWindow(HWnd: HWND): boolean; +begin + Result := Windows.SetForegroundWindow(HWnd); +end; + {------------------------------------------------------------------------------ Method: SetProp Params: Handle - handle of window diff --git a/lcl/interfaces/wince/wincewinapih.inc b/lcl/interfaces/wince/wincewinapih.inc index 178cdeb829..0ef97429dc 100644 --- a/lcl/interfaces/wince/wincewinapih.inc +++ b/lcl/interfaces/wince/wincewinapih.inc @@ -204,6 +204,7 @@ function SetCaretPosEx(Handle: HWnd; X, Y: Integer): Boolean; override; function SetCursor(hCursor: HICON): HCURSOR; override; //function SetCursorPos(X, Y: Integer): Boolean; override; function SetFocus(hWnd: HWND): HWND; override; +function SetForegroundWindow(HWnd: HWND): boolean; override; function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; override; function SetROP2(DC: HDC; Mode: Integer): Integer; override; function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override; diff --git a/lcl/interfaces/wince/wincewscontrols.pp b/lcl/interfaces/wince/wincewscontrols.pp index 7558caea8d..431d589991 100644 --- a/lcl/interfaces/wince/wincewscontrols.pp +++ b/lcl/interfaces/wince/wincewscontrols.pp @@ -409,10 +409,6 @@ begin {$ENDIF} suppressMove := false; AdaptBounds(AWinControl, IntfLeft, IntfTop, IntfWidth, IntfHeight, suppressMove); - - // Why would we want to supress the move? - // Form moving is indispensable to have message dialogs - MoveWindow(AWinControl.Handle, IntfLeft, IntfTop, IntfWidth, IntfHeight, true); LCLControlSizeNeedsUpdate(AWinControl, false);