Click here to Skip to main content
6,306,412 members and growing! (18,444 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » WTL » General     Intermediate

Norm Almond CLabel Class Port to ATL/WTL

By Rashid Thadha

A fully stocked owner drawn CStatic class for WTL
VC6Win2K, WTL, Dev
Posted:24 Jan 2001
Views:50,366
Bookmarked:20 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
17 votes for this article.
Popularity: 4.49 Rating: 3.65 out of 5
1 vote, 16.7%
1
1 vote, 16.7%
2
1 vote, 16.7%
3

4
3 votes, 50.0%
5
  • Download source files - 7 Kb
  • Download demo project - 28 Kb
  • Sample Image - ATLLabel.jpg

    Introduction

    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.SubclassWindow(GetDlgItem(IDC_GRADIENT));
      m_ctlGradient.SetBkColor(RGB(255,255,255),RGB(0,0,255), CLabel::Gradient);
    

    See Norm Almond's original CLabel article for more details. http://www.codeproject.com/staticctrl/clabel.asp

    License

    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


    Member
    Was made redundant in early 2003 after 10 years in computer programming, since then started my own business (selling computer books on the net)
    www.pricecutbook.co.uk


    Occupation: Web Developer
    Location: United Kingdom United Kingdom

    Other popular WTL articles:

    Article Top
    You must Sign In to use this message board.
    FAQ FAQ 
     
    Noise Tolerance  Layout  Per page   
     Msgs 1 to 7 of 7 (Total in Forum: 7) (Refresh)FirstPrevNext
    GeneralMissing include? PinmemberChrisRibe10:10 27 Apr '06  
    GeneralRe: Missing include? PinmemberChrisRibe10:41 27 Apr '06  
    GeneralForgets boldness on SetWindowText? Pinsupporterpeterchen5:14 7 May '05  
    GeneralThank You! PinmemberAgump23:09 21 Nov '04  
    GeneralGreat job... one small suggestion Pinmemberpartnerinflight8:44 21 Dec '01  
    GeneralThanks PinmemberNorm Almond4:36 17 Mar '01  
    GeneralSuggestion: Can it Port to SmartPhone ATL/WTL Pinmemberfox28017:27 16 Feb '03  

    General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    PermaLink | Privacy | Terms of Use
    Last Updated: 24 Jan 2001
    Editor: Chris Maunder
    Copyright 2001 by Rashid Thadha
    Everything else Copyright © CodeProject, 1999-2009
    Web16 | Advertise on the Code Project