64,639
社区成员
发帖
与我相关
我的任务
分享
/*
定义位图数据
*/
unsigned CTabCtrTestDlg:: BMPData[8][24]=
{
{0,0,0xff, 0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff},
{0,0xff,0,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0,0xff,0},
{0,0xff,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0,0xff,0},
{0,0xff,0,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0,0xff,0},
{0,0xff,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0,0xff,0},
{0,0xff,0,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0,0xff,0},
{0,0xff,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0xff,0xff,0xff,0xff,0,0,0,0xff,0},
{0,0,0xff, 0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff,0,0,0xff}
};
/*InitDialog 函数中设置CStatic 背景图片*/
CStatic *pStatic=(CStatic *)GetDlgItem(IDC_STIC_IMage);
if(bmp.CreateBitmap(8,8,1,24,BMPData)==NULL)
{
MessageBox(_T("Error"));
}
pStatic->ModifyStyle(0,SS_BITMAP|SS_CENTERIMAGE|SS_REALSIZEIMAGE|SS_NOTIFY);
pStatic->SetBitmap(bmp);