Dialog box Handle in MFC

299 Views Asked by At

I am creating a dialog box for my Credential Provider.

For that I am creating a MFC CDialog box with three edit text labels for:

  • old password,
  • new password,
  • confirm password.

After creating dialog box I got an .exe file and its works fine, but I don't know how to get the values from the three edit text label.

While searching in net I saw handle which can do that, but there is no clear information, so can somebody tell me how to get the value of three edit text from .exe file.

Thanks in advance.

2

There are 2 best solutions below

5
Alexander On BEST ANSWER

You are writing a Credential Provider.
As a reaction to some event you want to ask user for old and new passwords.

I your case you don't need to draw your own Dialog Box - you can just reveal and hide some fields of your Credential Provider as a reaction to this event.

I recommend you to look for CREDENTIAL_PROVIDER_USAGE_SCENARIO::CPUS_CHANGE_PASSWORD at MS Documentation. It is described like your description of scenario.

0
franji1 On

Right click on the Edit control and use the class wizard to bind the control value to a CString member. OnOK() calls UpdateData(TRUE), which moves control data from the control value to the member variable. You can call UpdateData(TRUE) on certain events to update all the control members of your dialog class.