Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CCWKnob and CNiKnob

Hi,

I'm a new user of ComponentWorks++.
When I insert an activeX control (CWknob from the registered activeX) in my project and use it on a dialog, the class associated with the control is CCWknob and not CNiKnob ?
Then I have problems with the CNiVariant type.

Any suggestions

Thanks
ArnO
0 Kudos
Message 1 of 7
(3,901 Views)
Which version of Measurement Studio are you using? How did you create your project? Did you use the MFC application wizard or did you use the NI Measurement Studio AppWizard?

- Elton
0 Kudos
Message 2 of 7
(3,901 Views)
I use ComponentWorks v1.0.
The project was build with MFC application wizard. If I use NI Measurement studio AppWizard there is no problem, I can use CNiKnob. With MFC and the Project/add to project/component and control, I select CWKnob on the registered activeX. Then Visual build a wrapper class called CCWKnob. If I want to add a member variable attached with the control i must use CCWknob.
0 Kudos
Message 3 of 7
(3,901 Views)
There is information that needs to be added to the project file in order to get this to work. The NI Measurement Studio AppWizard adds this information at the time that it creates the project. There is an add-in in Measurement Studio 6.0 that will add the appropriate information to existing projects, so the easiest way to fix this would be to upgrade to Measurement Studio 6.0 and use the Add/Remove Components Wizard. Otherwise, you will need to create a new project with the NI Measurement Studio AppWizard and move your source files to the new project to get this to work automatically. If that's too much work, you create a temp project with the NI Measurement Studio AppWizard, add a variable and look at how the member variable is added, how the
AFX_DATA_MAP is updated, etc., and make the changes manually in your project.

- Elton
0 Kudos
Message 4 of 7
(3,901 Views)
I try to make an update with the informations provided at http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/0cb6707522e92c958625689e0052bb77?OpenDocument
I see the new CNi.. class but when i try to access my dialog class (containing knob control) via ClassWizard i have the following message :
Parsing error : identifier expected
Input line : "protected"
There is no problem with other dialog class.
An idea ?

ArnO
0 Kudos
Message 5 of 7
(3,901 Views)
My guess is that something was edited incorrectly when the you manually modified the project file. I suggest either going through the steps again or try one of the suggestions in my previous post above.

- Elton
0 Kudos
Message 6 of 7
(3,901 Views)
I have no more error message but if i want to add a member to my class associated with the knob, i only have the CCWknob class instead of the CNiKnob !!!
How can I upgrade my Measurement Studio Software ?
0 Kudos
Message 7 of 7
(3,901 Views)