Home > Software engineering >  MFC programming people to login user login interface (not using database)
MFC programming people to login user login interface (not using database)

Time:10-05

If (IsDlgButtonChecked (IDC_RADIO1)==1)
{
CButton button; Button. The EnableWindow (TRUE);
{
The UpdateData (TRUE);
CDlg2 pt;
If (m_user. IsEmpty () | | m_password. IsEmpty ())
MessageBox (" username or password cannot be empty ", "user login information");
The else
If (m_user=="201505010109" & amp; & M_password=="1997")
{
CDlg2 dlg2;
Dlg2. DoModal ();
}
The else
If (m_user=="201505010109" & amp; & M_password!="1997")
MessageBox (" password incorrect!" );
The else
If (m_user!="201505010109" & amp; & M_password!="1997")
MessageBox (" the user name and password are incorrect!" );
The else
If (m_user!="201505010109" & amp; & M_password=="1997")
MessageBox (" the user name is not correct!" ); }

{the UpdateData (TRUE);
CDlg4 pt;
If (m_user. IsEmpty () | | m_password. IsEmpty ())
MessageBox (" username or password cannot be empty ", "user login information");
The else
If (m_user=="201502400202" & amp; & M_password=="123456")
{
CDlg4 dlg4;
Dlg4. DoModal ();
}
The else
If (m_user=="201502400202" & amp; & M_password!="123456")
MessageBox (" password incorrect!" );
The else
If (m_user!="201502400202" & amp; & M_password!="123456")
MessageBox (" the user name and password are incorrect!" );
The else
If (m_user!="201502400202" & amp; & M_password=="123456")
MessageBox (" the user name is not correct!" ); }
As I added two users after landing point will be a pop-up message box "" first user name and password are incorrect" "let the pop-up dialog again after
In this case if statement seems not
Because MFC to school a little, didn't learn database
Bosses genuflect is begged for help,

CodePudding user response:

No return step by step down is such, if condition didn't finished

CodePudding user response:

Direct single-step tracking, should be your processing logic has a problem,

CodePudding user response:


If (m_user=="201505010109" & amp; & M_password!="1997")
MessageBox (" password incorrect!" );

If (m_user!="201505010109" & amp; & M_password!="1997")
MessageBox (" the user name and password are incorrect!" );

If (m_user!="201505010109" & amp; & M_password=="1997")
MessageBox (" the user name is not correct!" ); }

To take away your else had better use the database
  • Related