XLL+ Class Library

CXlToolbarState Class

[C++]
class CXlToolbarState

Overview

The CXlToolbarState class contains information about the position, visibility and existence of a toolbar. It can be used to persist the state of a toolbar after the toolbar is destroyed. It is thus possible to restore the toolbar to exactly the state the user left it in.

Declare a CXlToolbarState object in local scope before calling CXlToolbar::AddToolbar. Then pass it as an argument to CXlToolbar::AddToolbar and CXlToolbar::ShowToolbar. If the toolbar already exists, AddToolbar will destroy it, and store its state in the CXlToolbarState object. ShowToolbar will use the information in the CXlToolbarState (if valid) to override your instructions about the toolbar's visibility and location.

Data Members

MemberDescription
m_bValidIf true, the rest of the members are valid. If false, the object's data is invalid and should be ignored.
m_bVisibleIs the toolbar visible?
m_nPositionDocking position of the toolbar. If valid, this will be a member of the CXlToolbar::DockTypes enumeration.
m_xPosition of left edge of toolbar within its docking area.
m_yPosition of top edge of toolbar within its docking area.
m_cxWidth of toolbar
m_cyHeight of toolbar

Requirements

Header: xltoolbar.h

See Also

CXlToolbarState Methods | xltoolbar.h | Toolbars (User Guide) | CXlToolbar class