interface ICoreWebView2Environment9
interface ICoreWebView2Environment9
: public ICoreWebView2Environment8
A continuation of the ICoreWebView2Environment interface for creating CoreWebView2 ContextMenuItem objects.
Summary
Members | Descriptions |
---|---|
CreateContextMenuItem | Create a custom ContextMenuItem object to insert into the WebView context menu. |
Applies to
Product | Introduced |
---|---|
WebView2 Win32 | 1.0.1185.39 |
WebView2 Win32 Prerelease | 1.0.1189 |
Members
CreateContextMenuItem
Create a custom ContextMenuItem
object to insert into the WebView context menu.
public HRESULT CreateContextMenuItem(LPCWSTR label, IStream * iconStream, COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND kind, ICoreWebView2ContextMenuItem ** item)
CoreWebView2 will rewind the icon stream before decoding. There is a limit of 1000 active custom context menu items at a given time. Attempting to create more before deleting existing ones will fail with ERROR_NOT_ENOUGH_QUOTA. It is recommended to reuse ContextMenuItems across ContextMenuRequested events for performance. The returned ContextMenuItem object's IsEnabled
property will default to TRUE
and IsChecked
property will default to FALSE
. A CommandId
will be assigned to the ContextMenuItem object that's unique across active custom context menu items, but command ID values of deleted ContextMenuItems can be reassigned.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기