Click here to Skip to main content
Click here to Skip to main content
Go to top

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

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 Pinmembersadman from RM ))28-Apr-07 13:48 
GeneralCEditXP repainting problems FIXED (+) PinmemberIlya Semenov18-Apr-05 3:07 
QuestionIs there a CXPCombobox? Pinmembereibimalul8-Nov-03 23:28 
GeneralAbout using DDX PinsussAnonymous3-Jul-03 20:42 
GeneralBugs Pinmembervarosi22-Apr-03 10:14 
Generaltitlebar? (request) Pinmemberanon12317-Feb-03 6:20 
Questionhow to use WTL to create a control ? Pinmemberwngw25-Nov-02 21:39 
QuestionHow use it In Web Explorer PinmemberJohnson Chen5-Oct-02 5:29 
AnswerRe: How use it In Web Explorer PinmemberDerick Cyril Thomas12-Oct-02 21:44 
QuestionHow use it In Web Explorer PinmemberJohnson Chen5-Oct-02 5:10 

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 | Mobile
Web04 | 2.8.140926.1 | Last Updated 13 Sep 2002
Article Copyright 2002 by Derick Cyril Thomas
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid