Print Page | Close Window

Toolbar button-size increases

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=738
Printed Date: 08 July 2025 at 9:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar button-size increases
Posted By: Daniel Strigl
Subject: Toolbar button-size increases
Date Posted: 16 May 2004 at 10:45am
Why does the size of my toolbar buttons increase when I add a drop-down button?
I have three toolbars, the first toolbar has a drop-down button.
The first toolbar buttons are bigger than the buttons of the other toolbars, that doesn't look good!
How can I prevent this?

Here is the code I am using:

    // Create standard toolbar
    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(IDR_MAINFRAME))
    {
        LOGERROR(_T("Failed to create standard toolbar."));
        TRACE0("Failed to create standard toolbar.\n");
        ASSERT(false);
        return -1; // Failed to create standard toolbar
    }

    // Set title for the standard toolbar
    m_wndToolBar.SetWindowText(_T("Standard"));

    // Add drop down arrow to the standard toolbar
    VERIFY(m_wndToolBar.AddDropDownButton(ID_FILE_OPEN, IDR_MRU, TRUE));

    // Add text to the standard toolbar
    for (int i = 0; i < _countof(txtMapToolBar); ++i)
    {
        m_wndToolBar.SetButtonText(m_wndToolBar.CommandToIndex(
            txtMapToolBar.nCmdID), txtMapToolBar.lpszText);
    }

    // Recalc toolbar layout
    m_wndToolBar.AutoSizeToolbar();

    ////////////////////////////////////////////////////////////

    //
    // Create the other two toolbars...
    //





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