wince: Fixes SetForegroundWindow, fixes bug #12193

git-svn-id: trunk@21264 -
This commit is contained in:
sekelsenmat 2009-08-17 16:11:50 +00:00
parent 523351a53f
commit 61788cde33
4 changed files with 17 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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