MFC & vtkWriter problem
pahsieh at usgs.gov
pahsieh at usgs.gov
Sat Jan 22 03:13:36 EST 2000
Hi Asad:
Thanks for your response. However, I wasn't the one who posted
the question. It was Agris Klimkans <agris at phc.chalmers.se>.
I don't know if you cc'd him, so I am sending this message to him also.
Your suggested workarounds are also good alternatives to my suggestion
of rendering to memory. However I would disagree that the CFileDialog
should disappear upon return from DoModal, because screen repaint is
done on a separate thread and there is no guarentee that the repaint
occurs before the program executes the statement following DoModal.
I tested Agris's sample code on a machine with dual 550 MH processors and I
still got the dialog box! Also, as I mentioned, any other window that
might cover the vtk window (for example, a help window that always
stays on top) will get captured, so I think the safest thing to
do is to render to memory.
Regards,
Paul
> The CFileDialog should disappear when you return from the DoModal()
> function. which means that when you say
>
> if(dlg.DoModal()==IDOK)
>
> it means that the dialog after the if statement should have been already
> disappeared. Since you are saying that you are catching part of it, then
> your system is slower. One way around this is to initialize a timer for
half
> a second or so before capturing the screen which can gaurantee you that
the
> dialog will disappear before you capture the window.
>
> Another way to get around the problem is to post a window update message
> first (either using MFC or by issueing a Render command) and then capture
> the screen. I guess that this will force the window to update itself and
> remove the dialog before you capture the screen.
>
> good luck.
>
> ==================================
> Asad A. Abu-Tarif
> 3D Image Registration.
> Ph.D Student in Computer Engineering, Rensselaer Polytechnic Institute.
> 2104 Massachuasettes Ave, Apt 2C
> Troy, NY 12180
> Tel: (518) 270-1796
> tarifa at rpi.edu
> ==========================
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list