Click here to Skip to main content
Licence 
First Posted 28 Jul 2002
Views 236,202
Downloads 4,526
Bookmarked 56 times

XP-style Button Control

By | 6 Aug 2002 | Article
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

About the Author

Shrishail Rana



United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionWhat about the non rounded frame around the button? Pinmemberagua210:57 8 Apr '09  
Generalgreat work Pinmemberansif_pi23:53 28 Jul '08  
Generalapologies PinmemberMKMA3:37 23 Nov '07  
Generalproblem if init dialog is used PinmemberMKMA3:22 23 Nov '07  
QuestionWho has the CXPEdit? Pinmemberaimar2664:10 23 Apr '06  
GeneralNice PinmemberAlton Williams3:21 29 Jun '05  
GeneralToolTips Pinmemberparamecula2:19 16 Mar '05  
Generallittle bug PinsussHarbor Hu19:39 3 Mar '05  
GeneralRe: little bug Pinmemberladydi9921:09 12 Apr '05  
GeneralRe: little bug Pinmembervjairam11:11 1 Jun '05  
QuestionWhat bout other Controls... PinmemberManoj Singh K19:18 18 Jan '05  
GeneralInvisible Pinmemberfl0at7:24 4 Jul '04  
GeneralFix For Font example, chinese. Pinsussanonymousafsdfasd3:58 15 May '04  
GeneralFix For Font example, chinese. Pinsussanonymous3:58 15 May '04  
GeneralLittle BUG fix PinmemberIvo Wubbels1:31 23 Apr '04  
Generalnice going. Pinmembert2di4u19:11 28 Jan '04  
GeneralWhy there is no XP-style Edit Pinmemberwhizzkid@ms28.hinet.net13:44 16 Dec '03  
QuestionHow can I set the button colors? PinmemberBobboots10:36 22 Aug '03  
Generalhwo can i set icon Pinmemberliquidsnake1838:28 29 Apr '03  
QuestionWhat about xp titlebar? Pinmemberanon12310:46 1 Mar '03  
QuestionHow can I get change the font on the CXPButton? PinmemberJaltair14:58 13 Feb '03  
AnswerRe: How can I get change the font on the CXPButton? PinmemberJeremy Davis0:51 14 Feb '03  
GeneralRe: How can I get change the font on the CXPButton? PinmemberJaltair6:04 18 Feb '03  
GeneralRe: How can I get change the font on the CXPButton? Pinmemberhalka4:06 14 Sep '04  
GeneralRe: How can I get change the font on the CXPButton? PinmemberJeremy Davis4:16 14 Sep '04  

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.

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