拼命流血

拼命流血

C++博客 首页 新随笔 联系 聚合 管理
  8 Posts :: 22 Stories :: 3 Comments :: 0 Trackbacks
   MSDN Home >  MSDN Library >  Web Development >  Programming and Reusing the Browser >  SDK Documentation >  MSHTML Reference >  Functions

ShowHTMLDialog Function

Internet Development Index

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 IHTMLDialog::dialogArguments property. This parameter can be NULL.
pchOptions
Window ornaments for the dialog box. This parameter can be NULL or the address of a string that contains a combination of values, each separated by a semicolon (;). See the description of the features parameter of the IHTMLWindow2::showModalDialog method of the window object for detailed information.
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 IHTMLDialog::returnValue property. This parameter can be NULL.

Return Value

Returns S_OK if successful, or an error value 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. A full sample that demonstrates the usage of ShowHTMLDialog is available on the ShowHTMLDialog Sample Source Page.

security note Security Alert  Using LoadLibrary incorrectly can compromise the security of your application by loading the wrong dynamic-link library (DLL). Refer to the LoadLibrary documentation for information on how to correctly load DLLs with different versions of Microsoft Windows.

Example

The following example shows the most basic steps needed to load Mshtml.dll, obtain the address of ShowHTMLDialog using GetProcAddress, create a URL moniker, and call ShowHTMLDialog.

Show Example

Function Information

Stock Implementation mshtml.dll
Custom Implementation No
Header mshtmhst.h
Import library mshtml.dll
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows NT 4.0, Windows 95, Windows CE 4.0

See Also

Creating an HTML Resource

© 2006 Microsoft Corporation. All rights reserved.  Terms of Use | Trademarks | Privacy Statement
Microsoft
posted on 2006-03-24 14:52 拼命流血 阅读(377) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理