Nick
March 29th, 1999, 05:00 PM
How can use a toolbar in modal dialog box.
I tried to do in that way:
I created a toolbar resource using Resource View with ID IDR_TOOLBAR1
After that declared
CToolBar* m_pTools;
in the dialog class.
After that in the constructor of the dialog
m_pTools = new CToolBar();
and in the OnCreate method of the modall dialog added this
m_pTools->Create(this, WS_VISIBLE | WS_CHILD | CBRS_TOP, IDR_TOOLBAR1);
m_pTools->LoadToolBar(IDR_TOOLBAR1);
When debug the application the toolbar is created correctly, because Create and LoadToolBar return 1. But the problem is that it's not on the dialog.
Please if anyone can help?
I tried to do in that way:
I created a toolbar resource using Resource View with ID IDR_TOOLBAR1
After that declared
CToolBar* m_pTools;
in the dialog class.
After that in the constructor of the dialog
m_pTools = new CToolBar();
and in the OnCreate method of the modall dialog added this
m_pTools->Create(this, WS_VISIBLE | WS_CHILD | CBRS_TOP, IDR_TOOLBAR1);
m_pTools->LoadToolBar(IDR_TOOLBAR1);
When debug the application the toolbar is created correctly, because Create and LoadToolBar return 1. But the problem is that it's not on the dialog.
Please if anyone can help?