Click here to Skip to main content
11,928,987 members (54,437 online)
Rate this:
Please Sign up or sign in to vote.
See more: VC6 VC7 VC7.1 VC8.0 C++ MFC combobox , +
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 16-Aug-11 0:50am
Edited 16-Aug-11 0:54am

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
Web03 | 2.8.151126.1 | Last Updated 16 Aug 2011
Copyright © CodeProject, 1999-2015
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