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

2D-Viewer in MFC Dialog-based application

Sven Jungnickel's picture

Hi everybody,

has anybody an example for a dialog-based MFC application that implements a 2D-Viewer using a button like in the OCC 2DHLR MFC sample?

The problem I have is that the 2D view fills the complete dialog area and not only the area of the button, which I use as a dummy window. I have no clue what I am making wrong. This is how the view is created. IDC_2D_VIEW is the ID of the dummy button which should hold the 2D view.

Handle(WNT_Window) aWNTWindow = new WNT_Window( ((CIges2sgsApp*)AfxGetApp())->m_GraphicDevice,

Handle(WNT_WDriver) aDriver= new WNT_WDriver(aWNTWindow);

m_hView = new V2d_View(aDriver, ((CIges2sgsApp*)AfxGetApp())->m_Viewer);

Thanks for your help.

Regards, Sven