(Draw, Paint 사용가능)

 

HANDLE bmp;

CBitmap cBitmap;

BITMAP bmpinfo;

//CDC는 pDC

CDC memdc;

bmp = LoadImage(NULL, _T("DDR_Skin/button/bt_Loop.bmp"), IMAGE_BITMAP, 0,0, LR_LOADFROMFILE);

cBitmap.Attach(bmp);

cBitmap.GetBitmap(&bmpinfo);

memdc.CreateCompatibleDC(pDC);

memdc.SelectObject(bmp);

//pDC->BitBlt(chkboxrect.left,chkboxrect.top,bmpinfo.bmWidth,bmpinfo.bmHeight, &memdc, 0,0,SRCCOPY);

pDC->TransparentBlt(chkboxrect.left, chkboxrect.top, bmpinfo.bmWidth, bmpinfo.bmHeight, &memdc, 0, 0, bmpinfo.bmWidth, bmpinfo.bmHeight, RGB(0,0,0));

 

 

 

memdc.DeleteDC();

cBitmap.DeleteObject();

+ Recent posts