03-14-2013 06:29 AM
Hello,
I'm using a CNiGraph control in my dialogue window, and I whant to return FALSE 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-15-2013 02:14 PM
Hi caesar_dany,
I believe that you could capture the F1 action with the KeyDown Event. I have included a link below to the msdn page describing the function. I hope this helps!
KeyDown Event: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx
Regards,
Jason D
Applications Engineer
National Instruments
03-18-2013 02:52 AM
Thanks Jason, it was verry helpful.