취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

Popup menus

Hi, does anybody know of a way of producing popup menus in LabVIEW. I want
to create my own click menu over a picture say. Is there any activeX
control or windows dll to do this? Cheers, Tom.
0 포인트
1/4 메시지
3,292 조회수
Hi, Tom (or Karen?)

All Windows popup functionallity you need is found in the user32.dll in the winnt\system32 folder. Use the Call Library Function in LabVIEW to call it. The descriptions of the functions is found in the MSDN online:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_api_reference.asp

You are intressed in the "Menu" category and I would guess you need the following functions:

CreatePopupMenu - Creates the menu
AppendMenu - Adds item to the menu
TrackPopupMenu - Popups the menu and waits for a menu item to be selected
DestroyMenu - Destroys the menu
EnableMenuItem - Controls if an item is enabled or disabled

You might also need some functions to get the Window of the VI fronpanel (else
you do not know where to popup the menu). These functions are found in the "Window" category.

FindWindow - finds the Window pointer of a VI frontpanel
ClientToScreen - some coordiate transformations

The flags definitions and their numeric values are found in the "windows.h" file (search on the web).

Hope this help. Unfortunatly I do not have any LabVIEW code examples, but this is the way to to it (in Windows anyway).

Best regards,

Mattias Ericsson
Endevo
Gothenburg, Sweden
www.endevo.se
0 포인트
2/4 메시지
3,292 조회수
I attached example of my VIs for creating Popup menus.

Question about using these VIs send to

n_chernin@hotmail.com
3/4 메시지
3,292 조회수
Thanks Mattias,
Yes these functions seem to do everything i need. Quite a job to produce a
labview wrapper for them, will have a go some time. I will post the result
on this thread. Thanks again,
Tom.


> You are intressed in the "Menu" category and I would guess you need
> the following functions:
>
> CreatePopupMenu - Creates the menu
> AppendMenu - Adds item to the menu
> TrackPopupMenu - Popups the menu and waits for a menu item to be
> selected
> DestroyMenu - Destroys the menu
> EnableMenuItem - Controls if an item is enabled or disabled
>
> You might also need some functions to get the Window of the VI
> fronpanel (else you do not know where to popup the menu). These
> functions are found in the "Window" category.
>
> FindWindow - finds the Window p
ointer of a VI frontpanel
> ClientToScreen - some coordiate transformations
>
> The flags definitions and their numeric values are found in the
> "windows.h" file (search on the web).
>
> Hope this help. Unfortunatly I do not have any LabVIEW code examples,
> but this is the way to to it (in Windows anyway).
>
> Best regards,
>
> Mattias Ericsson
> Endevo
> Gothenburg, Sweden
> www.endevo.se
0 포인트
4/4 메시지
3,292 조회수