LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows event

Hi.

I am trying to get a function to respond to a
windows event (Windows NT). The functions I am
using to do this is GetCVIWindowHandle and then
RegisterWinMsgCallback to register the callback
function to respond to the event, but it won't
work.
Do anybody know how I should catch a windows
event in LabWindows/CVI (4.0.1)? I should be very
happy if someone could help me solve this problem.

Best regards
Christian Akesson


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 2
(3,273 Views)
Don´t know if it will still apply to CVI 4.0 (and NT) but that´s how i do it.

In the receiving Application:
iMessage = RegisterWindowMessage(MY_EVENT_NAME);
RegisterWinMsgCallback (clb_MyEvent, MY_EVENT_NAME, 0, 0, &iCallbackID, 0);


And in the Calling Application:
iMessage = RegisterWindowMessage(MY_EVENT_NAME);
PostMessage(HWND_BROADCAST,iMessage,0,0);

Hope it helps.
0 Kudos
Message 2 of 2
(3,223 Views)