如何在MFC SDI App中删除菜单栏左侧的点? [英] How can I remove dots from left side of menu bar in MFC SDI App?
问题描述
我有一个MFC SDI应用程序.我通过注释掉MainFrm.cpp中的以下代码删除了工具栏:
I have an MFC SDI App. I have removed the tool bar by commenting out the code below in MainFrm.cpp:
//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(theApp.m_bHiColorIcons ? IDR_MAINFRAME_256 : IDR_MAINFRAME))
//{
// TRACE0("Failed to create toolbar\n");
// return -1; // fail to create
//}
//CString strToolBarName;
//bNameValid = strToolBarName.LoadString(IDS_TOOLBAR_STANDARD);
//ASSERT(bNameValid);
//m_wndToolBar.SetWindowText(strToolBarName);
//CString strCustomize;
//bNameValid = strCustomize.LoadString(IDS_TOOLBAR_CUSTOMIZE);
//ASSERT(bNameValid);
//m_wndToolBar.EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, strCustomize);
//// Allow user-defined toolbars operations:
//InitUserToolbars(NULL, uiFirstUserToolBarId, uiLastUserToolBarId);
我现在只在主框架的顶部有一个菜单栏,这就是我想要的.但是,菜单栏的左侧有一些非常烦人的垂直点.点的阴影比背景略暗.谁能告诉我这些是什么以及如何摆脱它们.从那以后,我注意到有些应用程序具有这些功能,而另一些则没有.我不知道为什么会这样,它们似乎没有任何用处.
I now just have a menu bar across the top of the main frame, which is what I want. However, there are these really annoying small set of vertical dots to the left of the menu bar. The dots are a slightly darker shade than the background. Can anyone tell me what these are and how to get rid of them. I have since noticed that some applications have these and others don''t. I don''t know why this is, they don''t seem to have any use.
推荐答案
点是抓手样式.要删除它们,必须使用〜CBRS_GRIPPER.像这样的东西:
m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle()&〜(CBRS_GRIPPER | CBRS_FLOATING)| CBRS_TOOLTIPS | CBRS_TOP | CBRS_SIZE_FIXED);
That dots are the gripper style. To remove them, you must use ~CBRS_GRIPPER. Something like:
m_wndMenuBar.SetPaneStyle( m_wndMenuBar.GetPaneStyle()& ~(CBRS_GRIPPER | CBRS_FLOATING) | CBRS_TOOLTIPS | CBRS_TOP | CBRS_SIZE_FIXED );
这篇关于如何在MFC SDI App中删除菜单栏左侧的点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!