SECTabWnd Class
class SECTabWnd: public SECTabWndBase
The SECTabWnd class implements a tabbed window with a two-dimensional (Excel-like) look and feel.
Defined in: tabwnd.h
Comments
SECTabWnd inherits its interface from SECTabWndBase and adds the implementation details that define its appearance.
An SECTabWnd object can be embedded in any CWnd object. To create an SECTabWnd object in a CFrameWnd, use the following steps:
1.Embed an SECTabWnd member variable in the parent frame.
2.Override the parent frame’s OnCreateClient member function.
3.From within the overridden OnCreateClient, call the Create member function of SECTabWnd.
4.Call SECTabWnd::AddTab at any time during the life of the tabbed window to create a CWnd or CView child window in the tabbed window.
Note: AddTab method adds to a tab to the end of a series of tabs (i.e., appends a tab). InsertTab inserts a tab to a specific location in a series of tabs.
See the TABDEMO sample in the \SAMPLES\TOOLKIT\STANDARD\TABS\TABDEMO directory for a demonstration of the SECTabWnd class.
See Also
SECTabWndBase SECTabControlSECWorkbook
Class Members
Constructors
Constructs an SECTabWnd object.
Initializations
BOOL Create(CWnd* pParentWnd, DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | TWS_FULLSCROLL | TWS_TABS_ON_BOTTOM, UINT nID = AFX_IDW_PANE_FIRST)
Creates the Windows window and attaches it to the SECTabWnd object.
virtual BOOL CreateTabCtrl(DWORD dwStyle, UINT nID)
Creates a tab control in the style specified.
Operations
virtual SECTab* InsertTab(CWnd* pWnd, int nIndex, LPCTSTR lpszLabel)
Inserts a new tab into the tabbed window.
virtual SECTab* InsertTab(CRuntimeClass* pViewClass, int nIndex, LPCTSTR lpszLabel, CCreateContext* pContext = NULL, UINT nID = -1)
Inserts a new tab into the tabbed window.
virtual void RemoveTab(int nIndex)
Removes a tab.
virtual void SetScrollStyle(int nTab, DWORD dwStyle)
Sets the scrolling style for a tab.
virtual BOOL ActivateTab(CWnd* pWnd, int nIndex)
Activates a specific tab.
virtual BOOL ActivateTab(CWnd* pWnd)
Activates a specific tab.
virtual BOOL ActivateTab(int nIndex)
Activates a specific tab.
virtual CScrollBar* GetScrollBar(int nBar, const CWnd* const pWnd = NULL) const
Returns a pointer to the CScrollBar object used by a particular tab.
BOOL SetFontSelectedTab(CFont* pFont,BOOL bRedraw=TRUE)
Sets a selected tab’s current font.
BOOL SetFontUnselectedTab(CFont* pFont,BOOL bRedraw=TRUE)
Sets an unselected tab’s current font.
BOOL SetFontActiveTab(CFont* pFont,BOOL bRedraw=TRUE)
Sets an active tab’s currrent font.
CFont* GetFontSelectedTab()
Gets the current font of a selected tab.
CFont* GetFontUnselectedTab()
Gets the current font of an unselected tab.
CFont* GetFontActiveTab()
Gets the current font of an active tab.