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

AwntWindow is null

helloha's picture
Forums: 

-------------The way to display on V3d_viewer------
Handle(Graphic3d_WNTGraphicDevice) TheGraphicDevice = new Graphic3d_WNTGraphicDevice();
TCollection_ExtendedString aName("OCC Viewer");
Handle(V3d_Viewer) myViewer = new V3d_Viewer(TheGraphicDevice,aName.ToExtString(),"");
myViewer->Init();
myViewer->SetDefaultLights();
myViewer->SetLightOn();
//
Handle(WNT_Window) AWNTWindow;
AWNTWindow = new WNT_Window(TheGraphicDevice,theApp.m_pMainWnd->GetSafeHwnd());
Handle(V3d_View) myView = myViewer->CreateView();
myView->SetWindow(AWNTWindow);

Cwnd->GetSafeHwnd() GetSafeHwnd()

..
i created the object of Cwnd in the following way.
could you plz pinpoint me if it's wrong
----------------------#include

class MFC_Tutorial_Window :public CFrameWnd
{
public:
MFC_Tutorial_Window()
{
Create(NULL,L"MFC Tutorial Part 1 CoderSource Window");
}
};

class MyApp :public CWinApp
{
MFC_Tutorial_Window *wnd;
public:
BOOL InitInstance()
{
wnd = new MFC_Tutorial_Window();
m_pMainWnd = wnd;
m_pMainWnd->ShowWindow(1);
return 1;
}
};

Handle(AIS_InteractiveContext) myAISContext = new AIS_InteractiveContext(myViewer);
Handle(AIS_Shape) aAISShape = new AIS_Shape(result);
myAISContext->Display(aAISShape);

it got the same error as the previous one has.
" 0xC0000005: Access violation writing location 0x00000004."

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.