Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Maximize button in CExtControlBar? Collapse All
Subject Author Date
Reyes Ponce Apr 5, 2006 - 9:41 AM

I’m evaluating your library and had a question.

Is it possible to put a maximize button in the title bar of a CExtControlBar, so that you would have autohide, maximize, and close buttons?

Technical Support Apr 5, 2006 - 12:01 PM

The expand/contract button is supported in the resizable control bar but it is turned off by default because it is not well compatible with the idea and style of Visual Studio .NET / Visual Studio 2005 resizable panel bar. If you want to see this button, then implement the following virtual method in a CExtControlBar-derived class:

class CYourBar : public CExtControlBar
{
    virtual void OnNcAreaButtonsReinitialize()
    {
        ASSERT_VALID( this );

        INT nCountOfNcButtons = NcButtons_GetCount();
        if( nCountOfNcButtons > 0 )
            return;

        NcButtons_Add( new CExtBarNcAreaButtonClose(this) );

#if (!defined __EXT_MFC_NO_TAB_CONTROLBARS)
        NcButtons_Add( new CExtBarNcAreaButtonAutoHide(this) );
#endif // (!defined __EXT_MFC_NO_TAB_CONTROLBARS)

 // THIS ONE LINE IS COMMENTED IN THE CExtControlBar::OnNcAreaButtonsReinitialize() METHOD
        NcButtons_Add( new CExtBarNcAreaButtonExpand(this) );
 
        NcButtons_Add( new CExtBarNcAreaButtonMenu(this) );
    }

};

Reyes Ponce Apr 5, 2006 - 3:43 PM

I added this but it didn’t seem to work. It did add another button to the control bar, but it’s a down arrow button that is disabled. I added this to the test_frame_in_bar sample you guys sent me the other day.

Reyes Ponce Apr 5, 2006 - 10:36 PM

Ok. I see how this works. The arrow is only on when control bars are docked and stacked and pressing it just makes the control bar take up the space being used by the other one

That’s not the functionality I was looking for.

I guess I could override this same code to put my own button up there?

Technical Support Apr 6, 2006 - 11:00 AM

We could help you code any other behavior of the expanding/collapsing button but we think it is not a good idea to use this button in the Visual Studio .NET / Visual Studio 2005-like resizable control bars.

Reyes Ponce Apr 6, 2006 - 11:33 AM

Well, whether you like it or not, that is what my customers want. They want to be able to drag the control bar onto their second monitor and make it full screen.

Can I put my own button up there that uses the same icon as the normal Windows maximize button and do this or not?

Technical Support Apr 7, 2006 - 6:24 AM

We code a simple version of the maximizable floating bar. But, to get this finished, some modification of the Prof-UIS library is required:

- maximized floating mini frames should not have resizable borders

- the serialization code should be able to save/restore window placement data

We can regard this as a custom work because this implements some non-standard UI behavior. So, if you are really interested in this, please contact us by e-mail.