Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiKnob - pointer not wiped correctly

Hi,

 

We are using several pointers inside of CNiKnob control to present statistic estimates of measured channel (avg, stddev, ...).  Pointers overlap each other and it work fine except of one problem shown in attached picture. As you see pointer border is not wiped correctly. We are able to reproduce this behaviour on any machine regardless of hardware and software configuration. Is any chance to solve that problem?

 

I'll appreciate any help.

Jaroslaw Przywieczerski

0 Kudos
Message 1 of 6
(5,784 Views)

Hey Jaroslaw,

That does look like incorrect behavior.  In order to try and figure out what is going on and what we can do to fix it, we will need a small reproducable example exhibiting this behavior.  If you can eliminate any hardware interaction as best as possible and shrink a program down to a small example, we can begin troubleshooting this issue.

Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 2 of 6
(5,768 Views)
In attachement you will find both sources and executable. After starting KnobTest.exe you will see gauge with 5 pointers. If you move thin one to the maximum the problem will appear. As I understand the problem pointers do not cover exactly other ones which are deeper.
JP
0 Kudos
Message 3 of 6
(5,757 Views)
I tried running the project, but I am getting the following linking errors.  Is there a dependent file such as a dll or anything that might be missing?
 
Linking...
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CCWKnob::GetRuntimeClass(void)const " (?GetRuntimeClass@CCWKnob@@UBEPAUCRuntimeClass@@XZ)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCWPointer::SetValue(struct tagVARIANT const & ) " ( ? SetValue@CCWPointer@@QAEXABUtagVARIANT@@@Z)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: struct tagVARIANT __thiscall CCWPointer::GetValue(void)" (?GetValue@CCWPointer@@QAE?AUtagVARIANT@@XZ)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCWPointer::SetStyle(long)" (?SetStyle@CCWPointer@@QAEXJ@Z)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCWPointer::SetFillStyle(long)" (?SetFillStyle@CCWPointer@@QAEXJ@Z)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCWPointer::SetFillColor(unsigned long)" (?SetFillColor@CCWPointer@@QAEXK@Z)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: class CCWPointer __thiscall CCWPointers::Add(void)" (?Add@CCWPointers@@QAE?AVCCWPointer@@XZ)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CCWPointers::RemoveAll(void)" (?RemoveAll@CCWPointers@@QAEXXZ)
KnobTestDlg.obj : error LNK2001: unresolved external symbol "public: class CCWPointers __thiscall CCWKnob::GetPointers(void)" (?GetPointers@CCWKnob@@QAE?AVCCWPointers@@XZ)
Debug/KnobTest.exe : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.
KnobTest.exe - 10 error(s), 0 warning(s)

Message Edited by AndrewMc on 12-05-2006 08:32 PM

Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 4 of 6
(5,751 Views)
Hi,
 
Our example was generated using Measurement Studio Wizzard. On this machine (with MStudio installed) linking is not a problem. As you you see the problem is with linking NI library.
Did you try executable? It was build using attached project.  Our whole source code is inside of 'CKnobTestDlg::OnInitDialog()', so you can easily check if control usage is ok or it is a bug in control implementation.
 
JP
0 Kudos
Message 5 of 6
(5,738 Views)

Hey JP,

I figured out what was going on.  When creating a Measurement Studio project in MFC, it is recommended that you either use the Measurement Studio Wizard for the project type, or that you add in the UI components using the Measurement Studio Components Wizard from the Measurement Studio toolbar.  Sometimes, the automatically generated wrappers for the ActiveX controls (CCW prefix) do not accurately portray everything in the control.  These wrappers are generated if the above method is not used. 

Now that I have the project working, I have reported the issue to R&D.  They now know of the issue and will see if they can do anything about it. 

Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 6 of 6
(5,716 Views)