picture control 显示图片
void CnoneDlg::SetBitmap(UINT uBmpResource, UINT uCtrlResource)
{
HBITMAP hBitmap;
CStatic *pStatic = (CStatic *)GetDlgItem(uCtrlResource);
hBitmap = (HBITMAP)LoadImage(
AfxGetInstanceHandle(),
MAKEINTRESOURCE(uBmpResource),
IMAGE_BITMAP,
0,
0,
LR_LOADMAP3DCOLORS);
pStatic->ModifyStyle(0xF, SS_BITMAP);
pStatic->SetBitmap(hBitmap);
}
void CnoneDlg::OnBnClickedButton1()
{
// TODO: 在此添加控件通知处理程序代码
SetBitmap(IDB_BITMAP1,IDC_STATIC);
}