How to get grapicdriver in View?


I like to use graphic driver function in my mfc application, it doesn't give any error, but when i execute it crash!

When i debug the code it shows NULL in this portion;

myGraphicDriver = Handle(Graphic3d_GraphicDriver)::DownCast(((COCsdiApp*)AfxGetApp())->GetGraphicDevice()->GraphicDriver() );

How to get the graphic driver into the view?
I have to add any link?

2) if i use this code

myGraphicDevice = new Graphic3d_WNTGraphicDevice;
AfxMessageBox("Fatal Error During Graphic Initialisation");

new overloading operator can't take three parameters.

Can anybody help to solve this errors?


arkoala's picture

I have got the same problem. Only with VS2005 and debug mode.
It works fine in release mode but...

error C2661: 'Standard_Transient::operator new' : new overloading operator can't take three parameters

Our constructor has no parameters so I can't understand why that error raises

arkoala's picture

If anybody arrives here, the simple solution is there