10-14-2018 12:01 PM
How do I obtain the window handle associated with OpenDocumentIndefaultViewer?
10-15-2018 12:53 PM
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
10-23-2018 04:28 PM
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.