Solved

Bitmap and text on a toggle button

Posted on 1998-06-15
5
229 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 learn how to clear a vector as well as how to detect empty vectors in C++.

757 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

18 Experts available now in Live!

Get 1:1 Help Now