| 1690 | } |
| 1691 | |
| 1692 | HBITMAP CColorCopDlg::CopyBitmap(HBITMAP hBitmapSrc) { |
| 1693 | BITMAP bitmap; |
| 1694 | HBITMAP hBitmapDst; |
| 1695 | HDC hdcSrc, hdcDst; |
| 1696 | |
| 1697 | ::GetObject(hBitmapSrc, sizeof(BITMAP), &bitmap); |
| 1698 | hBitmapDst = ::CreateBitmapIndirect(&bitmap); |
| 1699 | |
| 1700 | hdcSrc = ::CreateCompatibleDC(NULL); |
| 1701 | hdcDst = ::CreateCompatibleDC(NULL); |
| 1702 | |
| 1703 | ::SelectObject(hdcSrc, hBitmapSrc); |
| 1704 | ::SelectObject(hdcDst, hBitmapDst); |
| 1705 | |
| 1706 | ::BitBlt(hdcDst, 0, 0, bitmap.bmWidth, bitmap.bmHeight, |
| 1707 | hdcSrc, 0, 0, SRCCOPY); |
| 1708 | |
| 1709 | ::DeleteDC(hdcSrc); |
| 1710 | ::DeleteDC(hdcDst); |
| 1711 | |
| 1712 | return hBitmapDst; |
| 1713 | } |
| 1714 | |
| 1715 | void CColorCopDlg::OnLButtonUp(UINT nFlags, CPoint point) { |
| 1716 | // Stop eyedropper or magnifier mode |
nothing calls this directly
no outgoing calls
no test coverage detected