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


CToolBar::GetItemRect

This member function fills the RECT structure whose address is contained in lpRect with the coordinates of the button or separator specified by nIndex.

virtual void GetItemRect(
   int nIndex,
   LPRECT lpRect 
) const;

Параметры

  • nIndex
    Index of the item (button or separator) whose rectangle coordinates are to be retrieved.

  • lpRect
    Address of the RECT structure that will contain the item's coordinates.

Заметки

Coordinates are in pixels relative to the upper-left corner of the toolbar.

Use GetItemRect to get the coordinates of a separator you want to replace with a combo box or other control.

Пример

See the example for CToolBar::SetSizes.

Требования

Header: afxext.h

См. также

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

CToolBar Class

CToolBar Members

Hierarchy Chart

CToolBar::CommandToIndex