Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

Sign in to follow this  
do_best

Problema barra que teima nao aperecer

Recommended Posts

do_best

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 

Share this post


Link to post
Share on other sites
Ziwdon

Boas do_best,

Antes de mais, vê este Link.


"Rejoice not against me, O mine enemy: when I fall, I shall arise; when I sit in darkness, the LORD shall be a light unto me." - Micah 7:8 (KJV)

Share this post


Link to post
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
Sign in to follow this  

×

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.