读书人

急web控件如何让网页的对话框不显示

发布时间: 2012-02-21 16:26:23 作者: rapoo

急急急急!!!web控件怎么让网页的对话框不显示
我啦了一个web控件 让他加载一个网站 但是加载完成网站的时候他就弹出一个对话框 怎么不让这个对话框显示出来


或者说怎么让程序自动把这个对话框点掉~~~~~~

[解决办法]
IWebBrowser2::Silent Property

--------------------------------------------

Sets or gets a value that indicates whether the object can display dialog boxes.

Syntax

HRESULT IWebBrowser2::get_Silent(VARIANT_BOOL *pbSilent);HRESULT IWebBrowser2::put_Silent(VARIANT_BOOL bSilent);
Parameters

pbSilent
Pointer to a variable of type VARIANT_BOOL that receives one of the values listed in Possible Values.
bSilent
VARIANT_BOOL that specifies one of the values listed in Possible Values.
Possible Values

VARIANT_FALSE Default. Dialog boxes and messages can be displayed. Critical errors and security alerts are not supressed.
VARIANT_TRUE Dialog boxes are not displayed.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

读书人网 >VC/MFC

热点推荐