1. RightDown event
- Posted by Joseph Semmel <jsemmel at yahoo.com> Aug 05, 2003
- 411 views
I had a question on right mouse clicking. I saw an example program (ex20.exw) that uses a mouse procedure to trap right mouse clicks. This does not work on a program that uses a menu. Why does the OnClick routine not trap for right mouse clicks ? Here is my sample test case: include Win32lib.ew without warning constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) procedure Window1_onClick (integer self, integer event, sequence params)--params is () -- This checks for the Right mouse click event sequence lTitl, lMsg integer rc lTitl = "" lMsg = "Right click !" if event = RightDown then rc = message_box (lMsg, lTitl, 0) end if end procedure setHandler( Window1, w32HClick, routine_id("Window1_onClick")) WinMain( Window1,Normal ) Thank You Joseph Semmel
2. Re: RightDown event
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Aug 05, 2003
- 426 views
On Tue, 5 Aug 2003 19:20:06 +0000, Joseph Semmel <jsemmel at yahoo.com> wrote: >I had a question on right mouse clicking. I saw an example program=20 >(ex20.exw) that uses a mouse procedure to trap right mouse clicks. This=20 >does not work on a program that uses a menu. Why does the OnClick=20 >routine not trap for right mouse clicks ? w32HClick is the event triggered by left click, space when the focus is on the button, or the Alt key if it has one. To check for right clicks try w32HMouse. Pete
3. Re: RightDown event
- Posted by 1evan at sbcglobal.net Aug 06, 2003
- 404 views
This works for me: include win32lib.ew without warning constant win = createEx(Window,"Mouse Right Click Test",0,0,0,400,300,0,0) setWindowBackColor(win,Black) procedure RightClick(integer self, integer event, sequence params) if params[1] = RightUp then --Right mouse btn released setTextColor(win,White) setPenPos(win,5,5) wPuts(win,"Right Clicked!") end if end procedure setHandler(win,w32HMouse,routine_id("RightClick")) WinMain(win,Normal) Joseph Semmel wrote: > > > The Onmouse routine does not trap right clicks either. > > > Pete Lomax wrote: > >> >>On Tue, 5 Aug 2003 19:20:06 +0000, Joseph Semmel <jsemmel at yahoo.com> >>wrote: >> >> >>>I had a question on right mouse clicking. I saw an example program >>>(ex20.exw) that uses a mouse procedure to trap right mouse clicks. This >>>does not work on a program that uses a menu. Why does the OnClick >>>routine not trap for right mouse clicks ? >> >>w32HClick is the event triggered by left click, space when the focus >>is on the button, or the Alt key if it has one. >>To check for right clicks try w32HMouse. >> >>Pete >> > > > > TOPICA - Start your own email discussion group. FREE! > >
4. Re: RightDown event
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 06, 2003
- 407 views
On Wed, 06 Aug 2003 00:44:57 +0000 (08/06/03 10:44:57) , Joseph Semmel <jsemmel at yahoo.com> wrote: > > > The Onmouse routine does not trap right clicks either. > This is true. Microsoft has decided that a Right Button Click is not a default (supported) event. I assume this because neither the API, Visual Basic or MFC has support built in for this. However, the example code I sent earlier might do. I can easily enahnce win32lib to support it too. -- cheers, Derek Parnell
5. Re: RightDown event
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Aug 07, 2003
- 419 views
Joseph, There's a slightly complex way to right click on items in a list box in "RunDemos.exw" which comes with Win32Lib. The routine that includes doing it is "List_onMouse", though there's setup stuff before it, look for "right click" & you should find it. A Getz created the idea for me. And now that I look at it, there's a simpler example called, reasonably enough, "RtClick.exw" in the examples. And somehow, I forget how but it might be easy to find, I made right click on some of the buttons at the top of RunDemos work, too. HTH, Dan Moyer ----- Original Message ----- From: "Joseph Semmel" <jsemmel at yahoo.com> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, August 06, 2003 11:06 AM Subject: RE: RightDown event > > > That example works fine, my only question left is: Is there a way that > the right click will work for listboxes, text boxes and push buttons ? > > Derek Parnell wrote: > > > > > > On Wed, 06 Aug 2003 00:44:57 +0000 (08/06/03 10:44:57) > > , Joseph Semmel <jsemmel at yahoo.com> wrote: > > > > > > > > The Onmouse routine does not trap right clicks either. > > > > > > > This is true. Microsoft has decided that a Right Button Click is not a > > default (supported) event. I assume this because neither the API, Visual > > > > Basic or MFC has support built in for this. > > > > However, the example code I sent earlier might do. I can easily enahnce > > > > win32lib to support it too. > > > > -- > > > > cheers, > > Derek Parnell > > > > > > TOPICA - Start your own email discussion group. FREE! >