Click here to Skip to main content
14,110,342 members
Click here to Skip to main content
Add your own
alternative version


63 bookmarked
Posted 28 Jul 2002

XP-style Button Control

, 6 Aug 2002
Rate this:
Please Sign up or sign in to vote.
XP style button control for all version of windows.

Sample Image


Here is an XP-style Button. It works on all windows OSs: 95/98/Me/NT/W2K/XP. No subclassing, etc. is needed to use this control - it's just a plain simple button control. This code is a modified form of the OCX code I recently saw on codeguru. The button code was for an ActiveX control. I created this CButton derived class with latest Microsoft's sponsored CCP technology (Cut-Copy-Paste).

How to Use It?

  • In your resource editor, create a button and set the 'owner draw' property.
  • Use classwizard to create a CButton object in your dialog.
  • Include the "xpbutton.h" file in your dialog class file.
  • Rename the CButton object type to CXPButton.
  • Compile and enjoy.


  • 7th August, 2002 - Updated download


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

Shrishail Rana
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralRe: How can I get change the font on the CXPButton? Pin
halka14-Sep-04 4:06
memberhalka14-Sep-04 4:06 
GeneralRe: How can I get change the font on the CXPButton? Pin
jerry0davis14-Sep-04 4:16
groupjerry0davis14-Sep-04 4:16 
AnswerRe: How can I get change the font on the CXPButton? Pin
kbomb98713-Oct-05 8:06
memberkbomb98713-Oct-05 8:06 
GeneralUse with PropertySheet Pin
Tim Hodgson3-Feb-03 11:10
memberTim Hodgson3-Feb-03 11:10 
GeneralRe: Use with PropertySheet Pin
jack tian12-Feb-03 23:23
memberjack tian12-Feb-03 23:23 
QuestionHow use it In Web Explorer Pin
Johnson Chen5-Oct-02 5:02
memberJohnson Chen5-Oct-02 5:02 
Generalvb.NET Pin
Jason7830-Jul-02 15:15
memberJason7830-Jul-02 15:15 
GeneralRe: vb.NET Pin
Mika7-Aug-02 22:09
memberMika7-Aug-02 22:09 
GeneralRe: vb.NET Pin
mpappert25-Oct-02 6:58
membermpappert25-Oct-02 6:58 
GeneralDemo Resource File Pin
MJ_Karas30-Jul-02 8:58
memberMJ_Karas30-Jul-02 8:58 
GeneralRe: Demo Resource File Pin
srana30-Jul-02 21:35
membersrana30-Jul-02 21:35 
QuestionWhat about MultiLine?? Pin
lion30-Jul-02 2:20
memberlion30-Jul-02 2:20 
AnswerRe: What about MultiLine?? Pin
srana111-Aug-02 6:53
susssrana111-Aug-02 6:53 

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 | Cookies | Terms of Use | Mobile
Web02 | 2.8.190518.1 | Last Updated 7 Aug 2002
Article Copyright 2002 by Shrishail Rana
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid