- case wxDF_BITMAP:
- {
- /*
- wxBitmap *bitmap = (wxBitmap *)data;
-
- HDC hdcMem = CreateCompatibleDC((HDC) NULL);
- HDC hdcSrc = CreateCompatibleDC((HDC) NULL);
- HBITMAP old = (HBITMAP)
- ::SelectObject(hdcSrc, (HBITMAP)bitmap->GetHBITMAP());
- HBITMAP hBitmap = CreateCompatibleBitmap(hdcSrc,
- bitmap->GetWidth(),
- bitmap->GetHeight());
- if (!hBitmap)
- {
- SelectObject(hdcSrc, old);
- DeleteDC(hdcMem);
- DeleteDC(hdcSrc);
- return FALSE;
- }
-
- HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
- BitBlt(hdcMem, 0, 0, bitmap->GetWidth(), bitmap->GetHeight(),
- hdcSrc, 0, 0, SRCCOPY);
-
- // Select new bitmap out of memory DC
- SelectObject(hdcMem, old1);