标签:
CBitmap bitmap;
//加载指定位图资源 Bmp图片ID
bitmap.LoadBitmap(IDB_BITMAP1);
//获取对话框上的句柄 图片控件ID
CStatic *p = (CStatic *)GetDlgItem(IDC_STATIC_PIC);
//设置静态控件窗口风格为位图居中显示
p->ModifyStyle(0xf, SS_BITMAP | SS_CENTERIMAGE);
//将图片设置到Picture控件上
p->SetBitmap(bitmap);
标签:
原文地址:http://www.cnblogs.com/xzh1993/p/4720843.html