Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bitmap and text on a toggle button

Posted on 1998-06-15
5
Medium Priority
?
237 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 150 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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 how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

688 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