You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a C++ WebView2 project, when my WebView2 control occupies the entire area of the parent window,
how can I send a WM_MOUSELEAVE message to the WebView2 control when the mouse leaves the window?
I tried to track mouse leave events in the main window by handling WM_MOUSEMOVE :
And I attempted to send a WM_MOUSELEAVE message to the WebView2 control in the main window's WM_MOUSELEAVE handler like this:
auto m_compositionController = this->ctrl.try_query<ICoreWebView2CompositionController>();
m_compositionController->SendMouseInput(
static_cast<COREWEBVIEW2_MOUSE_EVENT_KIND>(WM_MOUSELEAVE),
static_cast<COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS>(GET_KEYSTATE_WPARAM(wParam)),
mouseData, point);
However, I found that since the WebView2 control occupies the entire area of the parent window, the parent window never receives the WM_MOUSEMOVE message at all.
So the parent window also doesn't receive the WM_MOUSELEAVE message.
What should I do?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
In a C++ WebView2 project, when my WebView2 control occupies the entire area of the parent window,
how can I send a WM_MOUSELEAVE message to the WebView2 control when the mouse leaves the window?
I tried to track mouse leave events in the main window by handling WM_MOUSEMOVE :
And I attempted to send a WM_MOUSELEAVE message to the WebView2 control in the main window's WM_MOUSELEAVE handler like this:
However, I found that since the WebView2 control occupies the entire area of the parent window, the parent window never receives the WM_MOUSEMOVE message at all.
So the parent window also doesn't receive the WM_MOUSELEAVE message.
What should I do?
Beta Was this translation helpful? Give feedback.
All reactions