Hi, i am trying to use a third party ActiveX control in my C++ code. I do not know if the control can also be used from C++ since there was only a Visual Basic example with it.
In the stdafx.h i added the following lines:
The compiler gives some errors because it does not recognize some type declarations:Code:#import <StrainBUSterNet.ocx> rename_namespace("StrainBUSterNetNameSpace") using namespace StrainBUSterNetNameSpace;
Is there a way to prevent these errors?Code:c:\local projects\uitest\debug\strainbusternet.tlh(208) : error C2146: syntax error : missing ';' before identifier 'Font' c:\local projects\uitest\debug\strainbusternet.tlh(208) : error C2501: 'FontPtr' : missing storage-class or type specifiers c:\local projects\uitest\debug\strainbusternet.tlh(208) : error C2501: 'Font' : missing storage-class or type specifiers c:\local projects\uitest\debug\strainbusternet.tlh(628) : error C2146: syntax error : missing ';' before identifier 'GetFont' c:\local projects\uitest\debug\strainbusternet.tlh(628) : error C2501: 'FontPtr' : missing storage-class or type specifiers c:\local projects\uitest\debug\strainbusternet.tli(591) : error C2143: syntax error : missing ';' before 'tag::id' c:\local projects\uitest\debug\strainbusternet.tli(591) : error C2433: 'FontPtr' : 'inline' not permitted on data declarations c:\local projects\uitest\debug\strainbusternet.tli(591) : error C2501: 'FontPtr' : missing storage-class or type specifiers c:\local projects\uitest\debug\strainbusternet.tli(591) : fatal error C1004: unexpected end of file found
For example the first error about Font refers to this definition in the .tlh file generated by the compiler:
Some help is appreciated.Code:struct __declspec(uuid("75d210d3-8272-11d5-b562-00a024338af6")) _DStrainbusterNet : IDispatch { // // Property data // ... FontPtr Font; ... };





Reply With Quote