SECShortcutBar::AddBar
Will create a window based on CRuntimeClass passed in and then add it to the container
Will add the CWnd pointer to the container.
Defined in: olbar.cpp
Syntax
AddBar( CRuntimeClass* pWndClass, LPCTSTR lpszLabel, CCreateContext* pContext, BOOL bRecalc, UINT nID )
AddBar( CWnd* pWnd, LPCTSTR lpszLabel, BOOL bRecalc )
AddBar( LPCTSTR lpszLabel, BOOL bRecalc )
Return Value
a pointer to an SECBar or SECListBar if successful, otherwise will return NULL
Parameters
pWndClass
CRuntimeClass to use to allocate Window object
lpszLabel
Caption to put on Bar
pContext
extra create parameters.
These are used for CView derived classes.
bRecalc
Pass in TRUE if you want to recalc after adding a bar
nID
ID of the window that will be created
pWnd
pointer to the window to add
Comments
If you create the child window yourself and use the 2nd overload to add to the SECShortcutBar, make sure you use the SECShortcutBar as the parent of the window.
Example
m_wndShortcutBar.AddBar( RUNTIME_CLASS(CEditView), _T("Edit"), pContext );
m_wndShortcutBar.AddBar( &m_wndSECTreeCtrl, _T("Tree Control") );
See Also