CGdiObject::CreateStockObject

BOOLCreateStockObject(intnIndex**);**

Return Value

Nonzero if the function is successful; otherwise 0.

Parameters

nIndex

A constant specifying the type of stock object desired. See the parameter fnObject for in the Win32 SDK for a description of appropriate values.

Remarks

Retrieves a handle to one of the predefined stock Windows GDI pens, brushes, or fonts, and attaches the GDI object to the CGdiObject object. Call this function with one of the derived classes that corresponds to the Windows GDI object type, such as CPen for a stock pen.

CGdiObject OverviewClass MembersHierarchy Chart

See Also   CPen::CPen, CBrush::CBrush, CFont::CFont, CPalette::CPalette