Mon, 01/03/2011 - 10:38
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();
myView->SetWindow(aWNTWindow);
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)
{
Assign(aHandle.Access());
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
Mon, 01/03/2011 - 21:26
Hi yeon cheol,
Did you take a look at the mfc examples?
Venu
Tue, 01/04/2011 - 07:51
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
Sun, 02/10/2013 - 03:46
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
cheers