Middle Mouse Wheel
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/07/2011 at 09:00, xxxxxxxx wrote:
Okay. I figured this out. I wanted to share my results with others as it may come in handy for you as well.
Here's the code I used to get it to work every time I click the second button.
win->MouseDragStart(button,mx,my,MOUSEDRAGFLAGS_DONTHIDEMOUSE|MOUSEDRAGFLAGS_NOMOVE); while (win->MouseDrag(&dx,&dy,&device)==MOUSEDRAGRESULT_CONTINUE) { if(dx == 0 && dy == 0) { GeSyncMessage(EVMSG_ASYNCEDITORMOVE); BaseContainer bc = BaseContainer(); win->BfGetInputEvent(BFM_INPUT_MOUSE, &bc); if (bc.GetLong(BFM_INPUT_CHANNEL) == BFM_INPUT_MOUSERIGHT) { GePrint("RIGHT BUTTON PRESSED"); } } }
I noticed that when I placed a GePrint() within the MouseDrag() loop that it would work perfectly.
This then led me to place this line:GeSyncMessage(EVMSG_ASYNCEDITORMOVE);
in to the code. and with that little addition it works great.. This works also with the middle mouse wheel.. Just replace
BFM_INPUT_MOUSERIGHT with BFM_INPUT_MOUSEWHEEL
Remember of course that this all works only if you are holding down the left mouse button.
Hope this is helpful for someone.
Thanks,
Shawn