Click here to Skip to main content
15,885,128 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello All,
I Have little application to drawn different different shapes on client area of window in mfc.
Type of shape is selected from toolbar.A shape toolbar is dynamically created depends on the number of images present in "\drawShapes\Img\*" folder.That is if i have 10 images in folder "\drawShapes\Img\*".Then my toolbar contain 10 Buttons to draw a shapes.

Application run fine when i have limmited shapes.like line,rectangle ect on toolbar. All these shapes are properly fitted in sigle screen.But problem arises when i want to load 25 images from folder to toolbar.a size of toolbar is so long so some buttons Are Visible but some are not.Buttons that not comes in screen goes out side so i doesn't get event of that button.

Now my question is :
1)What is alternative?
2)Is there possibility of scrolling toolbar?
3)Is we provide combo box for selecting remainnig buttons?like button that lastly display attach combo to select hided combo box.

_______________________________________________________________________
All related HELPS,LINKS,CODE BLOCKS Are most WELCOME

Regard,
Posted
Updated 15-Aug-11 23:54pm
v4

1 solution

Something like this perhaps?
Toolbars with embedded Combo Boxes[^]
 
Share this answer
 
Comments
Coder Block 16-Aug-11 23:15pm    
not required combo like this i want at end containning all remainning toobar button
enhzflep 16-Aug-11 23:29pm    
:confused:
Riight...

So what's the problem with it? Wouldn't you just position it last on the toolbar, and modify the code used to add items to it? Surely you can determine the width of the toolbar, the size of the buttons and therefore can calculate the number of buttons that will fit in the toolbar before dissapearing off the edge of the screen.

Anyway, the code shows how to create a toolbar with a combobox. It's up to you to change some of the implementation details to suit your project.

That's my $0.02

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900