I'm working on a program. This function you are about to see is a button. When the button is pressed, the program checks to see how two edit boxes are doing and then answers them. The problem is, the first if statement always executes, even if it shouldn't. What's wrong?
void PasswordChange::OnOK()
{
if(m_OldPassword.IsEmpty() == TRUE && m_NewPassword.IsEmpty() == TRUE)
{
MessageBox("Both are empty");
CDialog::OnOK();
}
else
{
}
if(m_OldPassword.IsEmpty() == FALSE && m_NewPassword.IsEmpty() == TRUE)
{
MessageBox("New Is Empty");
CDialog::OnOK();
}
else
{
}
CDialog::OnOK();
}