NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Helper
Posts: 113
0 Kudos

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
Active Participant
Aaron Marks
Posts: 211
0 Kudos

Re: Displaying a VC++ dialog box in LabVIEW

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.
Member
MagmaiKH
Posts: 38
0 Kudos

Re: Displaying a VC++ dialog box in LabVIEW

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 :smileywink:. 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.
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page