Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Toolbar button-size increases
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar button-size increases

 Post Reply Post Reply
Author
Message
Daniel Strigl View Drop Down
Newbie
Newbie


Joined: 16 May 2004
Location: Austria
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Daniel Strigl Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar button-size increases
    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...
    //




Edited by Daniel Strigl
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.