I am playing a video using OpenCV, my problem is since I am using a loop until the video ends, and I use cvWaitKey to check if 'q' was hit. I have registered a callback function to handle mouse events such that when the window showing the video is clicked program exits. I had to do all of this because closing the window by clicking the close button (cross) would not kill the program like it usually works for dialog based programs in VC++.
I am using OpenCV 2.0 and VC++ 2008.
Any idea how I handle this?
Thanks