Click here to Skip to main content
15,896,912 members
Articles / Desktop Programming / MFC

Transparent CSliderCtrl Class

Rate me:
Please Sign up or sign in to vote.
4.54/5 (6 votes)
14 Nov 2002CPOL 140K   8.9K   47  
A MFC Transparent CSliderCtrl class
Public Class Members for Transparent CSlider Class.
By Nic Wilson (C) 2002  nicw@bigpond.net.au

/*-------------------------------------------------------------------------------------------------------------
CMySliderControl::SetThumbColors
This function is optional.  If not supplied the colours of the thumbs will be windows standard colour defined
as COLOR_3DFACE when not selected and COLOR_3DHIGHLIGHT when selected.

void SetThumbColors(
COLORREF face, 
COLORREF highlight)

PARAMETERS

face  
A COLORREF variable that supplies the colour of the thumb when not selected.  The RGB macro can be used to 
supply this parameter.  For example for medium red,  RGB(196, 0, 0);

highlight
A COLORREF variable that supplies the colour of the thumb when selected. The RGB macro can be used to 
supply this parameter.  For example for bright red,  RGB(255, 0, 0);


RETURN VALUE

none

SEE ALSO
--------------------------------------------------------------------------------------------------------------*/

/*-------------------------------------------------------------------------------------------------------------
CMySliderControl::DrawTransparent
This function is optional.  It is used to redraw the slider when the background has changed, so that the new
background is added to the rect area of the slider.

void DrawTransparent(
BOOL bRepaint)

PARAMETERS

bRepaint

A boolean variable.  If TRUE the slider is redrawn immediately, if false it is not.

RETURN VALUE

none

SEE ALSO
--------------------------------------------------------------------------------------------------------------*/

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Web Developer
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions