-3

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.

Alexander
  • 1,232
  • 1
  • 15
  • 24
BIJAY
  • 13
  • 5

2 Answers2

1

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.

franji1
  • 3,088
  • 2
  • 23
  • 43
1

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.

Alexander
  • 1,232
  • 1
  • 15
  • 24
  • Why you are adding dialog box to separate executable, not to your Credential Providers library? – Alexander Jun 29 '20 at 03:32
  • Brother which Api should I need to use for changing cache credential password. ( like when I am offline I want to change password in my local cache credential) – BIJAY Jun 30 '20 at 21:54
  • Tell me a api that works on windows 10 and some sample code If u have time. Thanks for the help alexander – BIJAY Jun 30 '20 at 21:55
  • Unfortunately cashed password is a huge pain of all Credential Providers developers. I have no any code on this issue. Have a look [here](https://learn.microsoft.com/en-us/windows/win32/api/lmaccess/nf-lmaccess-netuserchangepassword) – Alexander Jun 30 '20 at 22:20
  • what is CPUS_CHANGE_PASSWORD?? by this can we change userpassword?? – BIJAY Jul 01 '20 at 17:48