LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Win32 driven Popup Menu in LabVIEW Front Panel?

Hi,
I have created a VI that uses the Win32 API functions to display a popup meu on a VI's front panel. This isn't a decorated text box filled, showed and hidden with a property node, but a real windows system popup menu.
Anybody want to test it out? I'd appreciate any feedback, fixes or better implementations.
The VI uses several sub VIs encapsulate the API calls for convenience, error checking and appearance.
CreatePopupMenu is used to get a menu handle to a new empty menu structure. AppendMenu is called with the MF_BYPOSITION and MF_STRING constants to add menu items from a string array. TrackPopupMenu is called with the menu handle, a window handle (FindWindow gets the window handle), an
d the default flags for menu tracking. DestroyMenu is called to reclaim resources used by the menu.
I have used sub VIs and the DLL from the Windows Messageing Queue llb available on the Developer Zone. I have used several other handy API calls to convert screen coordinates to client window coordinates using both POINTs and RECTs, etc.
Hope y'all find this stuff useful, and if you get it to work on an NT or 2000 machine, let me know. If it doesn't work, let me know that too. I can tote a cussin' with the best of them.
John Wilson
Sanders Engineering & Analytical Services, Inc.
Mobile, AL
251-633-4120
johnwilson@pctechnician.net
0 Kudos
Message 1 of 3
(2,908 Views)
Win32 API driven Popup Menu on LabVIEW Front Panel Example VI Here!!
These are the VI files in a self extracting WinZip file. The zip file contains the following files:
LabVIEW Popup Menu Example.llb
Windows Messages for LabVIEW.dll
LabVIEW Popup Menu Readme.txt
I had to post an answer to a question to put the files out here!
Have fun!
0 Kudos
Message 2 of 3
(2,908 Views)
What about a LV 5.0 version? I am interested in the improvements of your work comparing with lvwutil32.
Thanks
0 Kudos
Message 3 of 3
(2,908 Views)