[vtkusers] vtk SDI is no response for mouseclicking?

zfjgo zfjgo at 126.com
Sun Nov 7 22:04:32 EST 2004


I am writing a windows application using VC++6 and MFC . I wrote the program base on the vtk window sample program "vtkSDI", and when I need to catch the mouse click event using classwizard like WM_LBUTTONDOWN, WM_RBUTTONDOWN or WM_MOUSEMOVE. could there be some suggestion to solve this problem?? I really need to work this program!

Thanks for your help.
The following is my code,but it does not work.

LRESULT CVtkSDIView::CallInteractor(UINT uMsg, WPARAM wParam, LPARAM lParam) 
{ 
    if (this->iren->GetInitialized()) 
    { 
		return vtkHandleMessage2(this->m_hWnd,uMsg,wParam,lParam,this->iren); 
    } 
	
    return 0; 
} 


void CVtkSDIView::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CString msg;
	msg="asdsadsadasdsad";
	AfxMessageBox(msg);
	this->CallInteractor(WM_LBUTTONDOWN,(WPARAM)(UINT)(nFlags),MAKELPARAM((point.x), (point.y)));

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041108/f0a6a3d1/attachment.htm>


More information about the vtkusers mailing list