03-15-2013 02:43 AM
Hello,
I'm using a CNiGraph (from Measurement Studio 8 in Visual c++ standard edition) control in my CDialog window, and I whant to return FALSE or another message when I'm pressing the F1 key or when it's receiving a WM_HELPINFO message.
My first option was to make a derived class (CNiGraphEx) from CNiGraph, but I'm getting the following errors:
NiGraphEx.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall NI::CNiGraph::CreateControl(char const *,char const *,unsigned long,struct tagRECT const &,class CWnd *,unsigned int,class CFile *,int,wchar_t *)" (?CreateControl@CNiGraph@NI@@UAEHPBD0KABUtagRECT@@PAVCWnd@@IPAVCFile@@HPA_W@Z)
NiGraphEx.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall NI::CNiGraph::CreateControl(struct _GUID const &,char const *,unsigned long,struct tagRECT const &,class CWnd *,unsigned int,class CFile *,int,wchar_t *)" (?CreateControl@CNiGraph@NI@@UAEHABU_GUID@@PBDKABUtagRECT@@PAVCWnd@@IPAVCFile@@HPA_W@Z)
NiGraphEx.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall NI::CNiGraph::Create(char const *,unsigned long,struct tagRECT const &,class CWnd *,unsigned int,class CFile *,int,wchar_t *)" (?Create@CNiGraph@NI@@UAEHPBDKABUtagRECT@@PAVCWnd@@IPAVCFile@@HPA_W@Z)
Release/daq4502R.exe : fatal error LNK1120: 3 unresolved externals
The second option was to add a new class with 'MFC class from ActiveX Control' using '_DCWGraph' interface, but I'm not able to use all the CNiGraph functions with the new class.
Can anyone help me with this problem?
Thanks.
03-18-2013 02:58 AM
Sorry for my double post, I'm more a c++ programmer not a .net
Jason's ideea was very helpful, but let's saying that I have multiple objects in my application from Measurement Studio (one CNiGraph, 3 CNiButton, 3 CNiNumEdit and one CNiSlide), that mean that I have to capture the same "KeyDown" event for each object.
I think it would verry helpful if I can make new derived classes from those objects I want to use, without writting the same stuff over and over again, each time I want to use a object.
03-19-2013 10:33 AM
Are you making calls to our DAQmx or 488.2 driver? If so, you may have to link the NIDAQmx library to your project. Please refer to this KnowledgeBase article for more information.