Click here to Skip to main content
15,929,841 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWindows 32bit API Pin
3-Dec-00 6:22
suss3-Dec-00 6:22 
GeneralRe: Windows 32bit API Pin
5-Dec-00 3:14
suss5-Dec-00 3:14 
GeneralIIS 3 Pin
3-Dec-00 3:39
suss3-Dec-00 3:39 
GeneralMissing CWnd Handle Pin
2-Dec-00 11:57
suss2-Dec-00 11:57 
GeneralRe: Missing CWnd Handle Pin
Tim Deveaux3-Dec-00 5:25
Tim Deveaux3-Dec-00 5:25 
GeneralRe: Missing CWnd Handle Pin
3-Dec-00 23:29
suss3-Dec-00 23:29 
GeneralModifying Button Styles Pin
hugoitt2-Dec-00 11:37
hugoitt2-Dec-00 11:37 
GeneralRe: Modifying Button Styles Pin
Tim Deveaux3-Dec-00 6:47
Tim Deveaux3-Dec-00 6:47 
This is probably more than you want, but hey...
void TestDialog::OnOK() 
{
 
    static int n = 0;
 
    if(!m_cbSpaceTrack.m_hWnd) {
         
        CRect stButton1;
        stButton1.SetRect (20, 20, 140, 60);
         
        if ( !m_cbSpaceTrack.Create("BREAKTRACK",BS_PUSHBUTTON |WS_TABSTOP|WS_VISIBLE|WS_CHILD|WS_BORDER,stButton1,this,5000) )
        {
            // Failed to create a control.
            AfxMessageBox((LPCTSTR)"Failed to Create SPACETRACK Button1",MB_OK,0); 
        }
    }
    else {
        m_cbSpaceTrack.ShowWindow(SW_HIDE);
        switch (n) {
        case 0 :
            m_cbSpaceTrack.SetButtonStyle(BS_CHECKBOX, TRUE);
            ++n;
            break;
        case 1 :
            m_cbSpaceTrack.SetButtonStyle(BS_GROUPBOX, TRUE);
            m_cbSpaceTrack.ModifyStyle(0, WS_BORDER);
            ++n;
            break;
        case 2 :
            m_cbSpaceTrack.SetButtonStyle(BS_RADIOBUTTON, TRUE);
            m_cbSpaceTrack.ModifyStyle(WS_BORDER,0);
            n=0;
            break;
        case 3 :
            m_cbSpaceTrack.SetButtonStyle(BS_PUSHBUTTON, TRUE);
            m_cbSpaceTrack.ModifyStyle(0, WS_BORDER);
            n=0;
            break;
        default:
            break;
        }
        m_cbSpaceTrack.ShowWindow(SW_SHOW);
 
    }
 
    //CDialog::OnOK();
}


Beyond this type of stuff, you might need to use the BS_OWNERDRAW style and override DrawItem.
GeneralI need help with CDc!!! Pin
James Bird2-Dec-00 4:29
James Bird2-Dec-00 4:29 
GeneralRe: I need help with CDc!!! Pin
Christian Graus3-Dec-00 13:48
protectorChristian Graus3-Dec-00 13:48 
GeneralDocument , View & Frame Pin
2-Dec-00 3:36
suss2-Dec-00 3:36 
GeneralRe: Document , View & Frame Pin
Tim Deveaux3-Dec-00 7:30
Tim Deveaux3-Dec-00 7:30 
GeneralScreen Capture Pin
1-Dec-00 18:42
suss1-Dec-00 18:42 
GeneralRe: Screen Capture Pin
Suha Aktan4-Dec-00 17:20
Suha Aktan4-Dec-00 17:20 
GeneralExplorer Pin
1-Dec-00 16:23
suss1-Dec-00 16:23 
GeneralMDI Pin
Steve P1-Dec-00 12:26
Steve P1-Dec-00 12:26 
QuestionRedraw notification of dialog members - how? Pin
1-Dec-00 8:02
suss1-Dec-00 8:02 
AnswerRe: Redraw notification of dialog members - how? Pin
1-Dec-00 19:59
suss1-Dec-00 19:59 
GeneralRe: Redraw notification of dialog members - how? Pin
1-Dec-00 23:09
suss1-Dec-00 23:09 
GeneralRe: Redraw notification of dialog members - how? Pin
2-Dec-00 8:17
suss2-Dec-00 8:17 
GeneralRe: Redraw notification of dialog members - how? Pin
2-Dec-00 10:12
suss2-Dec-00 10:12 
GeneralRe: Redraw notification of dialog members - how? Pin
3-Dec-00 9:42
suss3-Dec-00 9:42 
GeneralAccelerators Pin
1-Dec-00 1:13
suss1-Dec-00 1:13 
Generalstl warning Pin
1-Dec-00 0:58
suss1-Dec-00 0:58 
GeneralRe: stl warning Pin
Jonathan Gilligan3-Dec-00 11:11
Jonathan Gilligan3-Dec-00 11:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.