Controls do not recieve middle mouse button events occurring outside the client area.
Posted on 2011-02-18
I have a TImage-derived component to which I'm attempting to add middle-click panning functionality. It seems that middle mouse events do not get delivered to my component when the mouse cursor is outside of it's client area, like left and right mouse events do.
I've tried intercepting the WM_NCMBUTTONUP message using a message handler, and even overriding the WndProc function, and I still never see this message come through.
The component also does not seem to receive Mouse Move messages when the cursor is outside the client area and the middle button is down. It does receive the non-client Mouse Moves when the left or right button is down.
I can provide a small demo project if what I'm asking isn't clear enough.