ModifyStyle and setting the Password Style on an CEdit control...

I use the GetStyle function to recieve the style settings into a DWORD var and then I use this to ModifyStyle on another. Everything else (uppercase, lowercase, number, etc.) works fine, but the ES_PASSWORD setting does not carry over. The flag is set in the DWORD, but the CEdit doesn't adopt the setting. What's happening? Thanks.
maknightAsked:
Who is Participating?
 
davmarcConnect With a Mentor Commented:
Probably it is simply not possible to turn a password edit control into a regular one dinamically.
Just destroy the old one and create a new with different style, or create two edit controls with different styles in the beginning and keep only one visible at any time.

Davide Marcato.
0
 
maknightAuthor Commented:
FYI: You're partially correct. You can, but not automatically by just setting the password style bit. You need to force set a password character with SetPasswordChar. Works fine now. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.