Click here to Skip to main content
11,704,472 members (57,989 online)
Click here to Skip to main content

An elliptical button class with bitmap

, 30 Aug 2004 67.4K 4.3K 46
Rate this:
Please Sign up or sign in to vote.
An article on an elliptic button class supporting bitmaps.


The idea of this class comes from the CRoundButton class from Chris Maunder. I was mainly missing elliptical forms and bitmaps in this class. The elliptical form is based on the bounds of the rectangle of the button. All properties can be set in the resource editor of the developer studio.

Using the code

This class can be used like any other owner drawn control - simply include the header file, and declare your button controls as CEllipticButton instead of CButton.

Points of Interest

I combine all bitmap and text information to one bitmap. So, I must handle only one case. If you want a bitmap button without text, you must set an empty title.


In the second version, I supported the Windows system colors for text and the disabled picture.


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

Dag Menning
Web Developer
Germany Germany
Dag has been programming since 1988 in the business and technical area.

His programming knowledges includes C/C++, MFC, Delpi and a lillte JAVA.

Dag was born in Germany but he likes it to traveling all over the world. In his spare time he likes running, cycle biking, mountaineering, cross country skiing and other actions in the nature.

You may also be interested in...

Comments and Discussions

GeneralElliptical button for PocketPC Pin
codehar7-Sep-04 5:04
membercodehar7-Sep-04 5:04 
Hi Dag,
Nice Button class.
Any idea on porting it to PocketPC Platform.
Some of the API functions in this class is not supported in PPC.

GeneralIt would be helpful ... Pin
WREY3-Sep-04 5:15
memberWREY3-Sep-04 5:15 

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 | Terms of Use | Mobile
Web02 | 2.8.150819.1 | Last Updated 31 Aug 2004
Article Copyright 2003 by Dag Menning
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid