Solved

Bitmap and text on a toggle button

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

840 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