Remove system menu from floating toolbar
When a toolbar floats, the MFC framework normally supplies a window menu (formerly known as system menu) to the toolbar. The toolbar can be floated by a double click or by dragging it to the center of the screen. This code demonstrates how to do it.
Note: I could not get the mini frame window to repaint. So I had to first hide and then show the toolbar to achieve the same effect. I tried UpdateWindow, SetWindowPos, MoveWindow etc. Suggestions welcome.
1. Derive your own toolbar CMyToolBar from CToolBar and update the m_wndToolBar member in the main frame.
2. In CMyToolBar::OnLButtonDblClk(...), add the following:
CToolBar::OnLButtonDblClk(...); //fill the parameters if (IsFloating()) //is toolbar floating { CWnd* pMiniFrame; CWnd* pDockBar; pDockBar = GetParent(); pMiniFrame = pDockBar->GetParent(); //get rid of window menu pMiniFrame->ModifyStyle(WS_SYSMENU, NULL); //extreme way of re-painting the toolbar pMiniFrame->ShowWindow(SW_HIDE); pMiniFrame->ShowWindow(SW_SHOW); }
3. Repeat same code in OnLButtonDown(...) and elsewhere.

Comments
Nike Draught Max+instagram, will you confine the color to bear up on your feet!
Posted by madytreathy on 04/19/2013 02:53amRecognize in 2008, if not earlier, when Nike launched up ahead of the independent shoe color projects, the watchword "Shoot Your Colours", "Nike PhotoiD" arrangement, [url=http://northernroofing.co.uk/roofins.cfm]nike free run[/url] response has not been as fervent as expected. Think, 2008 Canon IXUS 80 IS Digital prankster arcade but contrariwise 8 million pixels, Nokia, the motorized phone superstore is the one leadership, NikeiD was promote to color in the photos as a essence someone is concerned sneakers levy color, although exciting, but does trouble some. Instagram which make this thing make sport and elemental, Nike PHOTOiD homeopathic upgrade customization services, recently [url=http://northernroofing.co.uk/roofins.cfm]nike free run uk[/url] released a fresh plan. That such iD can you implement pictures as instagram account shoe color, for a short put up Nike Aura Max shoes and Nike Refresh Max 1, Nike Air Max 90 953 options. Interested in children's shoes, you [url=http://northernroofing.co.uk/roofins.cfm]nike free run 3[/url] can without exception go's official website photoid.Nike.com, in addition to skim through other people's ingenious charge, or you can try to upload your own instagram photo, build your own Nike Hauteur Max.
ReplyAnother way to update miniframe (and any other window at all)
Posted by Scrambler on 08/06/2004 06:21amI want to suggest you a better way to redraw a window. I'm always using this method in my apps. pMiniFrame->SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_DRAWFRAME);
ReplyThe CORRECT way to repaint miniframe window
Posted by Legacy on 12/01/2002 12:00amOriginally posted by: Lord KiRon
ReplyRemove system menu from floating toolbar
Posted by Legacy on 07/12/2002 12:00amOriginally posted by: Arie
There is another approtch to leave the system menu but disable the toolbar from closing using the DelayShow virtual function in the CControlBar
in the controll toolbar there is a function
class CMyToolBat : public CToolBar
{
.....
public:
virtual void DelayShow(BOOL bShow);
....
};
U can overwrite the function and return nothing
void CMyToolBat::DelayShow(BOOL bShow)
{
}
or set the value of bShow to 1 i.e display always never hide.
void CMyToolBat::DelayShow(BOOL bShow)
{
bShow = 1 ;
CControlBar::DelayShow(bShow) ;
}
The normal operation is
void CMyToolBat::DelayShow(BOOL bShow)
{
CControlBar::DelayShow(bShow) ;
}
I hope that this approtch also acceptable altough the close icon appears but does nothing.
ReplyDisable/Enable controls on toolbar.
Posted by Legacy on 02/19/2002 12:00amOriginally posted by: Nga Lin
Please show me how to disable/enable the controls (such as button, combobox, etc.) in the toolbar of a single document application.
ReplyThank in advance.
Nga Lin.
Repainting the mini-frame window
Posted by Legacy on 09/17/2001 12:00amOriginally posted by: Alex Letov
I too was suffering from this problem and suggest the following:
1. pMiniFrame->RedrawWindow( NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_FRAME );
or
2.pMiniFrame->SendMessage( WM_NCPAINT, 1, 0 );
ReplypMiniFrame->UpdateWindow();
A more efficient approach might be...
Posted by Legacy on 01/18/2000 12:00amOriginally posted by: Kirk Stowell
ReplyRepainting the mini frame window
Posted by Legacy on 12/30/1999 12:00amOriginally posted by: Mark Freeman
I too was suffering from this problem and was having little success with ShowWindow. In my case I was just trying to get a floating toolbar to reappear if the user closed it via the 'X' on the mini frame.
To do this, call the ShowControlbar method of CMiniFrameWindow instead of ShowWindow and it seems to repaint itself correctly.
// pMiniFrame->ShowWindow(SW_HIDE);
// pMiniFrame->ShowWindow(SW_SHOW);
pMiniFrame->ShowControlBar((CControlBar*)this,TRUE,FALSE);
ReplyRepainting a mini-frame window
Posted by Legacy on 05/28/1999 12:00amOriginally posted by: Marcus Breese
ReplyDoubleClick is not captured by the Derived Toolbar class
Posted by Legacy on 04/08/1999 12:00amOriginally posted by: Simon Pettman
Reply