Solved

Bitmap and text on a toggle button

Posted on 1998-06-15
5
236 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
[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
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

623 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