Admin Production ni-theme
Current Publication

GetCVIWindowHandleForCurrThread

LabWindows/CVI

GetCVIWindowHandleForCurrThread

intptr_t GetCVIWindowHandleForCurrThread (void);

Purpose

Returns the window handle associated with the current thread of your LabWindows/CVI application.

You can use this number as the hwnd parameter to the Windows SDK function PostMessage. For this action to work, call RegisterWinMsgCallback and GetCVIWindowHandle and then pass their return values (uMsg and hwnd) to the DLL. When the DLL wants to send a message, it calls PostMessage with these values. When LabWindows/CVI receives the message, it calls the callback function. For more information about PostMessage, refer to www.msdn.com.

Note   LabWindows/CVI can receive the message only when it is processing events. LabWindows/CVI processes events when it is waiting for user input. If the program running in LabWindows/CVI does not call RunUserInterface, GetUserEvent, or scanf, or if it does not return from a User Interface Library callback, events are not processed. To avoid this problem in the program, call the User Interface Library function ProcessSystemEvents periodically.

(Linux) This function is not supported.

Parameters

None.

Return Value

Name Type Description
windowHandle intptr_t The window handle associated with the current thread of your LabWindows/CVI application.

You can use this number as the hwnd parameter to the Windows PostMessage function. For more information about PostMessage, refer to www.msdn.com.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later