Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Excel Like Tab

Excel Like Tab

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    insanely420
    wrote on last edited by
    #1

    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

    J 1 Reply Last reply
    0
    • I insanely420

      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

      J Offline
      J Offline
      JohnnyG
      wrote on last edited by
      #2

      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);

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups