Do I have to use cvNamedWindow for even handle?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Do I have to use cvNamedWindow for even handle?

moxran
I am trying to display video captured from a webcame on a MFC
picturebox, while still using HighGui to retrieve frames from camera.
 That means I am not using cvNamedWindow to display the video frame.
A while loop is used to retrieve and display frames, and inside the
loop there is cvWaitKey(10) for capturing any events. However, I found
that if I am not using cvNamedWindow to create a HighGui window, the
main window (created using MFC) won't be able to capture events from
keyboard or mouse, that say, the application will hang if there is any
button event or mouse event, like trying to close the window.  This
can be solved by creating a window with cvNamedWindow, which I don't
want to have (I want the display in my main window).  

Or is there any way to capture events not using cvWaitKey?
Can anyone help?  Thank you very much!