VC Picture Control展示BMP图片

VC Picture Control显示BMP图片VC对话框初始时,Picture Control显示BMP图片:// uBmpResource:图片ID uCtr

VC Picture Control显示BMP图片

VC对话框初始时,Picture Control显示BMP图片:

// uBmpResource:图片ID; uCtrlResource: Picture控件ID void 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); }


参考推荐:

使用Picture Control显示BMP图片

VC怎样在picture control中添加图片