Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

As an alternative to building a new project to add Componen

tWorks capabilities for Visual C++ as detailed in the CW Readme can you choose Projects >> Add to project>> Components and controls >> CW DataSocket Control(National Instruments) from within Visual C++ and add the same functionality to an existing project?Is there any functionality that will be lost by doing it via this method (Measurement MFC DLL etc.) or will this approach work also?
0 Kudos
Message 1 of 2
(5,106 Views)
tWorks capabilities for Visual C++ as detailed in the CW Readme can you choose Projects >> Add to project>> Components and controls >> CW DataSocket Control(National Instruments) from within Visual C++ and add the same functionality to an existing project?Bill:

You can certainly add any of the ComponentWorks controls to your Microsoft Visual C++ project via the "Project -> Add to Project -> Components & Controls" method. However, using this method, Microsoft Visual C++ will generate wrapper classes for the controls that you add. These wrappers tend to be a little rough and difficult to work with because they use native ActiveX data types like VARIANTS. If you have Measurement Studio, then it would be in your interest to use the Tools for Visual C++ (ComponentWorks++) version of DataSocket, since this version is customized for Microsoft Visual C++ and works in terms of native C/C++ data types.

If you want to use the ComponentWorks version of DataSocket--with the generated C++ wrappers using native ActiveX datatypes--t
hen you can just add the controls as you suggest. However, adding Tools for Visual C++ (ComponentWorks++) classes to an existing project can be complicated. There is a knowledge base article that describes this process, though it is recommend to simply create a new Measurement Studio Microsoft Visual C++ application, and cut and paste your code into it.

Knowledge Base Article 1V982Q8M: How to Update an Existing Microsoft Visual C++ Project with the New Tools for Visual C++ Classes in Measurement Studio
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/0cb6707522e92c958625689e0052bb77?OpenDocument

Good Luck!

Chris Wood
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(5,106 Views)