问题
I'm working on a credential provider for windows 7 with cpp. I want to disable textboxes and submit button while the system is working in the background. For this I tried to use the code below:
_pCredProvCredentialEvents->SetFieldInteractiveState(this,SFI_EDIT_TEXT,CPFIS_DISABLED);
At here SFI_EDIT_TEXT
represents the object that I want to change it's properties and CPFIS_DISABLED
shows it's should be disabled (at least i assume that is). But I didn't get any useful result. Anyone can able to help?
回答1:
There are a several situations, where using SetFieldInteractiveState
won't work. For example, if user have pressed "Submit" button, your's provider GetSerialization
function will be called, and no GUI changes will be done by LogonUI until you return from GetSerialization
. I think changes of GUI are made only between calls of your provider's functions.
P.S. I know, that question was asked long time ago, but in future, maybe, my answer can help others.
来源:https://stackoverflow.com/questions/7968945/disabling-areas-on-credential-provider