ToolBar in Dialog Box (not main frame) 
Author Message
 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.)



Tue, 06 Aug 2002 03:00:00 GMT  
 ToolBar in Dialog Box (not main frame)

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



Wed, 07 Aug 2002 03:00:00 GMT  
 ToolBar in Dialog Box (not main frame)
Take a look at following MSDN article:

DLGCBR32: Demonstrates Adding a Status Bar and Toolbar to Dialog Boxes

--
Ajay Kalra

Microsoft VC++/MFC MVP

Note: Please post all replies to newsgroup only.


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



Thu, 08 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

2. Killing a modal dialog box from the main frame

3. Not showing the main dialog box

4. Main Frame Toolbar problem

5. Dialog owned by main window not hidden when main minimized

6. load dialog into main frame

7. Resizing a modeless dialog within the main frame window

8. Iconifying modeless dialog inside Main Frame ?

9. Insert Dialog into MDI main frame ?

10. main GUI thread -vs- Main Frame Thread

11. Toolbar in dialog frame

12. Main window, choose file dialog, tree views, and toolbar buttons

 

 
Powered by phpBB® Forum Software