?? ushowhtml.pas
字號:
unit UShowHTML;
interface
uses
ComObj,ActiveX,Windows,Sysutils,Classes,Forms;
procedure LibShowHTMLDialog(ParentHandle: HWND; Moniker: IMoniker;
DialogArguments: PVariant; Options: PWideChar; ReturnValue: PVariant);
type
TShowHTMLDialogLibFunc = function (hwndParent: HWND; Moniker: IMoniker;
pvarArgIn: PVariant; pchOptions: PWideChar; pvarArgOut: PVariant):
HResult; stdcall;
TCreateURLMonikerLibFunc = function (MkCtx: IMoniker; szURL: LPCWSTR; out mk: IMoniker):
HResult; stdcall;
implementation
procedure LibShowHTMLDialog(ParentHandle: HWND; Moniker: IMoniker;
DialogArguments: PVariant; Options: PWideChar; ReturnValue: PVariant);
const
LibName = 'MSHTML.DLL';
FuncName = 'ShowHTMLDialog';
var
LibInstance: THandle;
LibFunc: TShowHTMLDialogLibFunc;
Res: HResult;
begin
LibInstance := LoadLibrary(LibName);
if LibInstance = 0 then RaiseLastWin32Error;
try
LibFunc := TShowHTMLDialogLibFunc(GetProcAddress(LibInstance, FuncName));
if not Assigned(LibFunc) then
raise Exception.Create('MSHTML.DLL does not export ShowHTMLDialog');
Res := LibFunc(ParentHandle, Moniker, DialogArguments, Options, ReturnValue);
OleCheck(Res);
finally
FreeLibrary(LibInstance);
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -