Click here to Skip to main content
13,142,883 members (50,054 online)
Click here to Skip to main content
Add your own
alternative version


23 bookmarked
Posted 12 Sep 2002

A WTL XP Button and Edit Box

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

Sample Image


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:

And then in the OnInitDialog function add,
Don't forget to add #include <span class="code-string">"ButtonXP.h"</span> to your Dialog's header file. Now compile the code and enjoy it.


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

Derick Cyril Thomas
Web Developer
United States United States
Visit my technical blog at

You may also be interested in...

Comments and Discussions

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

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170915.1 | Last Updated 13 Sep 2002
Article Copyright 2002 by Derick Cyril Thomas
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid