LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

define hotkey in CVI 8.5

I have to define a hotkey in LabWindows CVI 8.5.
The problem is that the hotkey for the action I set have to work also, if the program isnt the active panel.
 
This mean, I use the udts380 to read the measurements from an instrument. I defined the "Write Data" button with "ctrl + w". Now im working in Excel and I  want to press "ctrl + w" while excel is the active window.
 
I hope someboy can help me.
 
 
 
greetings
0 Kudos
Message 1 of 4
(3,500 Views)
I think it's possible, but you'll have to use the Windows SDK to do this. I think the RegisterHotKey function might be able to help you.
 
You'll probably also need to use the RegisterWinMsgCallback CVI function, in order to receive the corresponding Windows message.
 
Luis
0 Kudos
Message 2 of 4
(3,475 Views)
Maybe you can gibe me a code example for  RegisterWinMsgCallback CVI function ?
 
I'm a beginner in C, sorry. 
 
thanks
0 Kudos
Message 3 of 4
(3,458 Views)
Although I don't have a sample handy for RegisterWinMsgCallback, you can look at samples\toolbox\msgdemo.prj. It uses InstallWinMsgCallback instead of RegisterWinMsgCallback, but the idea is the same, so you should also be able to use InstallWinMsgCallback as well. And there's also some sample code in the InstallWinMsgCallback function panel help.
 
Luis
0 Kudos
Message 4 of 4
(3,447 Views)