second CStatusBar
-
Hi My application is C++ using MFC, generated by VC6++ AppWizard (exe), is a MDI and has a CView and a CScrollView in a splitted window. It has the usual status bar generated by the AppWizard. Now I want to add a second status bar right above the first one. Until now I just "duplicated" the code of the CStatusBar in MainFrm.h and MainFrm.cpp - and it works: the status bar is there, I can define and access several panes. The problem is: the second status bar although has this "resizing triangle" - which produces unwanted effects when used. The question is: how to remove this "resizing triangle"? Screenshot is here. Thanks, Matthias
-
Hi My application is C++ using MFC, generated by VC6++ AppWizard (exe), is a MDI and has a CView and a CScrollView in a splitted window. It has the usual status bar generated by the AppWizard. Now I want to add a second status bar right above the first one. Until now I just "duplicated" the code of the CStatusBar in MainFrm.h and MainFrm.cpp - and it works: the status bar is there, I can define and access several panes. The problem is: the second status bar although has this "resizing triangle" - which produces unwanted effects when used. The question is: how to remove this "resizing triangle"? Screenshot is here. Thanks, Matthias
TeeTeeHaa wrote: The problem is: the second status bar although has this "resizing triangle" - which produces unwanted effects when used. The size grip appears because the parent window is resizable. trace into the CStatusBar::Create() and you will see:
if (pParentWnd->GetStyle() & WS_THICKFRAME) dwStyle |= SBARS_SIZEGRIP;
This is why the size grip appears, even if you create it without the SBARS_SIZEGRIP flag. I think you can acomplish what you want by creating your own class derived from CStatusBar, and override PreCreateWindow(). Enis Arif ----------- "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." (Albert Einstein)