LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I attach a callback function to an item on the system menu?

I have used the Windows SDK to add an item to the System menu, and I need to make something happen when I select the item. Can I attach a callback function? Do I have to process WM_SYSCOMMAND messages - and if so, how do I do that?
0 Kudos
Message 1 of 4
(3,160 Views)
You need to process the WM_SYSCOMMAND messages. You can register a callback to handle those messages with the function InstallWinMsgCallback in the Programmer's Toolbox (cvi\toolslib\toolbox\toolbox.fp).

Best Regards,

Chris Matthews
National Instruments
Message 2 of 4
(3,160 Views)
Thank you - your advice enabled me to solve my problem.
However, I coul dnot find any help in CVI for InstallWinMsgCallback(). This makes me wonder if there are other useful functions available that are not documented. If there are, can you point me towards them? Thank you!
0 Kudos
Message 3 of 4
(3,160 Views)
The functions included in the Programmer's Toolbox are not part of the CVI standard libraries. Most of the documentation for these functions is in the function panels for the functions. If you are ever looking for functionality you can't find in CVI's standard libraries, the programmer's toolbox is a good place to check before going to SDK functions.

Chris
0 Kudos
Message 4 of 4
(3,160 Views)