![]() |
|
QA: How can I disable SIP word completion?
By Vassili Philippov, November 07, 2001.
QuestionMy application prompts for a password in an edit box. Although the 'password' style is set so that only asterisks are displayed when characters are entered, if a password has previously been entered then the 'Word Completion' feature causes the previous password to be suggested. How can I disable word completion for the password field? AnswerYou should add SIPF_DISABLECOMPLETION flag to the fdwFlags member of of SIPINFO structure. Then set this SIPINFO using SHSipInfo function. Here is code for that: But if SIP is already opened then it will not work. You have to close and open SIP again. The following two lines do what is needed: Restore word completionWe do not need to disable word completion for all input fields, only for password fields. For that we will disable word completion when the password field receives focus and will restore it when the password field loses the focus. We should handle EN_SETFOCUS and EN_KILLFOCUS messages. The handles can be like in the following example: Related resources:
DiscussDiscuss this article. Here you can write your comments and read comments of other developers. |
|||||||||||||||||||||