Xref: utzoo comp.windows.ms:2411 comp.os.os2:1610 Path: utzoo!attcan!uunet!wuarchive!usc!snorkelwacker!ira.uka.de!fauern!tumuc!lan!rommel From: rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) Newsgroups: comp.windows.ms,comp.os.os2 Subject: Re: no-echo input Message-ID: <2559@tuminfo1.lan.informatik.tu-muenchen.dbp.de> Date: 31 May 90 11:21:44 GMT References: <102@bohra.cpg.oz> <1584@ns-mx.uiowa.edu> <1990May30.192043.3281@watdragon.waterloo.edu> Sender: news@lan.informatik.tu-muenchen.dbp.de Reply-To: rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) Followup-To: comp.windows.ms Organization: Inst. fuer Informatik, TU Muenchen, W. Germany Lines: 32 >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? >I can give you a hint for Windows: Under MS Windows I needed a password field with NO echo at all and used window subclassing for it and it works fine. Change the callback function for the edit control in the WM_INITDIALOG message and replace it by your own which handles WM_CHAR itself and passes other messages to the previous one (you have to remember the address of the original callback function). The GetWindowLong() and SetWindowLong() calls are used to replace the callback function's address and get the old one. There is also a symbolic constant (don't heve it in mind) for the parameter to these two calls for the callback function. This should be possible for PM too, but I did not yet need it and therefore did not try it but the MS-Windows solution works fine. In the WM_CHAR message you can either replace the character by '*' or 'x' or whatever you want, remember the ortiginal character and pass the '*' etc. to the original callback function or simply catch the WM_CHAR and the edit control will stay empty all the time. Kai Uwe Rommel Munich rommel@lan.informatik.tu-muenchen.dbp.de