Open Cascade in Dialog Based Application

Hello all...
Currently I am working in Viewer3D wizard provided by open cascade...Now I want to switch to Dialog Based Application..Is it possible to draw the things in Dialog Window...Till now i have drawn in Document/View....

kittystudy's picture

I also want to know how to realize, can anyone help me?
Thank you!

CloneX's picture

In MFC the following works:

In the dialog editor insert a CButton where you want the OCC view to be (CStatic would probably also work). Initializing OCC is the same, just use the CButton's HWND when creating the WNT_Window:

Handle(WNT_Window) aWNTWindow = new WNT_Window(myGraphicDevice, GetDlgItem(IDC_OCC_VIEW)->GetSafeHwnd(),

Hope that helps,


Vijayaragavan's picture

Hi Chris..
Thank you for your reply..I am not able to get what your saying.
Can u please send me a sample code for drawing any simple shape in Dialog based application..

It will be very helpful for my project..Please Help me..

Thanks in Advance..

Vijayaragavan's picture

Hi Chris..

I am new to Open Cascade..Can u please send me a sample code for drawing simple shapes in Dialog Based Application..

Thanks in Advance,