Print Page | Close Window

Possible to hide gripper?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1467
Printed Date: 23 June 2025 at 12:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Possible to hide gripper?
Posted By: sbinder
Subject: Possible to hide gripper?
Date Posted: 26 November 2004 at 8:49am

Is it possible to hide the gripper of the commandbars (toolbar and menubar)?

How do you make the TOOLBARS (with icons) in the sample "CommandBarIcons"?




Replies:
Posted By: Maye Johnson
Date Posted: 27 November 2004 at 6:11am
I have an app that has 2 status bars, but the one on top shouldn't have the resize gripper.  After tracing through the status bar creation code, I came up with the following work-around:


        // Check window style for WS_THICKFRAME and remove it if present.  This must be done because adding a second status bar to an app
        // that has a resizing border will add a resizing gripper to the status bar, which we don't want.  The call to CStatusBar::Create
        // calls CStatusBar::CreateEx, which in turn checks the parent's style for WS_THICKFRAME, and if present, adds the SBARS_SIZEGRIP
        // style.  By removing WS_THICKFRAME from the parent's style, creating the second status bar, then adding WS_THICKFRAME back to
        // the parent if it was present in the first place, we achieve our goal.
        bool    bThickFrame = false;
        if (GetStyle() & WS_THICKFRAME)
        {
            bThickFrame = true;
            ModifyStyle(WS_THICKFRAME, 0, 0);
        }
        if (!m_wndDebugStatusBar.Create(this) ||
            !m_wndDebugStatusBar.SetIndicators(g_deb ugStatusIndicators, sizeof(g_debugStatusIndicators) / sizeof(UINT)))
        {
            TRACE0("Failed to create debug status bar\n");
            return -1;      // fail to create
        }
        if (bThickFrame)
            ModifyStyle(0, WS_THICKFRAME, 0);




Posted By: sbinder
Date Posted: 29 November 2004 at 4:02am

Thanks!

I used

pToolBar->ModifyBarStyle(CBRS_GRIPPER,0);

for my Toolbar.

But I can't hide the gripper of the MenuBar.



Posted By: Oleg
Date Posted: 30 November 2004 at 12:46am

it must work same:

pMenuBar->ModifyBarStyle(CBRS_GRIPPER,0);



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: sbinder
Date Posted: 30 November 2004 at 4:11am

ModifyBarStyle()  is a memberfunction of CXTPToolbar, not of CXTPCommand.



Posted By: Oleg
Date Posted: 30 November 2004 at 7:31am

pMenuBar must be CXTPMenuBar*;

CXTPMenuBar* pMenuBar = pCommandBars->SetMenu....

 

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: franji1
Date Posted: 28 June 2005 at 8:04pm

In XTPro, the XTPToolbar::ModifyBarStyle signature appears to have a bug - here it is:

ModifyBarStyle(WORD dwRemove, DWORD dwAdd);

note that the hungarian notation is "dwRemove", but the actual type in the signature is WORD, not DWORD, hence any style that is beyond 0x10000 will NOT WORK (basically the same as dwRemove = 0x0000).

Guess what the value for CBRS_GRIPPER is - see XTPIncludes.h

#define CBRS_GRIPPER 0x00400000L

which is the same as a (WORD)0x0000.

we are building the .DLL under a different name so we CAN tweak the source (and not break anyone else).



Posted By: Oleg
Date Posted: 03 July 2005 at 11:41pm

Hi,

It was fixed in previous versions. Update your sources.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net