
ToolBar in Dialog Box (not main frame)
I show a Tool bar in CDialog, put in the resource properties a MENU and use
this code:
Barra.Create(this);
Barra.LoadToolBar(IDR_BARRAHERRAMIENTAS);
Barra.ShowWindow(SW_SHOW);
Barra.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
The problem is only work in Debug, i don't know why in Release not work.
Quote:
> Can a ToolBar be created in a modal dialog box? I can't get it
> to work. I defined a CToolBar m_ToolBar in my dialog class,
> then in the InitDialog function I called m_ToolBar.Create(this)
> and m_ToolBar.LoadToolBar( IDR_TOOLBAR1 ). The functions
> return without errors, but nothing is visible. Is there
> a trick to this?
> Robert Scott
> Ann Arbor, Michigan (rscott {at sign} wwnet {period} net is my real email
address.)
> (My automatic return address is intentionally invalid to foil spammers.)