UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | req.product | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:gdiplusheaders.CachedBitmap.CachedBitmap(Bitmap,Graphics) |
CachedBitmap::CachedBitmap(IN Bitmap,IN Graphics) (gdiplusheaders.h) |
Creates a CachedBitmap::CachedBitmap object based on a Bitmap object and a Graphics object. |
|
gdiplus\_gdiplus_CLASS_CachedBitmap_CachedBitmap_bitmap_graphics_.htm |
gdiplus |
VS|gdicpp|~\gdiplus\gdiplusreference\classes\cachedbitmapclass\cachedbitmap_55bitmap_graphics.htm |
12/05/2018 |
CachedBitmap, CachedBitmap class [GDI+],CachedBitmap constructor, CachedBitmap constructor [GDI+], CachedBitmap constructor [GDI+],CachedBitmap class, CachedBitmap.CachedBitmap, CachedBitmap.CachedBitmap(IN Bitmap,IN Graphics), CachedBitmap::CachedBitmap, CachedBitmap::CachedBitmap(IN Bitmap,IN Graphics), _gdiplus_CLASS_CachedBitmap_CachedBitmap_bitmap_graphics_, gdiplus._gdiplus_CLASS_CachedBitmap_CachedBitmap_bitmap_graphics_ |
gdiplusheaders.h |
Gdiplus.h |
Windows |
Windows XP, Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Gdiplus.lib |
Gdiplus.dll |
Windows |
GDI+ 1.0 |
19H1 |
|
|
|
|
|
|
Creates a CachedBitmap::CachedBitmap object based on a Bitmap object and a Graphics object. The cached bitmap takes the pixel data from the Bitmap object and stores it in a format that is optimized for the display device associated with the Graphics object.
Type: [in] Bitmap*
Pointer to a Bitmap object that contains the pixel data to be optimized.
Type: [in] Graphics*
Pointer to a Graphics object that is associated with a display device for which the image will be optimized.
You can display a cached bitmap by passing the address of a CachedBitmap::CachedBitmap object to the DrawCachedBitmap method of a Graphics object. Use the Graphics object that was passed to the CachedBitmap::CachedBitmap constructor or another Graphics object that represents the same device.
The following example creates a CachedBitmap::CachedBitmap object based on a Bitmap object and a Graphics object. The code calls the DrawCachedBitmap method of that Graphics object to display the cached bitmap.
VOID Example_CachedBitmap(HDC hdc)
{
Graphics graphics(hdc);
Bitmap bitmap(L"Grapes.jpg");
CachedBitmap cachedBitmap(&bitmap, &graphics);
graphics.DrawCachedBitmap(&cachedBitmap, 10, 10);
}