[vtkusers] Mixing vtk and OpenGL views with MFC

Martin Gardner mglistmail at totalise.co.uk
Wed Mar 12 14:45:57 EST 2003


Hi Nigel,

I just tried what you suggested and it doesn't make any difference.
It seems as though the vtk window is being moved out of its allocated 
pane in the main frame and is interfering with the other views in the frame.

Thanks for your help.

Martin

Nigel Nunn wrote:
> Hi Martin, 
>  
> Do your views have the style flag "CS_OWNDC"?  Only guessing, 
> but giving each view its own DC may help avoid tangling their 
> display contexts... 
> 
> BOOL vtkMFCRenderView::PreCreateWindow(CREATESTRUCT& cs) 
> {
>   cs.style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CS_OWNDC;
>   return CView::PreCreateWindow(cs);
> }





More information about the vtkusers mailing list