Click here to Skip to main content
11,928,985 members (51,441 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked

Norm Almond CLabel Class Port to ATL/WTL

, 24 Jan 2001
Rate this:
Please Sign up or sign in to vote.
A fully stocked owner drawn CStatic class for WTL
<!-- Download Links -->
  • Download source files - 7 Kb
  • Download demo project - 28 Kb
  • <!-- Article image -->

    Sample Image - ATLLabel.jpg


    Now you can use Norm Almond's excellent CLabel class in your ATL/WTL projects. The Class is still called CLabeland it retains a majority of the original code. Just follow these simple instructions.

    1. Create a WTL Project
    2. Design the dialog and add the Static Controls
    3. Add the ATLLabel.h header file to your project
    4. Any static controls that need enhancing, give each control a unique ID within the dialog editor.
    5. Assign a CLabel to each static control.
    6. Subclass each member controls (CLabel) to each ID using the SubclassWindow method.
    7. In OnInitDialog uses the CLabelmethods to change the appearance of the control.
    CLabel m_ctlGradient;
    m_ctlGradient.SetBkColor(RGB(255,255,255),RGB(0,0,255), CLabel::Gradient);

    See Norm Almond's original CLabel article for more details.


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    Rashid Thadha
    Web Developer
    United Kingdom United Kingdom
    Was made redundant in early 2003 after 10 years in computer programming, since then started my own business (selling computer books on the net)

    You may also be interested in...

    Comments and Discussions

    QuestionMissing include? Pin
    ChrisRibe27-Apr-06 10:10
    memberChrisRibe27-Apr-06 10:10 
    AnswerRe: Missing include? Pin
    ChrisRibe27-Apr-06 10:41
    memberChrisRibe27-Apr-06 10:41 
    QuestionForgets boldness on SetWindowText? Pin
    peterchen7-May-05 5:14
    memberpeterchen7-May-05 5:14 

    nice class Smile | :)

    One thing I'm wondering about, however:

    When I do SetFonBold(true), then SetWindowText(..), the text goes back to normal. Is this intended?

    Pandoras Gift #44: Hope. The one that keeps you on suffering.
    aber.. "Wie gesagt, der Scheiss is' Therapie"
    boost your code || Fold With Us! || sighist | doxygen

    GeneralThank You! Pin
    Agump21-Nov-04 23:09
    memberAgump21-Nov-04 23:09 
    GeneralGreat job... one small suggestion Pin
    partnerinflight21-Dec-01 8:44
    memberpartnerinflight21-Dec-01 8:44 
    GeneralThanks Pin
    Norm Almond17-Mar-01 4:36
    memberNorm Almond17-Mar-01 4:36 
    GeneralSuggestion: Can it Port to SmartPhone ATL/WTL Pin
    fox28016-Feb-03 17:27
    memberfox28016-Feb-03 17:27 

    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.

    | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.151126.1 | Last Updated 25 Jan 2001
    Article Copyright 2001 by Rashid Thadha
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid