Redraw PictureControl dont work...
-
Good Morning, I got a small problem... I use 2 Picture Control boxes. the first box play a stream from my webcam, the second should be overlap the first, and show a grabbed edited frame. I just use m_webcam.ShowWindow(0) and m_pic.ShowWindow(1). The Problem is, after i called this, the Picturebox is empty. But when i minimize and maximize the window, the Picture is shown like i expected. Is there a way to redraw the picturebox?? :confused:
-
Good Morning, I got a small problem... I use 2 Picture Control boxes. the first box play a stream from my webcam, the second should be overlap the first, and show a grabbed edited frame. I just use m_webcam.ShowWindow(0) and m_pic.ShowWindow(1). The Problem is, after i called this, the Picturebox is empty. But when i minimize and maximize the window, the Picture is shown like i expected. Is there a way to redraw the picturebox?? :confused:
CWnd::Invalidate is used to force the redrawing ofa certain window or control. If that helps !
Our Philosophy, Mohammed Baqir Al Sadr
-
CWnd::Invalidate is used to force the redrawing ofa certain window or control. If that helps !
Our Philosophy, Mohammed Baqir Al Sadr
Thank you for your awnser. I tried it, but the problem is still the same :(
-
Thank you for your awnser. I tried it, but the problem is still the same :(
I am missing the details of your problem. But it is sure that you must take care in case for video streaming application where usually the redering window is asynchronously updated by a worker thread that fetches the video data, such that if a resize or a certain wm_paint happens on the main UI thread for the rendering window, the last picture is lost unles you do manually persist it each time the worker thread brings it, so to render it in the context of the ONPaint, or the OnDraw or any similar handler executing on the context of the main UI thread. I encountered this case in many contexts, the first with Windows RTC (videoconferencing).. Good luck !
Our Philosophy, Mohammed Baqir Al Sadr