Click here to Skip to main content
15,882,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have made a dialog box/form in vc++ MFC which should take the inputs from user(username,password)and if the username ,password is correct it shows the message connecting in another form,and if the inputs are not correct the form should not close. my code is below:
C++
void LoginCredentials::OnBnClickedOk()
{
    // TODO: Add your control notification handler code here
    if (UpdateData(TRUE))
    {
        this->ShowWindow(FALSE);
    }
    else
    {
      this->ShowWindow(TRUE);
    }

}

but even if the inputs are incorrect,form gets closed..can anybody help me or suggest me,any kind of help will be appreciated.
Posted
Updated 10-Jun-12 20:51pm
v2
Comments
Mohibur Rashid 11-Jun-12 2:30am    
Fix your tagging,
meshinator 11-Jun-12 3:10am    
Thankyou sandeep ,so nice of u

1 solution

May be your password checking is incorrect. Please post relevant code.

Thanks,
 
Share this answer
 
Comments
meshinator 11-Jun-12 2:04am    
thanks satheesh,password checking is correct..dont know wat to do now.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900