Click here to Skip to main content
11,932,103 members (50,303 online)
Click here to Skip to main content
Add your own
alternative version


62 bookmarked

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 you 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.

Please visit My Web Site for more tutorials, tweaks, reference.


7 Aug 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

Generallittle bug Pin
Harbor Hu3-Mar-05 20:39
sussHarbor Hu3-Mar-05 20:39 
GeneralRe: little bug Pin
ladydi9912-Apr-05 22:09
memberladydi9912-Apr-05 22:09 
GeneralRe: little bug Pin
vjairam1-Jun-05 12:11
membervjairam1-Jun-05 12:11 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151126.1 | Last Updated 7 Aug 2002
Article Copyright 2002 by Shrishail Rana
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid