#include "msgina.h"
-WINE_DEFAULT_DEBUG_CHANNEL(msgina);
-
typedef struct _DISPLAYSTATUSMSG
{
PGINA_CONTEXT Context;
GUIDisplaySASNotice(
IN OUT PGINA_CONTEXT pgContext)
{
- INT result;
-
TRACE("GUIDisplaySASNotice()\n");
/* Display the notice window */
- result = DialogBoxParam(
- pgContext->hDllInstance,
- MAKEINTRESOURCE(IDD_NOTICE_DLG),
- GetDesktopWindow(),
- EmptyWindowProc,
- (LPARAM)NULL);
- if (result == -1)
- {
- /* Failed to display the window. Do as if the user
- * already has pressed CTRL+ALT+DELETE */
- pgContext->pWlxFuncs->WlxSasNotify(pgContext->hWlx, WLX_SAS_TYPE_CTRL_ALT_DEL);
- }
+ pgContext->pWlxFuncs->WlxDialogBoxParam(pgContext->hWlx,
+ pgContext->hDllInstance,
+ MAKEINTRESOURCEW(IDD_NOTICE_DLG),
+ GetDesktopWindow(),
+ EmptyWindowProc,
+ (LPARAM)NULL);
}
/* Get the text contained in a textbox. Allocates memory in pText
return TRUE;
}
+
+static INT_PTR CALLBACK
+ChangePasswordDialogProc(
+ IN HWND hwndDlg,
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ FIXME("ChangePasswordDialogProc: WM_INITDLG\n");
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDOK:
+ EndDialog(hwndDlg, TRUE);
+ return TRUE;
+
+ case IDCANCEL:
+ EndDialog(hwndDlg, FALSE);
+ return TRUE;
+ }
+ break;
+
+ case WM_CLOSE:
+ EndDialog(hwndDlg, FALSE);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
static VOID
OnInitSecurityDlg(HWND hwnd,
PGINA_CONTEXT pgContext)
SetDlgItemTextW(hwnd, IDC_LOGONDATE, Buffer4);
}
+
+static BOOL
+OnChangePassword(
+ IN HWND hwnd,
+ IN PGINA_CONTEXT pgContext)
+{
+ INT res;
+
+ FIXME("OnChangePassword()\n");
+
+ res = pgContext->pWlxFuncs->WlxDialogBoxParam(
+ pgContext->hWlx,
+ pgContext->hDllInstance,
+ MAKEINTRESOURCEW(IDD_CHANGE_PASSWORD),
+ hwnd,
+ ChangePasswordDialogProc,
+ (LPARAM)pgContext);
+
+ FIXME("Result: %x\n", res);
+
+ return FALSE;
+}
+
+
static INT_PTR CALLBACK
LoggedOnWindowProc(
IN HWND hwndDlg,
IN WPARAM wParam,
IN LPARAM lParam)
{
+ PGINA_CONTEXT pgContext;
+
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+
switch (uMsg)
{
case WM_INITDIALOG:
{
+ pgContext = (PGINA_CONTEXT)lParam;
+ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
+
OnInitSecurityDlg(hwndDlg, (PGINA_CONTEXT)lParam);
SetFocus(GetDlgItem(hwndDlg, IDNO));
return TRUE;
case IDC_SHUTDOWN:
EndDialog(hwndDlg, WLX_SAS_ACTION_SHUTDOWN_POWER_OFF);
return TRUE;
+ case IDC_CHANGEPWD:
+ if (OnChangePassword(hwndDlg, pgContext))
+ EndDialog(hwndDlg, WLX_SAS_ACTION_PWD_CHANGED);
+ return TRUE;
case IDC_TASKMGR:
EndDialog(hwndDlg, WLX_SAS_ACTION_TASKLIST);
return TRUE;
return WLX_SAS_ACTION_NONE;
}
- result = pgContext->pWlxFuncs->WlxSwitchDesktopToWinlogon(
+ pgContext->pWlxFuncs->WlxSwitchDesktopToWinlogon(
pgContext->hWlx);
result = pgContext->pWlxFuncs->WlxDialogBoxParam(
if (result == WLX_SAS_ACTION_NONE)
{
- result = pgContext->pWlxFuncs->WlxSwitchDesktopToUser(
+ pgContext->pWlxFuncs->WlxSwitchDesktopToUser(
pgContext->hWlx);
}
/* FIXME: take care of DontDisplayLastUserName, NoDomainUI, ShutdownWithoutLogon */
pgContext = (PGINA_CONTEXT)lParam;
SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
+
+ if (pgContext->bDisableCAD == TRUE)
+ EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE);
+
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);