LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenDocumentInDefaultViewer

How do I obtain the window handle associated with OpenDocumentIndefaultViewer?

0 Kudos
Message 1 of 3
(2,571 Views)

Hi cjp1,

 

Why do you need the window handle once it's been opened? Are you trying to close/modify the window after it's already open? If so, OpenDocumentInDefaultViewer doesn't provide a window handle as a return value, just a 0 if the operation succeeds. Another option to retrieve the handle of the window immediately after opening it is to use GetPanelAttribute. I've provided a link below to another forum post with a similar question that shows how to use this function to get the window handle.

 

https://forums.ni.com/t5/LabWindows-CVI/How-to-get-the-window-handle-of-a-panel/td-p/655208

Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(2,539 Views)

Thanks for the reply.

I was able to get the window handle using windows API FindWindow and then 

SetWindowPos. I wanted to move the window opened with OpenDocumentInDefaultViewer  to a

second monitor.

0 Kudos
Message 3 of 3
(2,515 Views)