Solved

Bitmap and text on a toggle button

Posted on 1998-06-15
5
230 Views
Last Modified: 2010-04-10
I wanted to use the check box control as a toggle button, but I also wanted to display text along with the bitmap.  I was able to do this in VB with the check box control, but ut seems the MFC's check box control doesn't allow text and graphic together. Is there a way around this, or another control to give me this capability.  I'm looking for a toggle button look, without having to have two bitmaps for each button to represent on/off.
0
Comment
Question by:bradyd
  • 3
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 50 total points
ID: 1165967
I have code for this .. you need an owner drawn button with both text and/or an icon that handles check status correctly.  I can even make it flat look (like new IE4 toolbars) if you want.

0
 

Author Comment

by:bradyd
ID: 1165968
RONSLOW,
This I can use - but I wanted this to be a toggle button.  That was my reason for using the check box.  Can I manipulate the command button to look toggled, easily?  I would like to see the code for the owner drawn.

Thanks,
Dawn
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1165969
If you set it to owner drawn, then it is no longer a checkbox.

I assume by a toggle button you mean a'normal' looking button that can be pushed in (and stay in) or clicked again to stay out.

This is exactly what I was suggesting.

Can you give me your email adress (or send a mail to me) and I'll send you some code (it might be a bit lengthy to put in here).

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1165970
Did you get the code that I emailed you?

0
 

Author Comment

by:bradyd
ID: 1165971
yep I did, thank you and I'll be sure to let you know how it works out.  I'll be working on it today.  It's only 9am here in Philadelphia.
Thanks again!
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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

896 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

19 Experts available now in Live!

Get 1:1 Help Now