[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

password verification

Posted on 2000-02-15
3
Medium Priority
?
309 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

649 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