Need help regrading making a control transparent when rendering video
-
I am using a picture box and a static control. I am trying to render the video on the picture box so whenever the video is render the picture box gets painted . I have placed a static control on top of the picture box and I have painted the frame of the static control. My problem is whenever the picture box is painted during render the video my static control also gets painted and the painted frame is washed out. I want the painted frame to remain the same even the picture box is painted.I getting flickers if i repaint the static control.
-
I am using a picture box and a static control. I am trying to render the video on the picture box so whenever the video is render the picture box gets painted . I have placed a static control on top of the picture box and I have painted the frame of the static control. My problem is whenever the picture box is painted during render the video my static control also gets painted and the painted frame is washed out. I want the painted frame to remain the same even the picture box is painted.I getting flickers if i repaint the static control.
I didnt underatsn why u r keeping the static control on top of the picture box but the way u can make static control trasparent is.. over ride the OnCtlColor handlr and do the followin HBRUSH UrDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hBr = CDialog::OnCtlColor( pDC, pWnd, nCtlColor ); if (nCtlColor == CTLCOLOR_DLG || nCtlColor == CTLCOLOR_STATIC) { //hBr = m_BkGndBrush; pDC->SetBkMode(TRANSPARENT); } return hBr; }