Note that there are some explanatory texts on larger screens.

plurals
  1. POEmbedded MSHTML: mouse wheel ignored
    primarykey
    data
    text
    <p>In my VC++ application I have an embedded browser (MSHTML). It works fine and handles the mouse properly (for instance, clicks and selects are processed OK). However, mouse wheel rotations over the embedded browser do not have any effect. This is my problem.</p> <p>I am not very familiar with the internals of MSHTML embedding, and OLE in general. This is an wxWidgets application (wxWidgets is a C++ GUI library), and I am making use of its IEHTMLWin component (which hosts an MSHTML control and wraps it in the wxWindow interface). However, I do have the source and am willing to do some debugging. </p> <p>Forgetting wxWidgets and speaking purely about OLE and MSHTML, what's the right place to start looking for the problem cause? I tried naive googling for variants of "mshtml mouse events" or "mshtml wheel", but didn't give any good pointers.</p> <p>Should you want to take a look at the code of IEHTMLWin, it can be browsed <a href="http://wxcode.cvs.sourceforge.net/viewvc/wxcode/wxCode/components/iehtmlwin/src/" rel="nofollow noreferrer">here</a>. The iehtmlwin.c file (1,5 k lines) has all the OLE-related code and implements all interfaces needed to host a web browser control. It's worth noting that mouse events don't proceed to the containing wxWindow at all (OnMouse is never called).</p> <p>{UPD} mshtml version: 6.00.2900.3314. Other applications that host this control (including IE) support the wheel. {/UPD}</p> <hr> <p>jdigital hint (regarding winspector) was very helpful. After some message sniffing, I realize that the problem is focus-related. A click on the browser control somehow does not set focus on the browser control (unlike, say, RichEdit), and WM_MOUSEWHEEL is not sent there. So the new problem is setting the focus.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload