<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>Hi,
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>Now, I'm
trying to do some projects by using MFC and vtk. It seems the
example for MFC MDI is some old.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>Is there any new VTK
examples with MFC?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>I have tried to do
event handling with MFC. There are some codes in the sample codes
vtkMDIView.cpp as:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>LRESULT
CVtkMDIView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
<BR>{<BR> switch (message)<BR> {<BR> //case
WM_PAINT: <BR> case WM_LBUTTONDOWN: <BR>
case WM_LBUTTONUP: <BR> case WM_MBUTTONDOWN:
<BR> case WM_MBUTTONUP: <BR> case
WM_RBUTTONDOWN: <BR> case WM_RBUTTONUP: <BR>
case WM_MOUSEMOVE:<BR> case WM_CHAR:<BR>
case WM_TIMER:<BR> if
(this->iren->GetInitialized())<BR>
{<BR> return
vtkHandleMessage2(this->m_hWnd, message, wParam, lParam,
this->iren);<BR>
}<BR> break;<BR> }<BR>
<BR> return CView::WindowProc(message, wParam,
lParam);<BR>}</SPAN></FONT><FONT face=Arial size=2><SPAN
class=863323702-06082004> </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>if I don't add this
kind of codes in my project, the mouse is still working. But the window can't
get any charactor inputing from keyborad. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>Now i added these
codes to my projects.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>If I just delete the
message WM_LBUTTONDOWN,... WM_MOUSEMOVE. leave WM_CHAR,
WM_TIMER.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>The window can get
keyboard keydown event. Does it mean the mouse event writing there is
redundant?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>Can any one
explain clearly how vtkWin32RenderWindowInteractor handles the Windows
Messages and events?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=863323702-06082004>any hints will be
helpful, thanks!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=863323702-06082004>Dennis </SPAN></FONT></DIV></BODY></HTML>