win_dc_info->hBrush = STOCK_WHITE_BRUSH;
win_dc_info->hFont = STOCK_SYSTEM_FONT;
win_dc_info->hBitmap = 0;
- win_dc_info->hFirstBitmap = 0;
win_dc_info->hDevice = 0;
win_dc_info->hPalette = STOCK_DEFAULT_PALETTE;
win_dc_info->ROPmode = R2_COPYPEN;
newdc->w.hBrush = dc->w.hBrush;
newdc->w.hFont = dc->w.hFont;
newdc->w.hBitmap = dc->w.hBitmap;
- newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
newdc->w.hDevice = dc->w.hDevice;
newdc->w.hPalette = dc->w.hPalette;
newdc->w.totalExtent = dc->w.totalExtent;
dc->w.flags = dcs->w.flags & ~DC_SAVED;
dc->w.devCaps = dcs->w.devCaps;
- dc->w.hFirstBitmap = dcs->w.hFirstBitmap;
dc->w.hDevice = dcs->w.hDevice;
dc->w.totalExtent = dcs->w.totalExtent;
dc->w.ROPmode = dcs->w.ROPmode;
TRACE("(%04x): returning %04x\n",
hdc, dc->hSelf );
- /* Create default bitmap */
- if (!(hbitmap = CreateBitmap( 1, 1, 1, 1, NULL )))
- {
- GDI_HEAP_FREE( dc->hSelf );
- return 0;
- }
dc->w.flags = DC_MEMORY;
dc->w.bitsPerPixel = 1;
- dc->w.hBitmap = hbitmap;
- dc->w.hFirstBitmap = hbitmap;
+ dc->w.hBitmap = hPseudoStockBitmap;
/* Copy the driver-specific physical device info into
* the new DC. The driver may use this read-only info
SelectObject( hdc, STOCK_BLACK_PEN );
SelectObject( hdc, STOCK_WHITE_BRUSH );
SelectObject( hdc, STOCK_SYSTEM_FONT );
- if (dc->w.flags & DC_MEMORY) DeleteObject( dc->w.hFirstBitmap );
if (dc->funcs->pDeleteDC) dc->funcs->pDeleteDC(dc);
}
(GDIOBJHDR *) &DefaultGuiFont
};
+HBITMAP hPseudoStockBitmap; /* 1x1 bitmap for memory DCs */
+
/******************************************************************************
*
* void ReadFontInformation(
StockObjects[DEFAULT_PALETTE] = (GDIOBJHDR *)GDI_HEAP_LOCK( hpalette );
}
+ hPseudoStockBitmap = CreateBitmap( 1, 1, 1, 1, NULL );
return TRUE;
}
if (HIWORD(obj)) return FALSE;
if ((obj >= FIRST_STOCK_HANDLE) && (obj <= LAST_STOCK_HANDLE))
return TRUE;
+ if (obj == hPseudoStockBitmap) return TRUE;
if (!(header = (GDIOBJHDR *) GDI_HEAP_LOCK( obj ))) return FALSE;
TRACE("%04x\n", obj );