Click here to Skip to main content
12,943,742 members (55,462 online)
Rate this:
Please Sign up or sign in to vote.
Hi guy,
My tool bar work fine with limited buttons on it like,
i have 20 buttons on of 30x30 size then ok, my tool bar works fine,
Problem arised when my number of buttons on tool bar increase,
If my toolbar have 90 buttons on it then more than 20 buttons cross the mainframe window.
so user cannot access those button that place outside the main frame.

so provide me any link,succestion or block of code that allows me to solve this problem.

Thanks and regard.
santosh dhanawade.
Posted 16-Dec-12 23:50pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is not a good design, 90 buttons in a single toolbar is just going to confuse people. You should either use multiple toolbars, or the new Ribbon style bars as used in the newer Microsoft Office products. Take a look at these links[^] for help on using the Ribbon.
Maximilien 17-Dec-12 6:44am
The current framework (MFC?) does restrict the number of buttons on the toolbar; The user can (if enabled) even customize his toolbars to add more buttons.
Richard MacCutchan 17-Dec-12 6:46am
I'm not sure why you are telling me this.
Coder Block 18-Dec-12 6:43am
90 button needed ..
I gives a option of customize tool bar ..
but user cross the frame wnd by showing lots of buttons then??
Richard MacCutchan 18-Dec-12 8:12am
Then you have to do the same thing that Windows office does, and have a drop down button at the end of the bar that holds all the buttons that cannot be displayed. Or, you can use the Ribbon toolbar, as I suggested above. Or, you can look at your design and figure out why you need all these buttons.
Coder Block 19-Dec-12 1:09am
hmm but i am using studio 2003 server edition ..
i dont get control like ribbon in it??
or may be i am wrong.
Richard MacCutchan 19-Dec-12 4:18am
OK, so you cannot use the Ribbon option, that leaves you to investigate the other method.
Coder Block 20-Dec-12 6:32am
do you have any alternative?
Richard MacCutchan 20-Dec-12 6:36am
I have explained what the alternatives are, now it is up to you to investigate them and decide which you can use. If you believe there may be others then I would suggest some Google searching.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I'm not in front of a Windows OS right now, but I think the MFC framework adds a little "drop-down" button at the right of the toolbar that will open a menu of some kind displaying the buttons that cannot be displayed.

Have a look at the CMFCToolbar documentation.
Coder Block 18-Dec-12 6:42am
how to do that??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,643
CHill60 2,970
Maciej Los 2,348
Jochen Arndt 1,900
ppolymorphe 1,765

Advertise | Privacy | Mobile
Web01 | 2.8.170518.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100