禁用凭据提供程序上的区域 [英] Disabling areas on Credential Provider
问题描述
我正在使用cpp的Windows 7的凭据提供程序。我想禁用文本框和提交按钮,而系统在后台工作。为此,我尝试使用下面的代码:
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);
在此处 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?
推荐答案
有几种情况,使用 SetFieldInteractiveState
将无法工作。例如,如果用户按下提交按钮,您的提供程序 GetSerialization
函数将被调用,并且LogonUI将不会执行GUI更改,直到您从 GetSerialization
。我认为GUI的变化只在你的提供者函数的调用之间进行。
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.
这篇关于禁用凭据提供程序上的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!