For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

OpenCascade With CWinAppEx

netguru's picture
Forums: 

Hello I am Newbie for Opencascade.
I manage to run Opencascade sample with vs2008.Now i make a testing application which is using cwinappex class. my declaration is

class CTest2App : public CWinAppEx,public OCC_3dApp

but it gives error
So what is wrong with it.

P Dolbey's picture

You need to give more details - what is the error?

netguru's picture

error C2594: 'static_cast' : ambiguous conversions from 'void (__thiscall CTest2App::* )(void)' to 'AFX_PMSG'
error C2385: ambiguous access of 'SetRegistryKey'
1> could be the 'SetRegistryKey' in base 'CWinApp'
1> or could be the 'SetRegistryKey' in base 'CWinApp'

P Dolbey's picture

Well I suspect that the line that caused the first error is not the one you highlighted as there is no static_cast. I'd need to see the full code and error output to give more advice. l will point out that this is an MFC problem, not OCCT. You will get some possible answers by searching google for AFX_PMSG (I've proofed this), or by going to some of the MS/MFC forums.

Pete

netguru's picture

Thanks For Kind Reply.
I know that this is not the problem of OCCT. I know that OCC_3dApp is based on CWinApp. Now i want to know that to make a application based on CWinAPPEx Support than it is possible to do so or not. I just take a application wizard to make mdi application with ribbon support in vs2008. And than just add this.
#include
class CTest2App : public CWinAppEx,public OCC_3dApp
however i add necessory support for occt library and its include files. but while compiling it gives error. and i think OCC_3dApp is based on CWinApp and i derived my testapp from CWinAppEx so that make a problem. but i want to use ribbon support in my occt application that what i have to do.
again thanks for your kind help.

P Dolbey's picture

From what I've googled I suspect the problem is in the definition of some of the On_command handlers in the OCC_3dApp class.

Pete

netguru's picture

Thanks For Kind Reply
Finally i managed to run opencascade sample with vc++9.0 and its dockable pane.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.