Click here to Skip to main content
Click here to Skip to main content

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

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

History

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

Share

About the Author

Shrishail Rana

United States United States
No Biography provided

Comments and Discussions

 
QuestionProblems compiling with VS2012 Pinmembermerano21-Apr-13 5:33 
QuestionWhat about the non rounded frame around the button? Pinmemberagua28-Apr-09 10:57 
Generalgreat work Pinmemberansif_pi28-Jul-08 23:53 
Generalapologies PinmemberMKMA23-Nov-07 3:37 
Generalproblem if init dialog is used PinmemberMKMA23-Nov-07 3:22 
QuestionWho has the CXPEdit? Pinmemberaimar26623-Apr-06 4:10 
I can see many CXPButton ,but no CXPEdit.Who has it,can he send to me ?Thank you.:->Laugh | :laugh:
 
Don't ask.Just do it!
GeneralNice PinmemberAlton Williams29-Jun-05 3:21 
GeneralToolTips Pinmemberparamecula16-Mar-05 2:19 
Generallittle bug PinsussHarbor Hu3-Mar-05 19:39 
GeneralRe: little bug Pinmemberladydi9912-Apr-05 21:09 
GeneralRe: little bug Pinmembervjairam1-Jun-05 11:11 
QuestionWhat bout other Controls... PinmemberManoj Singh K18-Jan-05 19:18 
GeneralInvisible Pinmemberfl0at4-Jul-04 7:24 
GeneralFix For Font example, chinese. Pinsussanonymousafsdfasd15-May-04 3:58 
GeneralFix For Font example, chinese. Pinsussanonymous15-May-04 3:58 
GeneralLittle BUG fix PinmemberIvo Wubbels23-Apr-04 1:31 
Generalnice going. Pinmembert2di4u28-Jan-04 19:11 
GeneralWhy there is no XP-style Edit Pinmemberwhizzkid@ms28.hinet.net16-Dec-03 13:44 
QuestionHow can I set the button colors? PinmemberBobboots22-Aug-03 10:36 
Generalhwo can i set icon Pinmemberliquidsnake18329-Apr-03 8:28 
QuestionWhat about xp titlebar? Pinmemberanon1231-Mar-03 10:46 
QuestionHow can I get change the font on the CXPButton? PinmemberJaltair13-Feb-03 14:58 
AnswerRe: How can I get change the font on the CXPButton? PinmemberJeremy Davis14-Feb-03 0:51 
GeneralRe: How can I get change the font on the CXPButton? PinmemberJaltair18-Feb-03 6:04 
GeneralRe: How can I get change the font on the CXPButton? Pinmemberhalka14-Sep-04 4:06 

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.140821.2 | Last Updated 7 Aug 2002
Article Copyright 2002 by Shrishail Rana
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid