Currently I am using this implementation to hide user input during password entry:
void setEcho(bool enable) {
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode;
GetConsoleMode(hStdin, &mode);
if(enable) {
mode |= ENABLE_ECHO_INPUT;
} else {
mode &= ~ENABLE_ECHO_INPUT;
}
SetConsoleMode(hStdin, mode);
}
The user needs to be able to have positive feed back that text entry is being made. What techniques are available in a Win32 environment using C++?