Click here to Skip to main content
Click here to Skip to main content

Transparent CSliderCtrl Class

By , 14 Nov 2002
 

sliders.jpg

Introduction

This is a MFC transparent slider class. As it uses CSliderCtrl as its base class it can be used as a replacement class for any CSliderCtrl object. Tic marks are fully supported as can be seen in the screen shot above. To use, add this class to your project. Add your sliders to your project normally, then change the CSliderCtrl type in your .h file to CMySliderControl and #include the MySliderControl.h file. Once compiled your sliders will be transparent and if you have auto tics set then these too will show.

Update

V2.0 Re-wrote parts of the class. Added the ability to redraw the controls when the backgrounds had changed. Added custom transparent channel and custom thumb with optional colours. The demo source has been updated to show the background changing.

License

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

About the Author

Nic Wilson
Web Developer
Australia Australia
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralDoesn't work with CScrollViewmemberhoxsiew27 Mar '07 - 10:13 
GeneralTransparent Controlmemberarijit_datta268 Mar '07 - 20:41 
Generalpocket pc applicationmemberjstanna11 Feb '05 - 5:57 
GeneralProblem with the resizing windowsmemberAtif Mushtaq30 May '04 - 23:14 
GeneralRe: Problem with the resizing windowsmemberranxiaowu12 Dec '12 - 19:44 
GeneralProblem with the backgroundmemberOlaf Gramkow5 Nov '03 - 10:43 
GeneralRe: Problem with the backgroundmembermalcolm clarke17 Jul '05 - 10:32 
GeneralChanging the background of the slidermemberManju16 Jul '03 - 21:17 
GeneralDrawTransparent() questionmemberHarold Bamford21 Nov '02 - 8:37 
GeneralRe: DrawTransparent() questionmemberNic Wilson21 Nov '02 - 11:13 

Hi,
 
This is the only way I have found to make sure a full set of paint messages are sent, mainly needed for the users who need to change backgrounds with transparent controls.
 
Nic

GeneralRe: DrawTransparent() questionmemberHarold Bamford22 Nov '02 - 8:05 
GeneralRe: DrawTransparent() questionmemberDavid Cole30 Jul '04 - 7:00 
AnswerRe: DrawTransparent() questionmemberdhclark3 Nov '10 - 8:11 
QuestionBetter way to know vertical from horizontal?memberHarold Bamford20 Nov '02 - 17:27 
AnswerRe: Better way to know vertical from horizontal?memberNic Wilson21 Nov '02 - 11:18 
GeneralChanging the background imagememberAtlantys22 Sep '02 - 7:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 15 Nov 2002
Article Copyright 2001 by Nic Wilson
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid