Click here to Skip to main content
15,886,026 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.5K   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

 
GeneralRe: How can I get change the font on the CXPButton? Pin
halka14-Sep-04 4:06
halka14-Sep-04 4:06 
GeneralRe: How can I get change the font on the CXPButton? Pin
jerry0davis14-Sep-04 4:16
jerry0davis14-Sep-04 4:16 
AnswerRe: How can I get change the font on the CXPButton? Pin
kbomb98713-Oct-05 8:06
kbomb98713-Oct-05 8:06 
GeneralUse with PropertySheet Pin
Tim Hodgson3-Feb-03 11:10
Tim Hodgson3-Feb-03 11:10 
GeneralRe: Use with PropertySheet Pin
jack tian12-Feb-03 23:23
jack tian12-Feb-03 23:23 
QuestionHow use it In Web Explorer Pin
Johnson Chen5-Oct-02 5:02
Johnson Chen5-Oct-02 5:02 
Generalvb.NET Pin
Jason7830-Jul-02 15:15
Jason7830-Jul-02 15:15 
GeneralRe: vb.NET Pin
Mika7-Aug-02 22:09
Mika7-Aug-02 22:09 
GeneralRe: vb.NET Pin
mpappert25-Oct-02 6:58
mpappert25-Oct-02 6:58 
GeneralDemo Resource File Pin
MJ_Karas30-Jul-02 8:58
MJ_Karas30-Jul-02 8:58 
GeneralRe: Demo Resource File Pin
srana30-Jul-02 21:35
srana30-Jul-02 21:35 
QuestionWhat about MultiLine?? Pin
lion30-Jul-02 2:20
lion30-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.