Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How could I display an acquired image (with imaq functions) in a MFC application?

  Hi,
 
  I would like to do a MFC application where I could display the acquired images.
 
  I've seeing the samples installed at C:\Archivos de programa\National Instruments\NI-IMAQ\Sample\MSVC and all there are "Win32 applications". Maybe I have an old version of the imaq divers, but I don't think so. So, I write to ask you if you know where could I find a sample that displays images in a MFC application?
 
  Well, if you have not a sample but could tell me the idea to develope a MFC application using the imaq fuctions, I would appreciate your answer.
 
  Thanks!!!
0 Kudos
Message 1 of 4
(3,983 Views)
Hello Gare,

What do you mean when you say there are only "win32 applications"?

In my National Instruments\NI-IMAQ\Sample\MSVC directory, I see folders of Grab, Snap, and other examples.  Each folder contains the C, DSP, DSW, and H files for the MSVC example.  I have attached one of the Snap examples to this post.

These examples should install when you install the IMAQ driver.  You can modify your NI-IMAQ installation by going to Control Panel>>Add/Remove Programs>>National Instruments Software.  Click the Change Button.  Then select NI-IMAQ and click Modify.  Make sure that Microsoft Visual C Support, Microsoft Visual Basic Support, or Microsoft .NET Support is installed.  I am assuming you are using one of these to program.

Hope this helps!

Allen H.
0 Kudos
Message 2 of 4
(3,974 Views)

  Hi Allen,

  Thanks for write. I see the same folders you said there are at MSVC directory.Smiley Wink

  I think I didn't explain my problem as I wanted Smiley Sad. I will try again.  

  I'm working with Visual C++ 6.0; I was seeing that the samples use the "CreateWindow" function to create each button, label, and all window's controls at execution time. Well, I would like to design the window before execute the program (I want to do a MFC application); if I do it, I will need to know how to display the acquired image into the current "View" (I suppose I won't can call the "imgPlot" imaq function, isn't it true?)

  There's a function that draws pixels on a document's view, but I don't want to use that function because of the expend time. I would like to display images like "llgrab program" does it. Do you know an equivalent "imgPlot" function to use in MFC applications?

  I hope you could help me,

  thanks again!

0 Kudos
Message 3 of 4
(3,973 Views)
Hi Gare,

I was able to dig up an old example that does a Snap using Visual C++ and  MFC.  This example was written for version 2.5.5 of the IMAQ driver which is pretty old, but taking a look at it should help.

This example will temporarily be available at ftp://ftp.ni.com/outgoing/Snap_mfc.zip

Hope this helps!

Allen H.
0 Kudos
Message 4 of 4
(3,937 Views)