[vtkusers] vtkMDI + SetParentId() + SetWindowId()
John Platt
jcplatt at lineone.net
Wed Mar 3 09:54:25 EST 2004
Hi all,
Following the recent thread on the MFC vtkMDI sample, I am still not
certain on the merits of using both SetParentId() & SetWindowId() or
just SetParentId().
If SetWindowId() is not used, vtk creates its own window and replaces
the WndProc() with vtkHandleMessage(). Since MFC has not created this
window (it has no CWnd derived object matching the hWnd), all messages
are routed directly to vtkHandleMessage(). CVtkMDIView::WindowProc() is
not required and will not capture messages handled by vtk. To get at
these messages, presumably, an observer can be added to the render
window interactor. However, the MFC created view coincident with the vtk
window appears a redundant overhead?
If SetWindowId() is used, CVtkMDIView::WindowProc() must be supplied to
direct the messages to vtkHandleMessage2(). It would be nice if this
could be used without knowing what messages it should handle (as I think
Ingo is suggesting). There is the temptation to try to get vtk to draw
into any window style which may be unsuitable for OpenGL.
Unfortunately, I am not an expert on MFC, VTK or OpenGL to make any
recommendation, and, indeed, the above diagnosis may be incorrect but I
think the cause is worthy.
All comments welcome.
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040303/769bcd4f/attachment.htm>
More information about the vtkusers
mailing list