Click here to Skip to main content
15,881,424 members
Articles / Desktop Programming / MFC

XP-style Button Control

Rate me:
Please Sign up or sign in to vote.
4.65/5 (21 votes)
6 Aug 2002 552.4K   6.4K   64   38
XP style button control for all version of windows.

Sample Image

Introduction

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.

History

  • 7th August, 2002 - Updated download

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.


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generallittle bug Pin
HarborHu3-Mar-05 19:39
HarborHu3-Mar-05 19:39 
GeneralRe: little bug Pin
KiwiDi12-Apr-05 21:09
KiwiDi12-Apr-05 21:09 
GeneralRe: little bug Pin
v1ncent1-Jun-05 11:11
v1ncent1-Jun-05 11: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.