📄 project1.dpr
字号:
program Project1;
uses
Windows,
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
hFileMap := OpenFileMapping(FILE_MAP_WRITE, False, 'WfsFileMappingForCallWndProcHook');
if hFileMap = 0 then
begin
hFileMap := CreateFileMapping(INVALID_HANDLE_VALUE, nil, PAGE_READWRITE, 0, SizeOf(TMyBuf), 'WfsFileMappingForCallWndProcHook');
if hFileMap <> 0 then
begin
hMapView := MapViewOfFile(hFileMap, FILE_MAP_WRITE, 0, 0, 0);
if hMapView <> nil then
begin
ZeroMemory(hMapView, SizeOf(TMyBuf));
hMapView^.aHwnd := Application.Handle;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
UnmapViewOfFile(hMapView);
end;
CloseHandle(hFileMap);
end;
end
else begin
hMapView := MapViewOfFile(hFileMap, FILE_MAP_WRITE, 0, 0, 0);
if hMapView <> nil then
begin
if Isiconic(hMapView^.aHwnd) then ShowWindow(hMapView^.aHwnd, SW_RESTORE);
SetForegroundWindow(hMapView^.aHwnd);
UnmapViewOfFile(hMapView);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -