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(),
Quantity_NOC_GRAY);

Hope that helps,

Chris

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..
S.Vijayaragavan,
vjyragavan@yahoo.co.in

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,
S.Vijayaragavan.
vjyragavan@yahoo.co.in