Click here to Skip to main content
14,421,821 members

Transparent CSliderCtrl Class

Rate this:
4.54 (6 votes)
Please Sign up or sign in to vote.
4.54 (6 votes)
14 Nov 2002CPOL
A MFC Transparent CSliderCtrl class



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.


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.


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
No Biography provided

Comments and Discussions

GeneralDoesn't work with CScrollView Pin
hoxsiew27-Mar-07 11:13
Memberhoxsiew27-Mar-07 11:13 
GeneralTransparent Control Pin
Arijit Datta8-Mar-07 21:41
MemberArijit Datta8-Mar-07 21:41 
Generalpocket pc application Pin
jstanna11-Feb-05 6:57
Memberjstanna11-Feb-05 6:57 
GeneralProblem with the resizing windows Pin
Atif Mushtaq31-May-04 0:14
MemberAtif Mushtaq31-May-04 0:14 
GeneralRe: Problem with the resizing windows Pin
ranxiaowu12-Dec-12 20:44
Memberranxiaowu12-Dec-12 20:44 
GeneralProblem with the background Pin
Olaf Gramkow5-Nov-03 11:43
MemberOlaf Gramkow5-Nov-03 11:43 
GeneralRe: Problem with the background Pin
mal clarke uk17-Jul-05 11:32
Membermal clarke uk17-Jul-05 11:32 
GeneralChanging the background of the slider Pin
Manju16-Jul-03 22:17
MemberManju16-Jul-03 22:17 
GeneralDrawTransparent() question Pin
Harold Bamford21-Nov-02 9:37
MemberHarold Bamford21-Nov-02 9:37 
GeneralRe: DrawTransparent() question Pin
Nic Wilson21-Nov-02 12:13
MemberNic Wilson21-Nov-02 12:13 
GeneralRe: DrawTransparent() question Pin
Harold Bamford22-Nov-02 9:05
MemberHarold Bamford22-Nov-02 9:05 
GeneralRe: DrawTransparent() question Pin
David Cole30-Jul-04 8:00
MemberDavid Cole30-Jul-04 8:00 
AnswerRe: DrawTransparent() question Pin
dhclark3-Nov-10 9:11
Memberdhclark3-Nov-10 9:11 
QuestionBetter way to know vertical from horizontal? Pin
Harold Bamford20-Nov-02 18:27
MemberHarold Bamford20-Nov-02 18:27 
AnswerRe: Better way to know vertical from horizontal? Pin
Nic Wilson21-Nov-02 12:18
MemberNic Wilson21-Nov-02 12:18 
GeneralChanging the background image Pin
Atlantys22-Sep-02 8:51
MemberAtlantys22-Sep-02 8:51 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Posted 18 Dec 2001


45 bookmarked