Home
Applications
Keyboard Explorer
Mouse Trainer
Briefcase Plus
Atlas
Utilities
HTML Splitter
Junction Link Magic
Lockout Resetter
Stream Explorer
Host Administrator
Postcode
Set Date
Mail Checker
Password Revealer
Screensavers
Random Walk
Games
Hex
Dara
ASP.NET
MVC schedule controls
Schedule controls
SpamSafeLink control
Toggle Controls
Members administration
TogglePanel
Team Calendar
FolderContentsDataSource
Theme Switcher
Support

Rekenwonder Software

How does Password Revealer work?

Here's the main code in C:

BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM lParam);
BOOL CALLBACK EnumWindowsProc2(HWND hwnd,LPARAM lParam);

LRESULT CALLBACK MainWndProc(HWND hWndMain,UINT Msg,UINT wParam,LONG lParam)
{
    switch(Msg) {
        case WM_COMMAND:          
            if(HIWORD(wParam)==BN_CLICKED) 
                EnumWindows(EnumWindowsProc,0); // call every main window
                break;
        case WM_DESTROY:
            PostQuitMessage(0);
            return 0L;
    }
    return DefWindowProc(hWndMain,Msg,wParam,lParam);
}          

BOOL CALLBACK EnumWindowsProc(HWND hwnd,LPARAM lParam)
{
    // call every child window (to find edit boxes)
    EnumChildWindows(hwnd,EnumWindowsProc2,lParam);
    return TRUE;
}          

BOOL CALLBACK EnumWindowsProc2(HWND hwnd,LPARAM)
{
    ::SendMessage(hwnd,EM_SETPASSWORDCHAR,0,0); // reveal the password
    InvalidateRect(hwnd,NULL,FALSE);
    return TRUE;
}