Solved

How to create an MFC Cbutton that displays text and icon or bitmap

Posted on 1997-11-05
1
1,699 Views
Last Modified: 2013-11-20
I am using VC 5.0 in an MFC SDI app and would like to be able to create push buttons in my dialogs that also draw an icon or bitmap along with its text.

Can you explain in detail how this is done, point me to where I can get all the details or best yet, have source or point me to source?

Thanks
0
Comment
Question by:rascal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 20 total points
ID: 1309478
CButton class functions SetBitmap() and SetIcon are what you need. you can find decription of these function in MFC CButton class help. If standard implementation doesn't answer to your requirements create owner draw button ovewrite OnDrawItem in parent class and perform custom painting
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 87
sum67 challenge 35 128
sumHeights  challenge 17 82
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 545
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question