Path: utzoo!attcan!uunet!microsoft!michaelt From: michaelt@microsoft.UUCP (Michael THURLKILL) Newsgroups: comp.windows.ms Subject: Re: no-echo input Message-ID: <55116@microsoft.UUCP> Date: 10 Jun 90 23:41:27 GMT References: <102@bohra.cpg.oz> <134@motto.UUCP> Reply-To: michaelt@microsoft.UUCP (Michael THURLKILL) Organization: Microsoft Corp., Redmond WA Lines: 28 In article <134@motto.UUCP> dave@motto.UUCP (David Brown) writes: >In article <102@bohra.cpg.oz> ejp@bohra.cpg.oz.au (Esmond Pitt) writes: >>I asked this a while ago but apparently it didn't get transmitted upstream. >> >>Is it possible to accept input without echo (e.g. password fields) under: >> >> (1) MS-Windows >> (2) PM >> >>and if so, how? > You could always do this by sub-classing the edit control. (You would trap WM_CHAR messages, save the characters in your own buffer, and pass an asterisk, space or other character to the original wndproc.) Windows 3 has a new edit control style, ES_PASSWORD, that makes this all very easy. By default an asterisk will be displayed, rather than the character typed. You can change the character displayed by sending the control the EM_SETPASSWORDCHAR message. As noted in a previous posting, a similar mechanism is provided in OS/2 1.2. Mike Thurlkill Disclaimer: These are my opinions. They should be in no way misconstrued as being correct or in any way related to my employer.