★ wanayoo — archive 1999 http://codeguru.developer.com/controls/MultiSliderCtrl.shtmlNouvelle recherche | Portail wanayoo
EarthWeb
Developer.com Click Here!
Click Here!
Find:
 

EXPERT SEARCH
-----
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Contest
mfc codeguru
submission guidelines
 
Book
thinking in c++
stl programmer's guide
reviews
 
Interact
forums
newsgroups
guest book
jobs
jokes
open faq
what's new
 
Other
about
links
newsletters
privacy
tools
 

-----
Visual C++ by E-mail:

Get the weekly e-mail highlights on
Visual C++!
-----



EarthWeb Sites:
CROSSNODES
DATAMATION
DEVELOPER.COM
DICE
DISCUSSIONS
EARTHWEB.COM
EARTHWEB DIRECT
EARTHWEB EVENTS
ERP HUB
GAMELAN
GOCERTIFY
HTML GOODIES
INTRANET JOURNAL
ITKNOWLEDGE
IT NEWS
JARS
JAVASCRIPTS.COM
OPEN SOURCE IT
PERL JOURNAL
SYSOPT.COM
SUPPORTSOURCE
TECHCRAWLER
Y2KINFO

EarthWeb Worldwide

   

Multi-slider Control


This article was contributed by Terri Braxton.

Environment: VC6, NT4 SP3

CMultiSlider is derived from CSliderCtrl so the user can enter one or more intervals. After seeing "Round slider control" by Daniel Frey and the the time interval in "BCG Time Controls" by Stas Levin, I decided to do away with the multiple spin controls I was using.

To use CMultiSlider in your application:

  1. Add CMultiSlider, CEditInterval, and CBubble (written by Stas Levin) to your project.
  2. Add the IDC_DELETE cursor and IDD_EDITINTERVAL dialog to your project.
  3. Add a slider to your dialog adjusting the height to allow for the text underneath; check the boxes for tickmarks, autoticks, and enable selection; and choose bottom/right pointer and horizontal orientation.
  4. Create a member variable in Class Wizard associated with this slider of this type.
  5. In the OnInitDialog(), call SetRanges() to set the minimum and maximum values for the slider and SetTicFreq() to set the tickmark interval.
  6. Customize other settings if you wish - whether you want colors displayed (default is no), whether you want the text displayed as integers or floats (default is floats), and the maximum number of markers displayed (default is 3).

The Inputs sections of the demo project illustrates the variables that would normally be set in OnInitDialog(). The Outputs sections demonstrates what would be passed back to your application (the first seven values set are displayed) when the dialog closes. Also, the color of each interval can be set by right-clicking within the interval to display the CColorDialog and right-clicking on the marker displays an edit box so you can type in the value of the marker.

Downloads

Executable - 118 Kb
Download demo project - 26 Kb

History

Date Posted: February 3, 2000

Comments:

Add Comment

   

Give them a visit Click Here!

Click Here!

INSTANT EXPERTS!
Savvy IT Pros report on SupportSource. Take a look inside the largest vault of multi-vendor computing specs ever assembled. Click here for an In-depth Report,.

Learn about Free & Open Source software at the Bazaar Conference & Expo!,
December 14-16, 1999 in New York City! Click here for more information.

For tons of Windows technology resources, check out the Windows Programming directory.

Go to Fatbrain for the NEWEST and BEST technical books for IT professionals.

Get Linux Utilities for ONLY $34.95 at EarthWeb Direct.

Give them a visit Click Here!

Click Here!

Click Here!

Click Here!

Home About Us Search Subscribe Advertising Info Contact Us FAQs
Use of this site is subject to certain Terms & Conditions.
Earthweb's statement regarding our users' right to privacy.
Copyright ©1996-2000 EarthWeb Inc.. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited.