From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I'm trying to separate click events (both left and right) from shift-click, ctrl-click and shift-ctrl-click. This for a graph that has zooming enabled. When I'm in the callback function in VAL_LEFT_CLICK, how can I know if shift or Ctrl is pressed ? I looked at the various keyboard functions and code samples but they all seem to assume that another key is pressed (they respond to EVENT_KEYPRESS events). The callback data doesn't contain info on keys... -- Guillaume Dargaud http://www.gdargaud.net/ "The problem with computers is they do what you tell them." - Attribution unknown.
Look at the sample project ..\samples\userint\moustate.prj that ships with CVI. It calls GetGlobalMouseState (defined in userint.h) in a timer callback to check VAL_SHIFT_MODIFIER (shift) and VAL_MENUKEY_MODIFIER (Control), but you could call it on a CLICK event.
> GetGlobalMouseState Thanks. I thought I'd searched all the functions with mouse in their name... Not so !
BTW: I'm just trying out CVI 7.0: why does the source code browser window disappear each time I double click on some of its content ? It's annoying. -- Guillaume Dargaud http://www.gdargaud.net/ C /n./: A programming language that is sort of like Pascal except more like assembly except that it isn't very much like either one, or anything else. It is either the best language available to the art today, or it isn't. - Ray Simard.