SECFrameWnd Class

class SECFrameWnd: public CFrameWnd

The SECFrameWnd class is a replacement for MFC’s CFrameWnd class.

Defined in: swinfrm.h

Comments

The creation of a CFrameWnd replacement is necessary to support the extended control bar architecture and the gradient caption feature. Building on this architecture, your application can create docking windows with capabilities comparable to those seen in the Microsoft Developer Studio. You can also give your applications the gradient caption similar to the Microsoft Word title bar. Control bars can be resized while docked, diagonally resized while floating and more. The SECFrameWnd class derives from CFrameWnd and adds the implementation details and public operations required to support these enhancements.

Since SECFrameWnd inherits the CFrameWnd interface, all occurrences of CFrameWnd in your application code can simply be replaced with SECFrameWnd. For detailed instructions on adding enhanced docking window support to your application, refer to The Extended Control Bar Architecture section of the Objective Toolkit User’s Guide.

The SECFrameWnd and  SECMDIFrameWnd classes serve similar purposes they add enhanced docking window support to your application. If your application is SDI-based, you’ll need to change the base class of your application’s main frame window from CFrameWnd to SECFrameWnd. On the other hand, if your application is MDI-based, you’ll need to change the base class of your application’s main frame window from CMDIFrameWnd to  SECMDIFrameWnd.

See Also

SECMDIFrameWnd

Class Members

Construction

SECFrameWnd()

Constructor for the SECFrameWnd class.

Attributes

BOOL  GetActiveState()

Returns the activation state for the window.

Operations

void  EnableDocking(DWORD dwDockStyle, DWORD dwDockStyleEx = 0)

Enables docking for the frame.

virtual CDockBar*  CreateNewDockBar()

Create a new dockbar

void  EnableContextListMode(BOOL bEnable = TRUE)

Enables or disables the control bar context list mode.

virtual void  FloatControlBar(CControlBar* pBar, CPoint point, DWORD dwStyle = CBRS_ALIGN_TOP)

Remove a control bar from it's dockbar and float it, or move a floating bar to

virtual void  DockControlBarEx(CControlBar* pBar, UINT nDockBarID = 0,int nCol = 0, int nRow = 0, float fPctWidth = (float)1.0, int nHeight = 150)

Dock a control bar with extended information.

virtual void  CreateCaptionAppFont(CFont& font)

Creates the caption text font for the application name

virtual void  CreateCaptionDocFont(CFont& font)

Creates the caption text font for the document name

virtual void  DrawCaptionText()

Draws the text on the caption bar

void  SwapMenu(UINT nID)

Switches the menu on the menubar when running with a cool look menubar.

BOOL  HasMenuBar()

Returns TRUE if a menubar is present, FALSE if CMenu.

SECMenuBar*  GetMenuBar()

Gets a pointer to the menu bar.

void  SetMenuBar(SECMenuBar* pMenuBar)

Set the MenuBar for this frame.

CMenu*  GetMenu() const

Returns a pointer to the currently active menu.

virtual SECWorkspaceManagerEx*  InitWorkspaceMgrEx(const CString& strAppKey, BOOL bRegistryMode=FALSE, CRuntimeClass* pWSClass= RUNTIME_CLASS(SECWorkspaceManagerEx), BOOL bSectionKey=FALSE)

Initialize the extended workspace manager.

Protected data members

UINT  m_uiTextAlign

DrawText alignment flags for caption

BOOL  m_bHandleCaption

If custom caption drawing is enabled, this will be the caption handle.

BOOL  m_bActive

Activation status (WM_ACTIVATE status)

SECControlBarManager*  m_pControlBarManager

Pointer to the ControlBarManager