GINA login dialog out of focus / active

I have created a DLL to replace GINA. When I call WlxDialogBoxParam

to display my own login dialog, the dialog is not activated. What am I doing wrong? I tried calling o SetActiveWindow

on an event WM_INITDIALOG

, but that didn't seem to help.

I call 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;
}

      

+2


source to share





All Articles