Excel Like Tab
-
Greetings... I want a have Excel like flat tab in my application at the bottom of my tab control. Can somebody suggest me a way or any article on net which tells me how to go through it. I am not using MFC, only Win32 APIs Thanks in advance. Ritesh
-
Greetings... I want a have Excel like flat tab in my application at the bottom of my tab control. Can somebody suggest me a way or any article on net which tells me how to go through it. I am not using MFC, only Win32 APIs Thanks in advance. Ritesh
I know this is MFC but the extended styles should apply for MFC and Win32 API. I'm not sure what the Excel like tabs are like but this style makes buttons out of the tabs. Is that what you're looking for?
m_pTabCtrl = new CMyTabCtrl;
CRect cltRect;
GetClientRect(&cltRect); // CRect(0,0, 370, 600)
m_pTabCtrl->Create(WS_CHILD|WS_VISIBLE | TCS_BUTTONS | TCS_FLATBUTTONS, cltRect, this, IDC_TAB1);
DWORD dwExtStyle = m_pTabCtrl->GetExtendedStyle();
m_pTabCtrl->SetExtendedStyle(dwExtStyle | TCS_EX_FLATSEPARATORS);
m_pTabCtrl->ShowWindow(true);
TC_ITEM TabCtrlItem;
TabCtrlItem.mask = TCIF_TEXT;
TabCtrlItem.iImage = -1;
for(i = gSites.size(); i > 0; i--)
{
TabCtrlItem.pszText = gSites[i-1].GetId();
m_pTabCtrl->InsertItem( 0, &TabCtrlItem );
}m_pTabCtrl->SetCurSel(0);