~cpp void DrawBitMap(UINT ITEM, int x, int y, UINT rop=SRCCOPY){ //bitmap Load CBitmap newBitmap, *oldBitmap; CDC BitMapDC; BitMapDC.CreateCompatibleDC(this->getMemDC()); newBitmap.LoadBitmap(ITEM); oldBitmap = (CBitmap*)BitMapDC.SelectObject(&newBitmap); //비트맵 크기 정보 로드 BITMAP bitmapInfo; newBitmap.GetBitmap(&bitmapInfo); //draw m_pMemDC->BitBlt(x, y, bitmapInfo.bmWidth, bitmapInfo.bmHeight, &BitMapDC, 0, 0, rop); //회복 BitMapDC.SelectObject(oldBitmap); }
~cpp void DrawMaskBitMap(UINT MASKITEM, UINT IMGITEM, int x, int y){ this->DrawBitMap(MASKITEM, x, y, SRCAND); this->DrawBitMap(IMGITEM, x, y, SRCPAINT); return; }