LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get window message

I want to get a window message its wParam is a string not a char.But in InstallWinMsgCallback( ),the third parameter is unsigned int.How can I get it?Thank you!
0 Kudos
Message 1 of 2
(3,621 Views)
Howdy grassgnd,
 
First off, I would suggest reading How Do CVI Panels Process Windows Messages? to gather some basic information on how CVI processes Windows messages.
 
So the overview that is discussed in the link above is that the OS sends a message to the WinProc (Windows Procedure) along with some parameters including the 2 message data parameters, WParam and LParam (data types of unsigned int and long).  These parameter both specify additional information based on the message received. The message sent to the WinProc is of type integer and is usually expressed in constant form such as WM_CLOSE, WM_PAINT, etc.   
 
In our case, we are using InstallWinMsgCallback which installs a callback function for a specific Windows message posted or sent to a LabWindows/CVI panel. The second parameter of InstallWinMsgCallback contains the message (integer).
 
Refer to the CVI shipping example msgdemo that demonstrates how to enable your panel to respond to any Windows message it receives.  Locate this by selecting Help >> Example Finder >> Index tab (type the text "message").
 
Hope this clarifies a little bit for you.
 
Best Regards,
Jonathan N.
National Instruments
Message 2 of 2
(3,587 Views)