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. conguring a special style for CMFCOutlookBarTabCtrl class

conguring a special style for CMFCOutlookBarTabCtrl class

Scheduled Pinned Locked Moved C / C++ / MFC
c++comlounge
2 Posts 1 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.
  • A Offline
    A Offline
    A Ms
    wrote on last edited by
    #1

    Hi, The OutlookDemo Sample of MFC new Feature pack implements a very good style of CMFCOutlookBarTabCtrl class that when you configure the gui to look in office 2003 and office XP modes the tabs of the CMFCOutlookbar Open and go upward by clicking on them but I couldn't found what to do reach this style of tabs through the sample source code. if any one knows the answer I will be thankful if he could modify my below code so i could reach that style.

    m_wndOutlookBar.SetMode2003(true);

    //outlookbar Creation
    m_wndOutlookBar.Create(_T("test"), this, CRect (50, 50, 500, 500), ID_VIEW_OUTLOOKBAR, WS_CHILD | WS_VISIBLE | CBRS_LEFT);

    //pane Number 1
    m_wndOutlookPane1.Create (&m_wndOutlookBar,
    AFX_DEFAULT_TOOLBAR_STYLE, ID_OUTLOOK_PANE_GENERAL, AFX_CBRS_FLOAT | AFX_CBRS_RESIZE);

    // make the Outlook pane detachable (enable docking)
    m_wndOutlookPane1.EnableDocking (CBRS_ALIGN_ANY);
    // add buttons
    m_wndOutlookPane1.AddButton (theApp.LoadIcon (IDR_MAINFRAME), L"Open", ID_APP_ABOUT);

    //pane Number 2
    m_wndOutlookPane2.Create (&m_wndOutlookBar,
    AFX_DEFAULT_TOOLBAR_STYLE, ID_OUTLOOK_PANE_SPECIAL, AFX_CBRS_FLOAT | AFX_CBRS_RESIZE);

    // make the Outlook pane detachable (enable docking)
    m_wndOutlookPane2.EnableDocking (CBRS_ALIGN_ANY);

    CMFCOutlookBarTabCtrl::EnableAnimation(TRUE);

    CMFCOutlookBarTabCtrl* pOutlookBar =
    (CMFCOutlookBarTabCtrl*) m_wndOutlookBar.GetUnderlyingWindow ();

    pOutlookBar->EnableInPlaceEdit(TRUE);
    pOutlookBar->EnableAnimation(true);
    pOutlookBar->EnableScrollButtons();
    pOutlookBar->EnableTabSwap(true);

    (CMFCBaseTabCtrl*)pOutlookBar->EnableTabDetach(0,true);

    pOutlookBar->AddTab (&m_wndOutlookPane1, L"General", (UINT) -1, TRUE);
    pOutlookBar->AddTab (&m_wndOutlookPane2, L"Special", (UINT) -1, TRUE);

    A 1 Reply Last reply
    0
    • A A Ms

      Hi, The OutlookDemo Sample of MFC new Feature pack implements a very good style of CMFCOutlookBarTabCtrl class that when you configure the gui to look in office 2003 and office XP modes the tabs of the CMFCOutlookbar Open and go upward by clicking on them but I couldn't found what to do reach this style of tabs through the sample source code. if any one knows the answer I will be thankful if he could modify my below code so i could reach that style.

      m_wndOutlookBar.SetMode2003(true);

      //outlookbar Creation
      m_wndOutlookBar.Create(_T("test"), this, CRect (50, 50, 500, 500), ID_VIEW_OUTLOOKBAR, WS_CHILD | WS_VISIBLE | CBRS_LEFT);

      //pane Number 1
      m_wndOutlookPane1.Create (&m_wndOutlookBar,
      AFX_DEFAULT_TOOLBAR_STYLE, ID_OUTLOOK_PANE_GENERAL, AFX_CBRS_FLOAT | AFX_CBRS_RESIZE);

      // make the Outlook pane detachable (enable docking)
      m_wndOutlookPane1.EnableDocking (CBRS_ALIGN_ANY);
      // add buttons
      m_wndOutlookPane1.AddButton (theApp.LoadIcon (IDR_MAINFRAME), L"Open", ID_APP_ABOUT);

      //pane Number 2
      m_wndOutlookPane2.Create (&m_wndOutlookBar,
      AFX_DEFAULT_TOOLBAR_STYLE, ID_OUTLOOK_PANE_SPECIAL, AFX_CBRS_FLOAT | AFX_CBRS_RESIZE);

      // make the Outlook pane detachable (enable docking)
      m_wndOutlookPane2.EnableDocking (CBRS_ALIGN_ANY);

      CMFCOutlookBarTabCtrl::EnableAnimation(TRUE);

      CMFCOutlookBarTabCtrl* pOutlookBar =
      (CMFCOutlookBarTabCtrl*) m_wndOutlookBar.GetUnderlyingWindow ();

      pOutlookBar->EnableInPlaceEdit(TRUE);
      pOutlookBar->EnableAnimation(true);
      pOutlookBar->EnableScrollButtons();
      pOutlookBar->EnableTabSwap(true);

      (CMFCBaseTabCtrl*)pOutlookBar->EnableTabDetach(0,true);

      pOutlookBar->AddTab (&m_wndOutlookPane1, L"General", (UINT) -1, TRUE);
      pOutlookBar->AddTab (&m_wndOutlookPane2, L"Special", (UINT) -1, TRUE);

      A Offline
      A Offline
      A Ms
      wrote on last edited by
      #2

      I Found Answer By my self ,And It was about the method

      m_wndBarOutlook.SetMode2003(TRUE);

      Because in the sample program of MSDN in the 2003 style and XP Mode it changes the way I like I never think of that to have this style I should use it the following way

      m_wndBarOutlook.SetMode2003(FALSE);

      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