Flat-Style Drawing

To enable the flat drawing style, you will need to set the CBRS_EX_FLATSTYLE extended style while creating a docking window. Alternatively, you can set the flat drawing style later by calling SetExBarStyle (a member of the SECControlBar class).

Text inside a gripper window is taken from the window caption which can be set during the creation of a window, or later in the program by calling the SetWindowText function (a member of the CWnd class).

Flat-Style Horizontal Gripper with Close and Expand Buttons Enabled

Flat-Style Vertical Gripper with Close and Expand Buttons Enabled

To view sample code which shows how to enable the flat-style mode of docking windows during creation time, please see the CMainFrame::OnCreate function implementation in MAINFRM.cpp, VIZ sample.

m_wndProjectWorkspace.Create(this, _T("Project Workspace"),

CBRS_RIGHT | WS_VISIBLE | CBRS_SIZE_DYNAMIC,

CBRS_EX_STDCONTEXTMENU | CBRS_EX_ALLOW_MDI_FLOAT |

CBRS_EX_COOL | CBRS_EX_BORDERSPACE | CBRS_EX_FLATSTYLE,

ID_PROJECTWORKSPACE);

The VIZ sample demonstrates this feature and can be found in the Samples\Toolkit\MFC\Docking directory.