LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a handle to a destination window for user32.dll

I want to use the function "PostMessage" from the user32.dll. One input parameter to this DLL is a handle to the destination window, which should be an unsigned integer value. In LabVIEW I can get a (datalog file) reference to the window, but how can I use that for the DLL? Can I convert it to unsigned integer or do I have to configure the DLL access by choosing 'Adapt to Type'? Both doesn't seem to work...
0 Kudos
Message 1 of 2
(2,178 Views)
Dont use a datalog type. Wont do you any good. There are several ways to get the hWnd of the main LabVIEW application window. The easiest being getting it by name using another API function. Please see link below for some VIs to give you what you are looking for...

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EF4556A4E034080020E74861&p_node=DZ53008&p_submitted=N&p_rank=&p_answer=&p_source=External
0 Kudos
Message 2 of 2
(2,170 Views)