المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to load 2 tool bars in Main Frame (MFC)



C++ Programming
01-27-2010, 09:40 PM
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.Create(this) ||(
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME) )) //This load MainFRAME TOOLBAR
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
.......
Above works for one toolbar...
This will load the Main Frame tool bar, How do I load another toolbar next to it, I have (IDR_MAINFRAME2) as another smaller tool bar that i would like to have loaded next to the first one when I launch my app?

Thanks