int GetObject(
HGDIOBJ hgdiobj,
// handle to graphics object
int cbBuffer,
// size of buffer for object information
LPVOID lpvObject
// buffer for object information
);
Parameters
hgdiobj
[in] Handle to the graphics object of interest. This can be a handle to one of the following: a logical bitmap, a brush, a font, a palette, a pen, or a device independent bitmap created by calling the CreateDIBSection function.
cbBuffer
[in] Specifies the number of bytes of information to be written to the buffer.
lpvObject
[out] Pointer to a buffer that receives the information about the specified graphics object.
The following table shows the type of information the buffer receives for each type of graphics object you can specify with hgdiobj. Object type Data written to buffer
HBITMAP BITMAP
HBITMAP returned from a call to CreateDIBSection DIBSECTION, if cbBuffer is set to sizeof(DIBSECTION), or BITMAP, if cbBuffer is set to sizeof(BITMAP)
HPALETTE A WORD count of the number of entries in the logical palette
HPEN returned from a call to ExtCreatePen EXTLOGPEN
HPEN LOGPEN
HBRUSH LOGBRUSH
HFONT LOGFONT
If the lpvObject parameter is NULL, the function return value is the number of bytes required to store the information it writes to the buffer for the specified graphics object.