编辑器
优化断点调试窗口切换
This commit is contained in:
@@ -135,6 +135,7 @@ type tapplication=class(tcomponent)
|
||||
{**
|
||||
@explan(说明) active处理
|
||||
**}
|
||||
//echo "\r\nactiveapp:",e.wparam;
|
||||
if Fmainform then
|
||||
begin
|
||||
if e.wparam then
|
||||
|
||||
@@ -2708,6 +2708,16 @@ type tsgtkapi = class(tgtkapis)
|
||||
end
|
||||
function BringWindowToTop(hwd :pointer);
|
||||
begin
|
||||
end
|
||||
function GetWindowHandleByPID();
|
||||
begin
|
||||
|
||||
end
|
||||
function AllowSetForegroundWindow(hwd :pointer);
|
||||
begin
|
||||
end
|
||||
function ForegroundWindow(hwnd);
|
||||
begin
|
||||
end
|
||||
//socket
|
||||
function socket(af:integer;tp:integer;protocol:integer):pointer;begin end
|
||||
|
||||
@@ -267,11 +267,32 @@ type twindowsapi = class()
|
||||
function RegisterClassExA(wc:pointer):short;stdcall;external "User32.dll" name "RegisterClassExA";
|
||||
function EnableWindow(wc:pointer;b:integer):integer;stdcall;external "User32.dll" name "EnableWindow";
|
||||
//窗口操作
|
||||
|
||||
function ForegroundWindow(wnd_);
|
||||
begin
|
||||
if not (wnd_>0 or wnd_<0) then return 0;
|
||||
SetWindowPos(wnd_, 0xFFFFFFFF, 0, 0, 0, 0, 1 .| 2);
|
||||
SetWindowPos(wnd_, 0xFFFFFFFE, 0, 0, 0, 0, 1 .| 2);
|
||||
return 1;
|
||||
hForeWnd := GetForegroundWindow();
|
||||
if wnd_ = hForeWnd then return 0;
|
||||
dwForeID := GetWindowThreadProcessId(hForeWnd, 0);
|
||||
dwCurID := systhreadid();
|
||||
if dwForeID = dwCurID then return 0;
|
||||
AttachThreadInput(dwCurID, dwForeID, TRUE);
|
||||
ShowWindow(wnd_, 1);
|
||||
SetWindowPos(wnd_, 0xFFFFFFFF, 0, 0, 0, 0, 1 .| 2);
|
||||
SetWindowPos(wnd_, 0xFFFFFFFE, 0, 0, 0, 0, 1 .| 2);
|
||||
//echo "\r\n brt editor:",SetForegroundWindow(wnd_);
|
||||
AttachThreadInput(dwCurID, dwForeID, FALSE);
|
||||
end
|
||||
function AttachThreadInput(idattach:integer;idattachto:integer;fattach:integer):integer;stdcall;external "User32.dll" name "AttachThreadInput";
|
||||
function ShowWindow(hwd :pointer;f:integer):integer;stdcall;external "User32.dll" name "ShowWindow";
|
||||
function BringWindowToTop(hwd :pointer):integer;stdcall;external "User32.dll" name "BringWindowToTop";
|
||||
function SetForegroundWindow(hwd :pointer):integer;stdcall;external "User32.dll" name "SetForegroundWindow";
|
||||
function AllowSetForegroundWindow(hwd :integer):integer;stdcall;external "User32.dll" name "AllowSetForegroundWindow";
|
||||
function SetWindowPos(wd:pointer;hWndInsertAfter:pointer;
|
||||
X:integer; Y:integer; cx:integer;cy:integer; uFlags:integer):pointer;stdcall;external "User32.dll" name "SetWindowPos";
|
||||
X:integer; Y:integer; cx:integer;cy:integer; uFlags:integer):integer;stdcall;external "User32.dll" name "SetWindowPos";
|
||||
function MoveWindow(wd:pointer; X:integer; Y:integer; cx:integer;cy:integer; bRepaint:integer):pointer;stdcall;external "User32.dll" name "MoveWindow";
|
||||
//窗口大小
|
||||
function GetClientRect(hwnd :pointer;var rec:array of integer):integer;stdcall;external "User32.dll" name "GetClientRect";
|
||||
@@ -309,7 +330,7 @@ type twindowsapi = class()
|
||||
{$ENDIF}
|
||||
//function SetWindowLongA(HH:pointer;idx:integer;dwNewLong:pointer):pointer;stdcall;external "User32.dll" name "SetWindowLongA";
|
||||
//function GetWindowLongA(HH:pointer;idx:integer):pointer;stdcall;external "User32.dll" name "GetWindowLongA";
|
||||
function GetClassNameA(HH:pointer;var name:string;len:integer):pointer;stdcall;external "User32.dll" name "GetClassNameA";
|
||||
function GetClassNameA(HH:pointer;var name:string;len:integer):integer;stdcall;external "User32.dll" name "GetClassNameA";
|
||||
function CreateWindowExA(dwExStyle:integer; lpClassName:string; lpWindowName:string;
|
||||
dwStyle:integer;x:integer;y:integer;nWidth:integer;nHeight:integer;
|
||||
hWndParent:pointer;hMenu:pointer; hInstance:pointer;lpParam:pointer):pointer;stdcall;external "User32.dll" name "CreateWindowExA";
|
||||
|
||||
Reference in New Issue
Block a user