GINA logon dialog not in focus/active

£可爱£侵袭症+ 提交于 2019-12-11 03:54:27

问题


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

来源:https://stackoverflow.com/questions/1609750/gina-logon-dialog-not-in-focus-active

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!