I apologize in advance if there's a thread lurking somewhere that contains the information I'm looking for. I searched. Honestly, I did.

I have a QWidget subclass which is meant to be the area where a DirectShow VMR9 draws its video output. The application is working perfectly--all of the DirectShow stuff is wired up happily and the VMR9 is drawing on my QWidget subclass. The problem is that when resizing the window, I'm getting a lot of flicker in the redraw. It looks to me like Qt and DirectShow are having a race during repainting. It looks like Qt is clearing the widget, and then DirectShow is repainting afterward. In my QWidget subclass I have a paintEvent() method something like this:

Qt Code:
  1. void VideoWidget::paintEvent(QPaintEvent*) {
  2. RECT pos;
  3. pos.top = 0;
  4. pos.left = 0;
  5. pos.bottom = height() - 1;
  6. pos.right = width() - 1;
  7. _impl->vmrWc->SetVideoPosition(NULL, &pos);
  8. HWND hWnd = (HWND) winId();
  9. HDC hDC = GetDC(hWnd);
  10. _impl->vmrWc->RepaintVideo(hWnd, hDC);
  11. }
To copy to clipboard, switch view to plain text mode 

"_impl->vmrWc" refers to the IVMRWindowlessControl9 for my VMR9 renderer.

Is there something I should be doing differently with my QWidget subclass to provoke it to not try to redraw the widget's contents?

Thanks in advance...
Michael