Поделиться через


CGdiObject::CreateStockObject

Retrieves a handle to one of the predefined stock Windows GDI pens, brushes, or fonts, and attaches the GDI object to the CGdiObject object.

BOOL CreateStockObject(
   int nIndex 
);

Параметры

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

Возвращаемое значение

Nonzero if the function is successful; otherwise 0.

Заметки

Call this function with one of the derived classes that corresponds to the Windows GDI object type, such as CPen for a stock pen.

Требования

Header: afxwin.h

См. также

Основные понятия

CGdiObject Class

CGdiObject Members

Hierarchy Chart

CPen::CPen

CBrush::CBrush

CFont::CFont

CPalette::CPalette