- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use WaitOnMouseEvent in a graphics program so that the user can look at a graph and click on the window when he's ready to proceed. After the plotting is finished, I use something like the following:
ikey = 9
istat = WaitOnMouseEvent( ikey, ibut, ix, iy )
In one application, it works right the FIRST time, but always
freezes on the second plot (which is done in a new window). It works in other applications. Does anyone have any idea what I could have done to make this happen? I am at a total loss.
--Andy Milman :: amilman@ieee.org
ikey = 9
istat = WaitOnMouseEvent( ikey, ibut, ix, iy )
In one application, it works right the FIRST time, but always
freezes on the second plot (which is done in a new window). It works in other applications. Does anyone have any idea what I could have done to make this happen? I am at a total loss.
--Andy Milman :: amilman@ieee.org
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the documentation , quote
WAITONMOUSEEVENT does not return until the specified mouse input is received from the user. While waiting for a mouse event to occur, the status bar changes to read "Mouse input pending in XXX " where XXX is the name of the window. When a mouse event occurs, the status bar returns to its previous value.
Note that a mouse event must happen in the window that had focus when WAITONMOUSEEVENT was initially called. Mouse events in other windows will not end the wait. Mouse events in other windows cause callbacks to be called for the other windows, if callbacks were previously registered for those windows.
unquote. What status bar message do you get? It should tell you what's happening. Also, why not use the
mouse event symbolic constants as the first argument, shown here extracted from DFLIB.F90?.
WAITONMOUSEEVENT does not return until the specified mouse input is received from the user. While waiting for a mouse event to occur, the status bar changes to read "Mouse input pending in XXX " where XXX is the name of the window. When a mouse event occurs, the status bar returns to its previous value.
Note that a mouse event must happen in the window that had focus when WAITONMOUSEEVENT was initially called. Mouse events in other windows will not end the wait. Mouse events in other windows cause callbacks to be called for the other windows, if callbacks were previously registered for those windows.
unquote. What status bar message do you get? It should tell you what's happening. Also, why not use the
mouse event symbolic constants as the first argument, shown here extracted from DFLIB.F90?.
INTEGER MOUSE$LBUTTONDOWN,MOUSE$MOVE,MOUSE$LBUTTONUP, & & MOUSE$RBUTTONDOWN,MOUSE$RBUTTONUP,MOUSE$LBUTTONDBLCLK, & & MOUSE$RBUTTONDBLCLK,MOUSE$KS_LBUTTON,MOUSE$KS_RBUTTON, & & MOUSE$KS_SHIFT,MOUSE$KS_CONTROL,MOUSE$BADUNIT, MOUSE$BADEVENT PARAMETER(MOUSE$LBUTTONDOWN = #1) PARAMETER(MOUSE$LBUTTONUP = #2) PARAMETER(MOUSE$LBUTTONDBLCLK = #4) PARAMETER(MOUSE$RBUTTONDOWN = #8) PARAMETER(MOUSE$RBUTTONUP = #10) PARAMETER(MOUSE$RBUTTONDBLCLK = #20) PARAMETER(MOUSE$MOVE = #40) PARAMETER(MOUSE$KS_LBUTTON = #1) PARAMETER(MOUSE$KS_RBUTTON = #2) PARAMETER(MOUSE$KS_SHIFT = #4) PARAMETER(MOUSE$KS_CONTROL = #8) PARAMETER(MOUSE$BADUNIT = -2) PARAMETER(MOUSE$BADEVENT = -1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have not said what you have done regarding REGISTERMOUSEEVENT, or quite waht you mean by "new window". It may be necessary to re-register the mouse events if you close a window and open it with the old unit number.
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page