XLL+ Class Library (6.3)

CXlToolbarState Class

Used to persist the state of a toolbar after the toolbar is destroyed.

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

Member Description
m_bValid If true, the rest of the members are valid. If false, the object's data is invalid and should be ignored.
m_bVisible Is the toolbar visible?
m_nPosition Docking position of the toolbar. If valid, this will be a member of the CXlToolbar::DockTypes enumeration.
m_x Position of left edge of toolbar within its docking area.
m_y Position of top edge of toolbar within its docking area.
m_cx Width of toolbar
m_cy Height of toolbar

Requirements

Header: xltoolbar.h

See Also

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