C++ EnableDocking函数代码示例(c++enabledocking函数代码示例汇总)

本文整理汇总了C++中EnableDocking函数的典型用法代码示例。如果您正苦于以下问题:C++ EnableDocking函数的具体用法?C++ EnableDocking怎么用?C++ EnableDocking使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


C++ EnableDocking函数代码示例(c++enabledocking函数代码示例汇总)

在下文中一共展示了EnableDocking函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: TRACE0

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	/*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
	}
	m_wndStatusBar.SetPaneInfo(0,ID_SEPARATOR,SBPS_POPOUT|SBPS_STRETCH,200);
	m_wndStatusBar.SetPaneInfo(1,ID_INDICATOR_USER,SBPS_POPOUT,150);
	m_wndStatusBar.SetPaneInfo(2,ID_INDICATOR_ISADMIN,SBPS_POPOUT,150);
	m_wndStatusBar.SetPaneInfo(3,ID_INDICATOR_DATE,SBPS_POPOUT,150);

	CTime lt = CTime::GetCurrentTime();
	CString txt ;
	txt.Format("日期: %d年%d月%d日",lt.GetYear(),lt.GetMonth(),lt.GetDay());
	m_wndStatusBar.SetPaneText(3,txt);


	// 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;
}
开发者ID:SamNiBoy,项目名称:DGG,代码行数:39,代码来源:MainFrm.cpp

示例2: SetMenu

int CMyFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct){
	toolbar.CreateEx(this,TBSTYLE_FLAT,WS_CHILD|WS_VISIBLE|
		CBRS_ALIGN_TOP|CBRS_GRIPPER|CBRS_SIZE_DYNAMIC|CBRS_TOOLTIPS|CBRS_FLYBY);
	toolbar.LoadToolBar(IDR_TOOLBAR1);
	toolbar.EnableDocking(CBRS_ALIGN_ANY);
	toolbar.SetWindowText("tool");

	m_menu.LoadMenu(IDR_MENU1);
	SetMenu(&m_menu);

	m_statusbar.CreateEx(this);
	m_statusbar.SetIndicators(g_hIndicator,3);
	m_statusbar.SetPaneInfo(1,IDS_TIME,SBPS_POPOUT,200);
	m_statusbar.SetPaneInfo(2,IDS_POS,SBPS_NORMAL,200);
	::SetTimer(this->m_hWnd,1,1000,NULL);


	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&toolbar ,AFX_IDW_DOCKBAR_TOP);

	return CFrameWnd::OnCreate(lpCreateStruct);
}
开发者ID:SamsonWang,项目名称:Study,代码行数:22,代码来源:MFCToolBar.cpp

示例3: CRect

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	// create a view to occupy the client area of the frame
	if (!m_wndView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
		CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
	{
		TRACE0("Failed to create view window\n");
		return -1;
	}
	
	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);
	

	ShowWindow(	SW_SHOWMAXIMIZED);

	return 0;
}
开发者ID:mbanquiero,项目名称:games,代码行数:39,代码来源:MainFrm.cpp

示例4: TRACE0

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	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
	}

	if (!Mdiclient.SubclassWindow(m_hWndMDIClient))
	{
		TRACE("Failed to subclass MDI client window\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);

	m_wndStatusBar.SetPaneInfo(0,ID_SEPARATOR,0,120); //设置新增窗格1的宽度
	m_wndStatusBar.SetPaneInfo(1,ID_SEPARATOR,0,180); //设置新增窗格1的宽度
	m_wndStatusBar.SetPaneInfo(2,ID_SEPARATOR,0,180); //设置新增窗格2的宽度
	m_wndStatusBar.SetPaneInfo(3,ID_SEPARATOR,SBPS_STRETCH,120);

	return 0;
}
开发者ID:lingshaoqing,项目名称:Cplusplus-Source-Code,代码行数:39,代码来源:MainFrm.cpp

示例5: TRACE0

int CFrame::OnCreate(LPCREATESTRUCT lpcs)
{
   static const UINT indicators[] =
   {
	   ID_SEPARATOR,           // status line indicator
	   ID_INDICATOR1,
	   ID_INDICATOR2,
	   ID_INDICATOR3,
	   ID_INDICATOR_CAPS,
	   ID_INDICATOR_NUM,
	   ID_INDICATOR_SCRL,
   };

	if (CMDIFrameWnd::OnCreate(lpcs) == -1)
		return -1;
	
	if (!(m_wndToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_RIGHT) && m_wndToolBar.LoadToolBar(CFrame::IDR)))
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}

	if (!(m_wndStatusBar.Create(this) && m_wndStatusBar.SetIndicators(indicators, _countof(indicators))))
	{
		TRACE0("Failed to create status bar\n");
		return -1;      // fail to create
	}

	// 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.SetWindowText(_T("Standard"));

	return 0;
}
开发者ID:wermanhme1990,项目名称:xcommon,代码行数:39,代码来源:frame.cpp

示例6: TRACE0

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	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_TOOLBAR))
	{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
	}
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar,AFX_IDW_DOCKBAR_RIGHT);

	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
	}
	m_StartTime = CTime::GetCurrentTime();
	m_wndStatusBar.SetPaneInfo(0, ID_SEPARATOR, SBPS_NORMAL,170);	
	m_wndStatusBar.SetPaneInfo(1, ID_SEPARATOR, SBPS_NORMAL, 120);
	m_wndStatusBar.SetPaneText(1,"登录状态:未登录");
	m_wndStatusBar.SetPaneInfo(2, ID_SEPARATOR, SBPS_NORMAL, 70);
 	m_wndStatusBar.SetPaneText(2,"缓存:0");
 	m_wndStatusBar.SetPaneInfo(3, ID_SEPARATOR, SBPS_NORMAL, 150);
 	m_wndStatusBar.SetPaneText(3,"账户余额:未查询");
	m_wndStatusBar.SetPaneInfo(4, ID_SEPARATOR, SBPS_NORMAL, 50);
	m_wndStatusBar.SetPaneText(4,"待存:0");
	m_wndStatusBar.SetPaneInfo(5, ID_SEPARATOR, SBPS_NORMAL, 50);
	m_wndStatusBar.SetPaneText(5,"启动时间");
	m_wndStatusBar.SetPaneInfo(6, ID_SEPARATOR, SBPS_NORMAL, 120);
 	m_wndStatusBar.SetPaneText(6,m_StartTime.Format("%Y-%m-%d %H:%M:%S"));	
	return 0;
}
开发者ID:wyrover,项目名称:myhistoryprojects,代码行数:39,代码来源:MainFrm.cpp

示例7: sizeof

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

	if (!wndStatusBar.Create(this) ||
		!wndStatusBar.SetIndicators(indicators,
		  sizeof(indicators)/sizeof(UINT)))
	{
		TRACE0("Failed to create status bar\n");
		return -1;      // fail to create
	}

    // TODO: modify here the splitter
	EnableDocking(CBRS_ALIGN_ANY);
    wndSplitter.SetActivePane(0,1);
    RecalcLayout();

    bSyncStarted = false;

	return 0;
}
开发者ID:PaulCarrick,项目名称:funambol-outlook-client,代码行数:22,代码来源:ConfigFrm.cpp

示例8: TRACE0

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	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))//IDR_MAINFRAME//IDR_TOOLBAR
	{
		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
	}

	CreateToolBar();

	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar);


	//set the view->smooth checked
	CMenu*	mainmenu=this->GetMenu();
//	mainmenu->CheckMenuItem(ID_VIEW_3DAXISON,MF_CHECKED);	
//	mainmenu->CheckMenuItem(ID_VIEW_2DAXIS,MF_CHECKED);	
	mainmenu->CheckMenuItem(ID_VIEW_BFPLANE,MF_CHECKED);	
	mainmenu->CheckMenuItem(ID_VIEW_PRIMALMESH,MF_CHECKED);	

	return 0;
}
开发者ID:caomw,项目名称:sketch-system-with-third-party-libs,代码行数:38,代码来源:MainFrm.cpp

示例9: TRACE0

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	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
	}

  if (!m_wndTestList.Create( this ) )
	{
		return -1;
	}

	m_wndTestList.ShowWindow( SW_SHOW );

	EnableDocking(CBRS_ALIGN_ANY);

	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	m_wndTestList.EnableDocking(CBRS_ALIGN_ANY);

	DockControlBar( &m_wndTestList, AFX_IDW_DOCKBAR_LEFT);
	DockControlBar(&m_wndToolBar);

	return 0;
}
开发者ID:F5000,项目名称:spree,代码行数:38,代码来源:mainfrm.cpp

示例10: TRACE0

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

#if _MSC_VER > 1100 // VC6+
  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))
#else // VC5-
  if (!m_wndToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP
      | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
      !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
#endif
  {
    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
  }

  // ugliness
  sbar = &m_wndStatusBar;

  // 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;
}
开发者ID:PianoRoKR,项目名称:bzflag,代码行数:38,代码来源:MainFrm.cpp

示例11: TRACE0

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

    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
    // Enable drag/drop open
    DragAcceptFiles(TRUE);
    //  be dockable
    m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
    EnableDocking(CBRS_ALIGN_ANY);
    DockControlBar(&m_wndToolBar);
    // add panes
    m_wndStatusBar.SetPaneInfo( PANE_LENGTH_UNIT, ID_SEPARATOR, SBPS_NORMAL, 25);
    m_wndStatusBar.SetPaneInfo( PANE_CURSOR_POSITION, ID_SEPARATOR, SBPS_NORMAL, 72);
    m_wndStatusBar.SetPaneInfo( PANE_IMAGE_SIZE, ID_SEPARATOR, SBPS_NORMAL, 72);
    m_wndStatusBar.SetPaneInfo( PANE_BIT_COUNT, ID_SEPARATOR, SBPS_NORMAL, 28);
    m_wndStatusBar.SetPaneInfo( PANE_REGION_ID, ID_SEPARATOR, SBPS_NORMAL, 60);
    m_wndStatusBar.SetPaneInfo( PANE_REGION_SIZE, ID_SEPARATOR, SBPS_NORMAL, 30);
    m_wndStatusBar.SetPaneInfo( PANE_RN_COUNT, ID_SEPARATOR, SBPS_NORMAL, 15);
    return 0;
}
开发者ID:caomw,项目名称:ImageSegmentor,代码行数:38,代码来源:MainFrm.cpp

示例12: TRACE0

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	if (!m_wndToolBar.Create(this) ||
		!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
	}

	if (!m_wndQueryBar.Create(this, IDD_QUERY_BAR, CBRS_TOP, ID_QUERY_BAR))
	{
		TRACE("Failed to create query bar\n");
		return -1;		// fail to create
	}

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

	return 0;
}
开发者ID:jiayuehua,项目名称:InsideVC,代码行数:38,代码来源:MainFrm.cpp

示例13: GetMenu

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    unsigned long index;

    for (index = 1; index < NUMBER_LANGUAGES; index++)
    {
        GetMenu()->CheckMenuItem(identByLanguage[index], MF_BYCOMMAND | MF_UNCHECKED);
    }
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	if (!m_wndToolBar.Create(this) ||
		!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: 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);

	return 0;
}
开发者ID:Almamu,项目名称:homeworld,代码行数:38,代码来源:MainFrm.cpp

示例14: EnableDocking

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

    // create top toolbar
    m_top_bar.Create(this) ;

    // add top toolbar on rebar
    m_rebar.Create(this) ;
    m_rebar.AddBar(&m_top_bar) ;

    // create bottom status bar
    m_bottom_status.CreateBar(this) ;

    EnableDocking (CBRS_ALIGN_ANY) ;

    // effect list, create it before layer manager to dock it on left of layer manager
    m_effect_lib.Create(this) ;

    PostMessage(WM_COMMAND, MAKEWPARAM(ID_EFFECT_LIB_VISIBLE,0)) ;
    return 0 ;
}
开发者ID:ohosrry,项目名称:wtldemo,代码行数:24,代码来源:MainFrm.cpp

示例15: CRect

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	// 创建一个视图以占用框架的工作区
	if (!m_wndView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
		CRect(0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL))
	{
		TRACE0("未能创建视图窗口\n");
		return -1;
	}
	
	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("未能创建工具栏\n");
		return -1;      // 未能创建
	}

	//if (!m_wndStatusBar.Create(this) ||
	//	!m_wndStatusBar.SetIndicators(indicators,
	//	  sizeof(indicators)/sizeof(UINT)))
	//{
	//	TRACE0("未能创建状态栏\n");
	//	return -1;      // 未能创建
	//}
	// TODO: 如果不需要工具栏可停靠,则删除这三行
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar);

	m_wndToolBar.SetButtonStyle(5,TBBS_CHECKBOX  );
	//m_wndToolBar.SetButtonStyle(6,TBBS_CHECKBOX  );

	return 0;
}
开发者ID:shanfl,项目名称:Softcore_SoftwareRasterization,代码行数:37,代码来源:MainFrm.cpp

本文标签属性:

示例:示例图

代码:代码是什么

EnableDocking:EnableDocking

上一篇:责任人和负责人的区别(什么是责任人)
下一篇:Java CalendarProvider类代码示例(javacalendarprovider类代码示例汇总)

为您推荐