?
Solved

password verification

Posted on 2000-02-15
3
Medium Priority
?
308 Views
Last Modified: 2010-04-10
I am a beginner in Visual C++. I need some help urgently. I have two edit boxes in a dialog box. Also there is an OK and CAncel button.
                      In one I am supposed to enter a password and in the other I need to confirm the password(that is I type that password once again). If
                      the two passwords match on pressing the OK button then it is fine, else I need a message box which pops up saying that the passwords
                      entered are not same and that we need to check the two passwords once again. Also, if any of the two boxes are blank we need a
                      message box to say that password needs to be entered. On pressing the Cancel button I should be back in the same window with the
                      fields for password and password confirmation cleared. Could someone please help me with writing this code please.


                      Could someone help me out on this fast please!
0
Comment
Question by:gopalanravi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:gopalanravi
ID: 2525594
Adjusted points to 100
0
 

Accepted Solution

by:
Stevex2 earned 400 total points
ID: 2525698
You could try this.

CString edit1;
CString edit2;
GetDlgItem(IDC_EDIT1)->GetWindowText(edit1);
GetDlgItem(IDC_EDIT2)->GetWindowText(edit2);
if(edit1 != edit2)
 AfxMessageBox("Passwords dont match");
if(edit1 == "" || edit2 ="")
 AfxMessageBox("Can not have blanks in passwords");
0
 

Expert Comment

by:Stevex2
ID: 2525700
and one more line
if(edit1 == edit2)
 //continue execution here
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question