MFC 控件PictureControl 清除显示

MFC 控件PictureControl 清除显示


方法一:

  GetDlgItem(IDC_STATIC_CAPTURE_PIC)->ShowWindow(FALSE); 
  GetDlgItem(IDC_STATIC_CAPTURE_PIC)->ShowWindow(TRUE);

方法二

CStatic* pStatic = (CStatic*)GetDlgItem(IDC_STATIC_CAPTURE_PIC);
CRect IRect;
pStatic->GetClientRect(&IRect);
pStatic->GetDC()->FillSolidRect(IRect.left, IRect.top, IRect.Width(), IRect.Height(), RGB(215, 220, 243));

你可能感兴趣的:(windows开发--编程)