WebBrowser控件如何不弹出IE的右键菜单?

yaib57 2006-07-25 07:27:37
如题?
...全文
247 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lireng 2006-08-16
  • 打赏
  • 举报
回复
找了好久
simonzone 2006-07-27
  • 打赏
  • 举报
回复
Called by MSHTML to display a shortcut menu.

Syntax

HRESULT ShowContextMenu( DWORD dwID,
POINT *ppt,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved
);
Parameters

dwID
[in] DWORD that specifies the identifier of the shortcut menu to be displayed. This identifier is a bitwise shift of the value 0x1 by the shortcut menu values (e.g., CONTEXT_MENU_DEFAULT) defined in Mshtmhst.h.
0x2
value of (0x1 << CONTEXT_MENU_DEFAULT)
0x4
value of (0x1 << CONTEXT_MENU_CONTROL)
0x8
value of (0x1 << CONTEXT_MENU_TABLE)
0x10
value of (0x1 << CONTEXT_MENU_TEXTSELECT)
0x30
value of (0x1 << CONTEXT_MENU_ANCHOR)
0x20
value of (0x1 << CONTEXT_MENU_UNKNOWN)
ppt
[in] Pointer to a POINT structure containing the screen coordinates for the menu.
pcmdtReserved
[in] Pointer to the IUnknown of an IOleCommandTarget interface used to query command status and execute commands on this object.
pdispReserved
[in] Pointer to an IDispatch interface of the object at the screen coordinates specified in ppt. This allows a host to differentiate particular objects to provide more specific context.
Return Value

Returns one of the following values:

S_OK Host displayed its own user interface (UI). MSHTML will not attempt to display its UI.
S_FALSE Host did not display any UI. MSHTML will display its UI.
DOCHOST_E_UNKNOWN Menu identifier is unknown. MSHTML may attempt an alternative identifier from a previous version.
vercitti 2006-07-27
  • 打赏
  • 举报
回复
mshtml

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧