Solved

CButton - Radio Button and "Push-like" style

Posted on 2001-08-07
2
1,363 Views
Last Modified: 2013-11-20
I would like to have a toolbar that contains a series of push-like radio button.  I know it can be done with the resource editor, but I need to do it dynmically. Unfortunately I don't know how to set the style. The following doesn't seem to work.


CButton *pButton;

//this is in the init of my toolbar
pButton = new CButton();
rect.SetRect(0,0,50,50);

if(!pButton->Create("Test",WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_ICON|BS_AUTORADIOBUTTON   ,rect,this,ID_BUTTON1))
          {
          return FALSE;
          }

0
Comment
Question by:zeekial
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
Lockias earned 200 total points
ID: 6360398
BS_AUTORADIOBUTTON | BS_PUSHLIKE

~Lockias
0
 
LVL 2

Expert Comment

by:Lockias
ID: 6360409
if(!pButton->Create("Test",WS_CHILD | WS_VISIBLE | BS_ICON | BS_AUTORADIOBUTTON | BS_PUSHLIKE, rect, this, ID_BUTTON1))
{
    return FALSE;
}
------------------------------------------------------
BS_PUSHLIKE is not in the documentation.

~Lockias
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

21 Experts available now in Live!

Get 1:1 Help Now