Click here to Skip to main content
11,482,402 members (74,322 online)
Click here to Skip to main content

A WTL XP Button and Edit Box

, 12 Sep 2002 83.6K 1.4K 23
Rate this:
Please Sign up or sign in to vote.
A WTL Implementation of XP Button and Edit Box

Sample Image

Introduction

This is a WTL implementation of XP Button and Edit Box Controls. The XP Button is actually a WTL port of an XP button. The Edit Box is painted in XP style by handling the WM_NCPAINT message. It is a very simple task.

How to use it

To add the XP Button and Edit box in your control, add a reference to CXPButton and CEditXP to you Dialog class.

\CXPButton m_ok;
CEditXP m_edit;

Add the following reflection macro to your main message map:

  BEGIN_MSG_MAP(CMainDlg)
     ...
     REFLECT_NOTIFICATIONS()
  END_MSG_MAP()
And then in the OnInitDialog function add,
m_ok.SubclassWindow(GetDlgItem(IDOK));
m_edit.SubclassWindow(GetDlgItem(IDC_EDIT1));
Don't forget to add #include "ButtonXP.h" to your Dialog's header file. Now compile the code and enjoy it.

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

Share

About the Author

Derick Cyril Thomas
Web Developer
United States United States
Visit my technical blog at http://www.derick.in/

Comments and Discussions

 
GeneralLike it Pin
sadman from RM ))28-Apr-07 14:48
membersadman from RM ))28-Apr-07 14:48 
GeneralCEditXP repainting problems FIXED (+) Pin
Ilya Semenov18-Apr-05 4:07
memberIlya Semenov18-Apr-05 4:07 
QuestionIs there a CXPCombobox? Pin
eibimalul9-Nov-03 0:28
membereibimalul9-Nov-03 0:28 
GeneralAbout using DDX Pin
Anonymous3-Jul-03 21:42
sussAnonymous3-Jul-03 21:42 
GeneralBugs Pin
varosi22-Apr-03 11:14
membervarosi22-Apr-03 11:14 
Generaltitlebar? (request) Pin
anon12317-Feb-03 7:20
memberanon12317-Feb-03 7:20 
Questionhow to use WTL to create a control ? Pin
wngw25-Nov-02 22:39
memberwngw25-Nov-02 22:39 
QuestionHow use it In Web Explorer Pin
Johnson Chen5-Oct-02 6:29
memberJohnson Chen5-Oct-02 6:29 
AnswerRe: How use it In Web Explorer Pin
Derick Cyril Thomas12-Oct-02 22:44
memberDerick Cyril Thomas12-Oct-02 22:44 
QuestionHow use it In Web Explorer Pin
Johnson Chen5-Oct-02 6:10
memberJohnson Chen5-Oct-02 6:10 
QuestionA bit stubborn, isnt it? Pin
Andreas Saurwein16-Sep-02 1:06
memberAndreas Saurwein16-Sep-02 1:06 
GeneralRepaint problem... Pin
John Johansson16-Sep-02 0:28
memberJohn Johansson16-Sep-02 0:28 
GeneralNicely Done Pin
Ed Gadziemski14-Sep-02 5:05
memberEd Gadziemski14-Sep-02 5:05 
GeneralRe: Nicely Done Pin
Derick Cyril Thomas14-Sep-02 19:05
memberDerick Cyril Thomas14-Sep-02 19:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web04 | 2.8.150520.1 | Last Updated 13 Sep 2002
Article Copyright 2002 by Derick Cyril Thomas
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid