Thread: check box

  1. #1
    Registered User wayko's Avatar
    Join Date
    Sep 2001
    Posts
    28

    check box

    i have a code that ask a person what year they were born

    i want to add a check box that says BC

    when checked when the person hit submit
    i want it to add 2001 to the year they put in
    hello its me Wayko

  2. #2
    BivonBlast
    Guest

    Question

    How is your dialogbox look like?

    Want more code...

    But if you only want to know how to use a Checkbox:

    Insert one, adda member Variable and add this code into the OnCheck1 function:

    {
    if( n_boolBC == TRUE)
    n_boolBC = FALSE;
    else
    n_boolBC = TRUE;
    }

  3. #3
    Registered User wayko's Avatar
    Join Date
    Sep 2001
    Posts
    28
    void CAgeDlg::OnBc()
    {
    // TODO: Add your control notification handler code here
    if(m_Bc = true)
    {
    m_Say.SetWindowText("you are years old");
    }
    }

    i want to make it say
    void CAgeDlg::OnBc()
    {
    // TODO: Add your control notification handler code here
    if(m_Bc = true)
    {
    m_Say.SetWindowText("you are %.0f years old",m_Bc1);
    }
    }

    the m_Bc1 = m_Age + m_Year
    m_Age = 2001
    m_Year is user inputted
    hello its me Wayko

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parent of a BrowseForFolder dialog box
    By @nthony in forum Windows Programming
    Replies: 4
    Last Post: 01-08-2007, 02:54 PM
  2. fgets() to list box
    By tao in forum Windows Programming
    Replies: 4
    Last Post: 06-08-2006, 08:23 AM
  3. Display Dialog Box Then Execute
    By stickman in forum C++ Programming
    Replies: 17
    Last Post: 05-10-2006, 11:02 AM
  4. List box horizontal bar
    By cfriend in forum Windows Programming
    Replies: 1
    Last Post: 09-12-2004, 03:52 PM
  5. Linking error!
    By m712 in forum C++ Programming
    Replies: 2
    Last Post: 12-08-2002, 11:24 PM