Udostępnij za pośrednictwem


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;

Parameters

  • 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.

Remarks

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.

Example

See the example for CToolBar::SetSizes.

Requirements

Header: afxext.h

See Also

Reference

CToolBar Class

Hierarchy Chart

CToolBar::CommandToIndex

Other Resources

CToolBar Members