[vtkusers] Problem with getting mouse position.

Łukasz Tutaj ltutaj at wp.pl
Wed Aug 3 03:17:11 EDT 2005


Hi Mark,

Thank you for your answer. I've tried to use vtkImageViewer2  and 
displaying works quite good  (there is some error after quitting the 
program)  in wingdi.cpp file

CPaintDC::~CPaintDC()
{
   ASSERT(m_hDC != NULL);
   ASSERT(::IsWindow(m_hWnd));      // Error in this place

   ::EndPaint(m_hWnd, &m_ps);
   Detach();
}

However I still don't know how to get mouse position. I want to 
emphasise that I use MFC to provide GUI.
Maybe you can sent me some code to explain me how to get mouse position.

Łukasz


Mark Wyszomierski wrote:

>Hi Lukasz,
>
>I also display DICOM files, but I use vtkImageViewer2 to do that, and
>in this calss you can query the mouse location through the mapper
>class (if the mouse goes over the render window that is).
>
>Can I ask how you are displaying your DICOM images in your
>application? Are you using vtkImageViewer, or vtkImageViewer2?
>
>Mark
>
>On 8/1/05, Łukasz Tutaj <ltutaj at wp.pl> wrote:
>  
>
>>Hi vtk Users.
>>
>>My software displays on a screen DICOM files. I use MFC supporting
>>document/view architecture to provide GUI. I have a problem with getting
>>mouse position in places where picture from DICOM file is displayed. In
>>other places there is no problem because I use standard MFC OnMouseMove
>>function, but when a mouse cursor is above picture there is no response
>>about mouse position. My implementation is very similar to example
>>/Examples/GUI/Win32/vtkMFC/vtkMDI/vtkMDIView.cpp
>><http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/GUI/Win32/SampleMFC/vtkMFCRenderView.cpp?root=VTK&content-type=text/plain>,
>>I only added some code handling DICOM files displaying.
>>Thanks from any help.
>>
>>
>>
>>Łukasz
>>
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>    
>>





More information about the vtkusers mailing list