Im new to this and I am having trouble with attaching a toolbar and a menu to a SDI app. Can anyone guide me in the right direction or suggest anything for me to do. thanks in advance....charles
If you make a SDI or MDI project the wizard will write the code necesary for a toolbar.Just look in the OnCreate message handler(method) of the CMainFrame class. There you can find the code for handling the status bar. It should look like:
// TODO: Remove this if you don't want tool tips or a resizeable toolbar
m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
-----------------------------------------------------------
m_wndToolbar and m_wndStatusBar are member of CMainFrame.
For the frame menu the coresponding code you can find in the Initinstance of your CWinApp derived class,. It should look like this:
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame;
Hope this helps, s-)
Blessed is he who in the name of justice and good will, shepards the week through the valley of darkness...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.