MFC picture 图像清空

  • Post author:
  • Post category:其他



MFC picture control图像清空

清除一个picture control上的图片

CWnd * 类型需要转化为CStatic*类型

CStatic* pStatic = (CStatic*)GetDlgItem(IDC_STATIC1);
CRect lRect;
pStatic->GetClientRect(&lRect);
pStatic->GetDC()->FillSolidRect(lRect.left ,lRect.top ,lRect.Width(),lRect.Height(), RGB(240, 240, 240));

CStatic* pStatic = (CStatic*)GetDlgItem(IDC_STATIC1);
CRect lRect; pStatic->GetClientRect(&lRect); pStatic->GetDC()->FillSolidRect(lRect.left ,lRect.top ,lRect.Width(),lRect.Height(), RGB(192, 192, 192));



版权声明:本文为CVAIDL原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。