Solved

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

Posted on 1997-11-05
1
1,647 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 53
FizzBuzz challenge 9 76
Line meaning 9 82
JQuery serialize and unserialize 8 51
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now