Creates a modal dialog box that displays HTML.
Syntax
HRESULT ShowHTMLDialog( HWND hwndParent, IMoniker *pMk, VARIANT *pvarArgIn, WCHAR *pchOptions, VARIANT *pvarArgOut );
Parameters
- hwndParent
- Handle to the parent of the dialog box.
- pMk
- Address of an IMoniker interface from which the HTML for the dialog box is loaded.
- pvarArgIn
- Address of a VARIANT structure that contains the input data for the dialog box. The data passed in this VARIANT is placed in the window object's dialogArguments property. This parameter can be NULL.
- pchOptions
- Address of a string that contains information about window ornaments for the dialog box.
- pvarArgOut
- Address of a VARIANT structure that contains the output data for the dialog box. This VARIANT receives the data that was placed in the window object's returnValue property. This parameter can be NULL.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
To use ShowHTMLDialog, which is implemented in Mshtml.dll, you need to dynamically load and call this function by using the LoadLibrary and GetProcAddress functions. The proper function type for ShowHTMLDialog is defined in Mshtmhst.h in the SHOWHTMLDIALOGFN type.
Function Information
Windows NT Use version 4.0 Windows Use Windows 95 and later Header Mshtmhst.h Import library Mshtml.dll Minimum availability Internet Explorer 4.0
Example
This example shows how to use LoadLibrary to load ShowHTMLDialog from Mshtml.dll and how to obtain the address of ShowHTMLDialog using GetProcAddress.
#include <windows.h> #include <mshtmhst.h> { HINSTANCE hinstMSHTML = LoadLibrary(TEXT("MSHTML.DLL")); if(hinstMSHTML) { SHOWHTMLDIALOGFN *pfnShowHTMLDialog; pfnShowHTMLDialog = (SHOWHTMLDIALOGFN*)GetProcAddress(hinstMSHTML, TEXT("ShowHTMLDialog")); if(pfnShowHTMLDialog) { /* Perform initialization and then call ShowHTMLDialog. */ } FreeLibrary(hinstMSHTML); } }
See Also