Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a VC++ dialog box in LabVIEW

Hi,
I'm not using Measurement Studio but this question is about VC++. I have created a regular DLL with MFC extension and I'm able to convert it to the .lsb format to use with the CIN in labview. My problem is that I know how to call single functions or different functions that I define but when it comes to calling DoModal to display a dialog box the whole thing crashes in labview. I was hoping you could point me in the right direction as to what I have to do to be able to pop up an MFC dialog in Labview. (What to do in VC++, and perhaps what kind of block diagram to have in labview to run it), Thanks in advance,
Alex
0 Kudos
Message 1 of 3
(4,298 Views)
Alex- I think I already posted an answer to your follow up question about doing this with a dll. Because of the threading problems, I'm not sure it will work with a CIN.
0 Kudos
Message 2 of 3
(4,298 Views)
Try using a non-MFC dialog box, and create a dll instead of a cin - probably not exactly what you want to do, but the odds of success should be much greater ;). Even a non-MFC dialog box from a cin would be better.

MFC only supports the STA (single thread apartment) model. I'm pretty sure LabView is free threaded - ie you must use the WTL (Windows Template Library, beta in the current Platform SDK) or the Win32 API which support that threading model.
0 Kudos
Message 3 of 3
(4,298 Views)