1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
library Project1;
uses
//ShareMem, <= Peu ca qui plante?
SysUtils, Classes, Windows, ShDocVw, OleCtrls, Controls, Contnrs;
var
ListObjectBrowser : TObjectList;
{$R *.res}
function hidewin(mWnd: HWND; aWnd: HWND; data: PChar; parms: PChar; show: Boolean; nopause: Boolean): Integer; stdcall;
var
HWindow: HWND;
HEdit, HListBox, HStatic, HScrollBar : HWND;
TRcList, TRcChan: TRect;
begin
ListObjectBrowser:= TObjectList.Create;
HWindow:= StrToInt(data);
HEdit:= FindWindowEx(Hwindow,0,'Edit',nil);
HListBox:= FindWindowEx(Hwindow,0,'ListBox',nil);
HStatic:= FindWindowEx(Hwindow,0,'Static',nil);
HScrollBar:= FindWindowEx(Hwindow,0,'ScrollBar',nil);
ShowWindow(HStatic,SW_HIDE);
ListObjectBrowser.Add(TWebBrowser.Create(FindControl(Hwindow)));
TWebBrowser(ListObjectBrowser.Items[0]).ParentWindow:= Hwindow;
GetClientRect(HListBox, TRcList);
GetClientRect(HStatic, TRcChan);
Browser.SetBounds(-1, -1, TRcChan.right + TRcList.right + 5, TRcChan.bottom + 5);
Browser.Navigate('c:\');
StrCopy(data, 'S_OK');
result:=3;
end;
exports hidewin;
begin
end. |
Partager