首页 > 代码库 > Picture control中设置位图

Picture control中设置位图

1 在初始化函数中使用2 3 //给picture control控件加载图片 4 CStatic *pStatic = (CStatic *)GetDlgItem(IDC_STATIC_UP);5 HBITMAP hBitmap = ::LoadBitmap(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDB_BITMAP_BG )); 6 pStatic->ModifyStyle(0xF,SS_BITMAP|SS_CENTERIMAGE);   7 pStatic->SetBitmap(hBitmap); 

 

Picture control中设置位图