Click here to Skip to main content
10,500,000 members (133,829 online)
Rate this:
Please Sign up or sign in to 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 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.


Posted 15-Aug-11 23:50pm
Updated 15-Aug-11 23:54pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Something like this perhaps?
Toolbars with embedded Combo Boxes[^]
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

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 16 Aug 2011
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