HINSTANCE hinstMSHTML = LoadLibrary(TEXT("MSHTML.DLL"));
if (hinstMSHTML == NULL)
{
// Error loading module -- fail as securely as possible
return;
}
SHOWHTMLDIALOGFN* pfnShowHTMLDialog;
pfnShowHTMLDialog = (SHOWHTMLDIALOGFN*)GetProcAddress(hinstMSHTML,
TEXT("ShowHTMLDialog"));
if (pfnShowHTMLDialog)
{
IMoniker *pURLMoniker;
BSTR bstrURL = SysAllocString(L"");
CreateURLMoniker(NULL, bstrURL, &pURLMoniker);
if (pURLMoniker)
{
(*pfnShowHTMLDialog)(NULL, pURLMoniker, NULL, (TCHAR*)L"dialogHeight: 700px; dialogWidth: 500px; edge: sunken; center: Yes; help: no; resizable: Yes; status: Yes;", NULL);
pURLMoniker->Release();
}
SysFreeString(bstrURL);
}
FreeLibrary(hinstMSHTML);
阅读(1336) | 评论(0) | 转发(0) |