[vtkusers] How to run a MFC program using VTK widgets?

pnt1614 minpu.code at gmail.com
Wed Aug 22 03:22:07 EDT 2018


I make a MFC program using visual studio 2015 on windows 10 (64 bits) and VTK
8.1.1. In order to use VTK widgets, I need to start the VTK event loop, e.g.
Interactor->Start(). When I run/debug the program from the visual studio by
pressing F5 and everything works fine. But when I close the main window, the
program is still run and I must manually stop it. Maybe there is a conflict
between the VTK event loop and another event loop in MFC. I also have tried
to invoke the following statements when closing the main window but it does
not work.

1. Interactor->ExitEvent();
2. Interactor->ExitCallBack();
3. Interactor->TerminateApp(); // This function does nothing

Similarly, when I run the program by pressing Ctrl + F5 and after closing
the main window, the execution file is still run.

Is there anybody experienced this problem? Please, help me. Thank you.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list