* @brief Draw a bitmap image * @param pDC [in] The destination device context to draw to * @param x [in] The x-coordinate of the upper-left corner of the bitmap * @param y [in] The y-coordinate of the upper-left corner of the bitmap * @param pBitmap [in] the bitmap to draw */
| 42 | * @param pBitmap [in] the bitmap to draw |
| 43 | */ |
| 44 | void DrawBitmap(CDC *pDC, int x, int y, CBitmap *pBitmap) |
| 45 | { |
| 46 | CDC dcMem; |
| 47 | dcMem.CreateCompatibleDC(pDC); |
| 48 | BITMAP bm; |
| 49 | pBitmap->GetBitmap(&bm); |
| 50 | CBitmap *pOldBitmap = dcMem.SelectObject(pBitmap); |
| 51 | pDC->BitBlt(x, y, bm.bmWidth, bm.bmHeight, &dcMem, 0, 0, SRCCOPY); |
| 52 | dcMem.SelectObject(pOldBitmap); |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * @brief Duplicate a bitmap and make it dark |
no outgoing calls
no test coverage detected