开发者

GINA logon dialog not in focus/active

开发者 https://www.devze.com 2022-12-09 09:28 出处:网络
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 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;
            }
           开发者_如何学Go return TRUE;
        }
    }
    return FALSE;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消