LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Newbee: Can I use CVI controls in VC++???

Hello folks!

I'm totally new to CVI, but am used to VC++ 5.0 / 6.0

For a new project that includes lots of hardware stuff I would like to
combine the power of VC++ MFC and CVI.

- MFC gives me the best flexibility in designing my applications user
interface and I'm used to object orientated software design.

- CVI would save me a lot of time by providing powerful hardware interfaces
and easy to use controls.

I've created a test project with VC++ 6.0. It was simple to include a RS232
interface (just a test). I only needed to include "RS232.h","CVirtE.h",
"CVIDef.h", and cvirt.lib" to my project.

Now I'm trying to include CVI controls like an analog meter to a VC++ test
dialog...

Does anyone of you can give m
e a short insight on how to do that or can
provide links to articles about this topic?

Any help is appreciated!

Ciao

Henryk
0 Kudos
Message 1 of 3
(3,406 Views)
It would be very difficult to include CVI controls in VC++ dialogs. VC++
dialogs follow a completely different model where every control is its own
window, which is unlike CVI. You can mix CVI dialogs and MFC dialogs/views
in the same project, but not CVI controls on MFC dialogs/views. There is
a very good solution for you though. CVI is now sold in a suite of products
called Measurement Studio which has tools for VC++ and VB in it. It includes
a set of UI controls for VC++ MFC programs that are similar to the set in
CVI. If you are using the latest version of CVI (5.5) it is on the same
CD and called ComponentWorks++. If you are using an older version of CVI,
you can upgrade and get the latest CVI with all of Measurement Studio for
only $295. For more info
on Measurement Studio, go to: http://www.ni.com/mstudio/.

Best Regards,

Chris Matthews
Measurement Studio Support Manager

"Henryk Mueller" wrote:
>Hello folks!>>I'm totally new to CVI, but am used to VC++ 5.0 / 6.0>>For
a new project that includes lots of hardware stuff I would like to>combine
the power of VC++ MFC and CVI.>>- MFC gives me the best flexibility in designing
my applications user>interface and I'm used to object orientated software
design.>>- CVI would save me a lot of time by providing powerful hardware
interfaces>and easy to use controls.>>I've created a test project with VC++
6.0. It was simple to include a RS232>interface (just a test). I only needed
to include "RS232.h","CVirtE.h",>"CVIDef.h", and cvirt.lib" to my project.>>Now
I'm trying to include CVI controls like an analog meter to a VC++ test>dialog...>>Does
anyone of you can give me a short insight on how to do that or can>provide
links to articles about this topic?>>Any help is appr
eciated!>>Ciao>>Henryk>>>>
0 Kudos
Message 2 of 3
(3,406 Views)
Thank you for your answer! That's what I was "afraid" of. At a first glance
I could see that the controls work totally different to VC++ dialog items
(Callbacks and stuff).

I found a possibility to work around this problem:

One need to create a panel without a frame and title that is exactly as big
as the control and include this panel into a VC++ project. Then you can lay
the panel over a dialog so that it looks like the control is part of the
dialog. But it's takes a lot of effort to let the control behave like a
"real" dialog item. For example you have to move the panel every time the
user moves the dialog.

As far as I know we have only CVI 5.0.1 in house. I guess the discussed
problem is a good reason to upgrade to CVI 5.5... ;o)

Ciao

Henryk
0 Kudos
Message 3 of 3
(3,406 Views)