?
Solved

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

Posted on 1997-11-05
1
Medium Priority
?
1,732 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 80 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

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 …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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 this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 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