How the tab control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window.
To use CTabCtrl directly in a dialog box
To use CTabCtrl in a nondialog window
After the CTabCtrl object has been created, you can set or clear the following extended styles:
Note To receive the TCN_GETOBJECT notification, you must initialize the OLE libraries with a call to AfxOleInit.
These styles can be retrieved and set, after the control has been created, with respective calls to the GetExtendedStyle and SetExtendedStyle member functions.
For instance, set the TCS_EX_FLATSEPARATORS style with the following lines of code:
DWORD dwExStyle= m_tabCtrl.GetExtendedStyle();
m_tabCtrl.SetExtendedStyle(dwExStyle | TCS_EX_FLATSEPARATORS);
Clear the TCS_EX_FLATSEPARATORS style from a CTabCtrl object with the following lines of code:
DWORD dwExStyle= m_tabCtrl.GetExtendedStyle();
m_tabCtrl.SetExtendedStyle(dwExStyle & ~TCS_EX_FLATSEPARATORS);
This will remove the separators that appear between the buttons of your CTabCtrl object.