Click here to Skip to main content
Click here to Skip to main content

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 "ButtonXP.h" 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

Comments and Discussions

GeneralLike it Pinmembersadman from RM ))28-Apr-07 14:48 
GeneralCEditXP repainting problems FIXED (+) PinmemberIlya Semenov18-Apr-05 4:07 
QuestionIs there a CXPCombobox? Pinmembereibimalul9-Nov-03 0:28 
GeneralAbout using DDX PinsussAnonymous3-Jul-03 21:42 
GeneralBugs Pinmembervarosi22-Apr-03 11:14 
Generaltitlebar? (request) Pinmemberanon12317-Feb-03 7:20 
Questionhow to use WTL to create a control ? Pinmemberwngw25-Nov-02 22:39 
QuestionHow use it In Web Explorer PinmemberJohnson Chen5-Oct-02 6:29 
AnswerRe: How use it In Web Explorer PinmemberDerick Cyril Thomas12-Oct-02 22:44 
QuestionHow use it In Web Explorer PinmemberJohnson Chen5-Oct-02 6:10 
QuestionA bit stubborn, isnt it? PinmemberAndreas Saurwein16-Sep-02 1:06 
GeneralRepaint problem... PinmemberJohn Johansson16-Sep-02 0:28 
GeneralNicely Done PinmemberEd Gadziemski14-Sep-02 5:05 
GeneralRe: Nicely Done PinmemberDerick 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
Web01 | 2.8.150414.1 | Last Updated 13 Sep 2002
Article Copyright 2002 by Derick Cyril Thomas
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid