码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

CMainFrame::OnCreate   (...)
{
SetMenu(NULL);
//   把CToolBar的那段注释掉
...
}

int   CMainFrame::OnCreate(LPCREATESTRUCT   lpCreateStruct)
{
if   (CFrameWnd::OnCreate(lpCreateStruct)   ==   -1)
return   -1;

SetMenu(NULL);

/* if   (!m_wndToolBar.CreateEx(this,   TBSTYLE_FLAT,   WS_CHILD   |   WS_VISIBLE   |   CBRS_TOP
|   CBRS_GRIPPER   |   CBRS_TOOLTIPS   |   CBRS_FLYBY   |   CBRS_SIZE_DYNAMIC)   ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0( "Failed   to   create   toolbar\n ");
return   -1;             //   fail   to   create
}
*/
if   (!m_wndStatusBar.Create(this)   ||
!m_wndStatusBar.SetIndicators(indicators,
    sizeof(indicators)/sizeof(UINT)))
{
TRACE0( "Failed   to   create   status   bar\n ");
return   -1;             //   fail   to   create
}

//   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);

return   0;
}

posted on 2011-05-29 12:46  海山  阅读(1873)  评论(0)    收藏  举报