Jump to content

Problema barra que teima nao aperecer


do_best
 Share

Recommended Posts

codigo

-------

BOOL CMainFrame::CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, CFlightsTree& tree, CCalendarBar& calendar, int nInitialWidth)
{
   CWindowDC dc(NULL);

   bar.SetMode2003();

   BOOL bNameValid;
   CString strTemp;
   bNameValid = strTemp.LoadString(IDS_SHORTCUTS);
   ASSERT(bNameValid);
   if (!bar.Create(strTemp, this, CRect(0, 0, nInitialWidth, 32000), uiID, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
   {
      return FALSE; // fail to create
   }

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

   if (pOutlookBar == NULL)
   {
      ASSERT(FALSE);
      return FALSE;
   }

   pOutlookBar->EnableInPlaceEdit(false);

   static UINT uiPageID ;

   DWORD dwPaneStyle = AFX_DEFAULT_TOOLBAR_STYLE | CBRS_FLOAT_MULTI;

   // can float, can autohide, can resize, CAN NOT CLOSE
   DWORD dwStyle = AFX_CBRS_FLOAT | AFX_CBRS_AUTOHIDE | AFX_CBRS_RESIZE;

   CRect rectDummy(0, 0, 0, 0);
   const DWORD dwTreeStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS;

   tree.Create(dwTreeStyle, rectDummy, &bar, 1200);
   pOutlookBar->AddControl(&tree, _T(""), 2, TRUE, dwStyle);
   

   // load flights from database
   tree.LoadFlights();



#if DISPLAY_CALENDER
   calendar.Create(rectDummy, &bar, 1201);
   bNameValid = strTemp.LoadString(IDS_CALENDAR);
   ASSERT(bNameValid);
   pOutlookBar->AddControl(&calendar, strTemp, 3, TRUE, dwStyle);
#endif


   bar.SetPaneStyle(bar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);

   pOutlookBar->SetImageList(theApp.m_bHiColorIcons ? IDB_PAGES_HC : IDB_PAGES, 24);
   pOutlookBar->SetToolbarImageList(theApp.m_bHiColorIcons ? IDB_PAGES_SMALL_HC : IDB_PAGES_SMALL, 16);
   pOutlookBar->RecalcLayout();

   BOOL bAnimation = theApp.GetInt(_T("OutlookAnimation"), TRUE);
   CMFCOutlookBarTabCtrl::EnableAnimation(bAnimation);

   bar.SetButtonsFont(&afxGlobalData.fontBold);

   return TRUE;
}

----

Problema é que antes aparecia a barra e agora nao aparece e percorre tudo na mesma 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.