Opencascade into a CWnd derived class

Hi,

I am starting with opencascade right now.
I have tested some functionallity to test engine and calculations and it goes very well.

My problem raises when I try to create my own window definition in my application.

I have tested in a dialog based app, and works fine with this instruction
Handle(WNT_Window) hWnd = new WNT_Window(myGraphicDriver,GetSafeHwnd());
I have passed to view (myView->SetWindow(hWnd);) the hWnd of the dialog.

When I try to have the same in a CWnd derived class which manages openCascade, some strange occurs in dialog repaint.

If I use a CStatic control, as the container of the scene, instead my CWnd derived class, the result is the same.

Dialog seems to have three different gray degrees: 1 dialog default system gray, 2 opencascade default gray where it renders scene, 3 an strange and different gray. It is like dialog onpaint was affected by opencascade or something like that.

Any idea about what is happening or what is wrong?

Thanks in advance. (It's a pity not to be able to post an screenshot)

arkoala's picture

redrawing in onPaint windows message seems to solve problem:

http://www.opencascade.org/org/forum/thread_6322/

Sorry for post resolved doubts