开发者

Problem with SetCapture and IWebBrowser2 container

I have an OLE object of IWebBrowser2 wrapped in a window.

At some point I expand the window and its OLE object and I'd like it to collapse on external click (i.e. every click that is outside the web browser).

I use SetCapture on the window wrapper but from some reason, during the capture, the Webbrowser doesn't receive any mouse events (clicks,move etc...)

Any thoughts\ideas?

Th开发者_JAVA技巧anks,

Omer


Cite from SetCapture:

Sets the mouse capture to the specified window belonging to the current thread. SetCapture captures mouse input either when the mouse is over the capturing window, or when the mouse button was pressed while the mouse was over the capturing window and the button is still down. Only one window at a time can capture the mouse.

So you cannot use SetCapture on a window to actually capture clicks. It specifically for the case where the user clicks your window and moves the mouse out, while keeping the button pressed. So you will have to use another mechanism.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜