Here is the problem.
I linked m_iHour to edit box object, on its ON_CHANGE event()
{
UpdateData(TRUE);
CString sMessage;
if (m_iHour <1|| m_iHour>12)
{
sMessage = "Hour should be an integer between 1 and 12.";
MessageBox(sMessage);
}
}
but when hour<10, I mean if input 3, it should display "03", I know Format can
make it, but here I need m_iHour to be integer not a string type, and Format
can only be used to CString type.
Is there any other way can solve this?
Thanks in advance
I linked m_iHour to edit box object, on its ON_CHANGE event()
{
UpdateData(TRUE);
CString sMessage;
if (m_iHour <1|| m_iHour>12)
{
sMessage = "Hour should be an integer between 1 and 12.";
MessageBox(sMessage);
}
}
but when hour<10, I mean if input 3, it should display "03", I know Format can
make it, but here I need m_iHour to be integer not a string type, and Format
can only be used to CString type.
Is there any other way can solve this?
Thanks in advance