Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

1 solution

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 );
 
Share this answer
 
Comments
Espen Harlinn 25-Jan-12 8:48am    
5'ed!
Jackie Lloyd 25-Jan-12 9:13am    
fantastic - that sorted it. Thankyou very much.
ErnestoNet 25-Jan-12 10:08am    
You're welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900