picture control 载入图片

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);

 

你可能感兴趣的:(图片)