15,979
社区成员
发帖
与我相关
我的任务
分享
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (!m_wndb1.Create (_T("11111"), this, CRect (0, 0, 200, 200),
TRUE, ID_VIEW_B1,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create B1!\n");
return -1; // fail to create
}
m_wndb1.SetIcon (imagesWorkspace.ExtractIcon (0), FALSE);
if (!m_wndb2.Create (_T("22222"), this, CRect (0, 0, 200, 200),
TRUE, ID_VIEW_B2,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create B2!\n");
return -1; // fail to create
}
m_wndb2.SetIcon (imagesWorkspace.ExtractIcon (1), FALSE);
if (!m_wndb4.Create (_T("44444"), this,
CRect (0, 0, 200, 200),
TRUE, ID_VIEW_CAMERAPLATFORM,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
| WS_CLIPCHILDREN | CBRS_ALIGN_RIGHT| CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create B4!\n");
return -1; // fail to create
}
m_wndB4.SetIcon (imagesWorkspace.ExtractIcon (2), FALSE);
if (!m_wndB5.Create (_T("55555"), this, CRect (0, 0, 200, 200),
TRUE, ID_VIEW_ALARMINPUTTREE,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN
| CBRS_RIGHT | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create B5!\n");
return -1; // fail to create
}
m_wndB5.SetIcon (imagesWorkspace.ExtractIcon (3), FALSE);
if (!m_wndB3.Create (_T("信息"), this, CSize (150, 100),
TRUE /* Has gripper */, ID_VIEW_OUTPUT,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS
| WS_CLIPCHILDREN | CBRS_BOTTOM | CBRS_FLOAT_MULTI))
{
TRACE0("Failed to create B3\n");
return -1; // fail to create
}
m_wndB3.SetIcon (imagesWorkspace.ExtractIcon (6), FALSE);
CString strMainToolbarTitle;
strMainToolbarTitle.LoadString (IDS_MAIN_TOOLBAR);
m_wndB1.EnableDocking(CBRS_ALIGN_ANY);
m_wndB2.EnableDocking(CBRS_ALIGN_ANY);
m_wndB4.EnableDocking(CBRS_ALIGN_ANY);
m_wndB5.EnableDocking(CBRS_ALIGN_ANY);
m_wndB3.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
EnableAutoHideBars(CBRS_ALIGN_ANY);
DockControlBar(&m_wndB1);
m_wndB2.AttachToTabWnd (&m_wndB1, BCGP_DM_STANDARD, FALSE, NULL);
DockControlBar(&m_wnd5);
DockControlBar(&m_wnd4);
RecalcLayout(TRUE);
DockControlBar(&m_wndB3);
}