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

please I have met the trouble during a week (myView)

yeon cheol Kang's picture

Hi. todays i have many worry about my code. i want to display the point in my code, so i creating a handle_V3d_Viewer. In C**Doc class generator, object of handle_V3d_viewer, myViewer, is initializing. there is no problem. referenced the documents, I read the follow sentences.

To Create 3D graphic objects and display them on the screen, follow the procedure below;

1. Create attribute : i already create, and no problem
2. Create a 3D Viewer : also, i create in my C**Doc class generator
3. Create a 3D View : i can't this procedure

Documents offer the follow example, so i type in my code, which function name is C***View::Create3DView( Handle_V3d_Viewer myViewer) ( I randomly write the function name)

Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = ((C**App *)AfxGetApp())->GetGraphicDevice();
Handle(WNT_Window) a WNTWindow;
aWNTWindow = new WNT_Window(theGraphicDevice, GetSafeHwnd());
myView = myViewer->CreateView();

The reason why i write a code upper side is follow

myView -> this object declare in the C**view as public, myView class is Handle_V3d_View
myViewer -> this object declare in the C**Doc as public, myViewer class is Handle_V3d_Viewer

when i complied the code, there is no error. but execute this, Access violation in follow senetence

Handle(V3d_View)& operator=(const handle(V3d_View)& aHandle)
return *this;

summary my question,

1. why don't act this code?

2. If i need to initialize the myView, where i do?

3. If someone have a good idea which is related with this problem, i wanna share the idea. if you shear, i please your kind

Happy new year and plz help me

Venugopal Gudimetla's picture

Hi yeon cheol,
Did you take a look at the mfc examples?


yeon cheol Kang's picture

thanks alot Venugopal. Your proposal is very helpful!!

i solve this problem. solution in the OCC_3dView.cpp.

Create a View at the OnInitialUpdate function of C***View class, i can display the gp_pnt.

Happy New year~ and very thanks

hero's picture

Dear yeon cheol Kang
I also got a project on MFC but I'm unable yet to create my 3D_Viewer .

any help would be appreciated