Getting right mouse events in windows with a menu bar

This forum is for general developer support questions.
Post Reply
softwarefailure
Posts: 112
Joined: Fri Feb 14, 2014 10:29 pm

Getting right mouse events in windows with a menu bar

Post by softwarefailure »

Is there a convenient way to get right mouse button events (i.e. MENUDOWN and MENUUP) in windows with a menu bar? Currently, I need to set WA_RMBTrap to catch those events but then menus don't work any more and without WA_RMBTrap menus work, but I don't get RMB events.
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: Getting right mouse events in windows with a menu bar

Post by thomasrapp »

Set WFLG_RMPTRAP dynamically depending on mouse position (use WFLG_REPORTMOUSE and IDCMP_MOUSEMOVE).
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Getting right mouse events in windows with a menu bar

Post by broadblues »

@Thomas

Yes indeed, that's exactly what PPaint does, the RMB trapped everywhere except when directly over the menu bar.
softwarefailure
Posts: 112
Joined: Fri Feb 14, 2014 10:29 pm

Re: Getting right mouse events in windows with a menu bar

Post by softwarefailure »

Thanks, that does the trick.
Post Reply