LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Integer to HWND conversion ??

Hi,

I am developing a project in LabWindows. A DLL function included in my project, which requires me to return the window handle associated with the main thread of my LabWindows/CVI application, is causing me the problem.

I have used the GetCVIWindowHandle() function as follow:

int WindowHandle;
WindowHandle = GetCVIWindowHandle ();

However, the DLL function (of C++ environment) requires a HWND data type. Is there anyway of doing it in LabWindows??

Thanks in advance.
0 Kudos
Message 1 of 3
(5,910 Views)
Just typecast it:

HWND WindowHandle;
WindowHandle = (HWND)GetCVIWindowHandle();


Don't forget to #include windows.h!

HTH, HAND,
Martin.
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 3
(5,910 Views)
Just to add to that, make sure that windows.h is included before all the other include statements.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 3 of 3
(5,910 Views)