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
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
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;
}
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