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

XP-style Button Control

By , 6 Aug 2002
Rate this:
Please Sign up or sign in to vote.

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
No Biography provided

Comments and Discussions

 
Generalproblem if init dialog is used PinmemberMKMA23-Nov-07 3:22 

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