◄CGdiObject► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── int GetObject( int nCount, LPSTR lpObject ) const; Parameter Description <nCount> Specifies the number of bytes to copy into the <lpObject> buffer. <lpObject> Points to a user-supplied buffer that is to receive the information. Remarks Fills a buffer with data that defines a specified object. The function retrieves a data structure whose type depends on the type of graphic object, as shown by the following list: Object Buffer type CPen LOGPEN CBrush LOGBRUSH CFont LOGFONT CBitmap BITMAP CPalette int CRgn Not supported If the object is a CBitmap object, GetObject returns only the width, height, and color format information of the bitmap. The actual bits can be retrieved by using ◄CBitmap::GetBitmapBits►. If the object is a CPalette object, GetObject retrieves an integer that specifies the number of entries in the palette. The function does not retrieve the ◄LOGPALETTE► structure that defines the palette. An application can get information on palette entries by calling ◄CPalette::GetPaletteEntries►. Return Value The number of bytes retrieved, or 0 if an error occurs. See Also ◄CBitmap::GetBitmapBits►, ◄CPalette::GetPaletteEntries► -♦-