|
@@ -78,8 +78,9 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
return -1; // 未能创建
|
|
|
}
|
|
|
|
|
|
- CString strTitlePane1;
|
|
|
- CString strTitlePane2;
|
|
|
+ // 窗口底部状态栏
|
|
|
+ CString strTitlePane1;// 窗格1;
|
|
|
+ CString strTitlePane2;// 窗格2;
|
|
|
bNameValid = strTitlePane1.LoadString(IDS_STATUS_PANE1);
|
|
|
ASSERT(bNameValid);
|
|
|
bNameValid = strTitlePane2.LoadString(IDS_STATUS_PANE2);
|
|
@@ -92,10 +93,10 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
// 启用 Visual Studio 2005 样式停靠窗口自动隐藏行为
|
|
|
EnableAutoHidePanes(CBRS_ALIGN_ANY);
|
|
|
|
|
|
+#if __OUTLOOKBAR__
|
|
|
// 导航窗格将创建在左侧,因此将暂时禁用左侧的停靠:
|
|
|
EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM | CBRS_ALIGN_RIGHT);
|
|
|
|
|
|
-#if __OUTLOOKBAR__
|
|
|
// 创建并设置“Outlook”导航栏:
|
|
|
if (!CreateOutlookBar(m_wndNavigationBar, ID_VIEW_NAVIGATION, m_wndTree, m_wndCalendar, 250))
|
|
|
{
|
|
@@ -111,9 +112,11 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
return -1; // 未能创建
|
|
|
}
|
|
|
|
|
|
+#if __OUTLOOKBAR__
|
|
|
// 已创建 Outlook 栏,应允许在左侧停靠。
|
|
|
EnableDocking(CBRS_ALIGN_LEFT);
|
|
|
EnableAutoHidePanes(CBRS_ALIGN_RIGHT);
|
|
|
+#endif
|
|
|
|
|
|
// 加载菜单项图像(不在任何标准工具栏上):
|
|
|
CMFCToolBar::AddToolBarForImageCollection(IDR_MENU_IMAGES, theApp.m_bHiColorIcons ? IDB_MENU_IMAGES_24 : 0);
|
|
@@ -134,7 +137,15 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
|
|
DockPane(&m_wndOutput);
|
|
|
m_wndProperties.EnableDocking(CBRS_ALIGN_ANY);
|
|
|
DockPane(&m_wndProperties);
|
|
|
-
|
|
|
+ /*
|
|
|
+ 如果关闭了CDockablePane,使用ShowPane重显;
|
|
|
+ 如下代码片段:
|
|
|
+ if ( m_wndFileView.GetSafeHwnd() )
|
|
|
+ {
|
|
|
+ m_wndFileView.ShowPane(TRUE, FALSE, TRUE);
|
|
|
+ }
|
|
|
+ 参考:https://www.cnblogs.com/canger/p/4156531.html
|
|
|
+ */
|
|
|
|
|
|
// 启用增强的窗口管理对话框
|
|
|
EnableWindowsDialog(ID_WINDOW_MANAGER, IDS_WINDOWS_MANAGER, TRUE);
|
|
@@ -290,6 +301,7 @@ void CMainFrame::InitializeRibbon()
|
|
|
pBtnWindows->SetMenu(IDR_WINDOWS_MENU, TRUE);
|
|
|
pPanelWindow->Add(pBtnWindows);
|
|
|
|
|
|
+#if __STYLE__
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
// 添加 "样式" 按钮;
|
|
|
// 将元素添加到选项卡右侧:
|
|
@@ -306,6 +318,7 @@ void CMainFrame::InitializeRibbon()
|
|
|
ASSERT(bNameValid);
|
|
|
pVisualStyleButton->SetDescription(strTemp);
|
|
|
m_wndRibbonBar.AddToTabs(pVisualStyleButton);
|
|
|
+#endif
|
|
|
|
|
|
#if __QUICKACCESS_COMMAND__
|
|
|
// 添加快速访问工具栏命令:
|
|
@@ -570,11 +583,26 @@ void CMainFrame::OnUpdateApplicationLook(CCmdUI* pCmdUI)
|
|
|
|
|
|
void CMainFrame::OnViewCaptionBar()
|
|
|
{
|
|
|
+#if 0
|
|
|
m_wndCaptionBar.ShowWindow(m_wndCaptionBar.IsVisible() ? SW_HIDE : SW_SHOW);
|
|
|
RecalcLayout(FALSE);
|
|
|
+#else
|
|
|
+ if ( m_wndFileView.GetSafeHwnd() )
|
|
|
+ {
|
|
|
+ m_wndFileView.ShowPane(TRUE, FALSE, TRUE);
|
|
|
+ }
|
|
|
+ if ( m_wndClassView.GetSafeHwnd() )
|
|
|
+ {
|
|
|
+ m_wndClassView.ShowPane(TRUE,FALSE,TRUE);
|
|
|
+ }
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
void CMainFrame::OnUpdateViewCaptionBar(CCmdUI* pCmdUI)
|
|
|
{
|
|
|
+#if 0
|
|
|
pCmdUI->SetCheck(m_wndCaptionBar.IsVisible());
|
|
|
+#else
|
|
|
+ pCmdUI->SetCheck(m_wndFileView.IsVisible() || m_wndClassView.IsVisible());
|
|
|
+#endif
|
|
|
}
|