GINA logon dialog not in focus/active

326 views Asked by At

I have created a DLL to replace GINA. When I call WlxDialogBoxParam to display my own logon dialog, the dialog does not get active. What am I doing wrong? I have tried o call SetActiveWindow on the WM_INITDIALOG event, but that did not seem to help.

I call the WlxDialogBoxParam with the following parameters:

WlxDialogBoxParam(hWlx, GetMyInstance(), MAKEINTRESOURCE(IDD_LOGON), 0, DialogProc, (LPARAM)this);

where DialogProc is defined as follows: Code:

INT_PTR DialogProc(UINT msg, WPARAM wp, LPARAM lp) {
    switch (msg) {
        case WM_INITDIALOG:
             SetFocus (GetDlgItem(_hwnd, IDC_NAME));
             return FALSE;
        case WM_COMMAND: {
            switch (LOWORD(wp)) {
                case IDOK:
                    EndDialog(_hwnd, IDOK);
                    break;

         case IDCANCEL:
                    EndDialog(_hwnd, IDCANCEL);
                    break;
            }
            return TRUE;
        }
    }
    return FALSE;
}
0

There are 0 answers