[comp.windows.misc] no-echo input

matts@microsoft.UUCP (Matt SAETTLER) (05/29/90)

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?
]
]Thanks for your help.

Windows 3.0 defines the edit control attribute ES_PASSWORD.  I believe
that this replace typed characters with '*' in the display.

-----------------------------------------------------------------------
	Matt Saettler			I speak for myself, or so I'm told.

williams@umaxc.weeg.uiowa.edu (Kent Williams) (05/30/90)

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 know <0 about programming for (1) or (2), but if you don't have a no-echo
option on input, you can set the foreground and background colors the same.
This is a trick I started using on CP/M 80 machines!




--
Kent Williams                    'Look, I can understand "teenage mutant ninja 
williams@umaxc.weeg.uiowa.edu    turtles", but I can't understand "mutually 
williams@herky.cs.uiowa.edu      recursive inline functions".' - Paul Chisholm

gdk@hpindda.HP.COM (Gary Koerzendorfer) (06/01/90)

williams@umaxc.weeg.uiowa.edu (Kent Williams) writes:

> In article <102@bohra.cpg.oz> ejp@bohra.cpg.oz.au (Esmond Pitt) writes:
> >Is it possible to accept input without echo (e.g. password fields) under:
> >
> >	(1) MS-Windows

Check out "subclassing" in an MS-Windows book, specifically the call
"SetWindowLong". You don't want to echo anything, not even a dummy char, because
this would reveal the length of the password.

> ... you can set the foreground and background colors the same.

This is a clever trick! In X it's subject to being overridden unless you 
explicitly set the colors in the code, rather than the resource file. I think
I'd rather do it 'right', however, just in case.

hphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphphp
      Gary Koerzendorfer                               gdk@hpda.hp.com 
      Hewlett-Packard                                  (408) 447-2231
indindindindindindindindindindindindindindindindindindindindindindindindindind