Author: hbelusca
Date: Sun Sep 18 19:37:25 2016
New Revision: 72732
URL:
http://svn.reactos.org/svn/reactos?rev=72732&view=rev
Log:
[MSGINA]
- Do not hardcode buffer sizes in function calls, and use _countof when needed.
- Use explicit unicode functions where possible.
- No need to have 342687 versions of the shutdown dialog in msgina, only one is
sufficient. The help button should be either shown or hidden, depending on whom is calling
the dialog (shell or winlogon) (this is TODO!)
- Therefore, no need to have twice the (almost) same code for the shutdown dialog.
- Fix & rework said code.
- The old duplicated shutdown dialog now becomes the "template" for the
"Luna-XP-style Shut Down dialog" (implementation TODO!)
- Reenable the WM_ACTIVATE code that was added in r72720 and temporarily disabled in
r72721.
CORE-7559 #comment Numerous fixes committed in r72732.
Modified:
trunk/reactos/dll/win32/msgina/gui.c
trunk/reactos/dll/win32/msgina/lang/bg-BG.rc
trunk/reactos/dll/win32/msgina/lang/cs-CZ.rc
trunk/reactos/dll/win32/msgina/lang/de-DE.rc
trunk/reactos/dll/win32/msgina/lang/en-US.rc
trunk/reactos/dll/win32/msgina/lang/es-ES.rc
trunk/reactos/dll/win32/msgina/lang/fr-FR.rc
trunk/reactos/dll/win32/msgina/lang/he-IL.rc
trunk/reactos/dll/win32/msgina/lang/id-ID.rc
trunk/reactos/dll/win32/msgina/lang/it-IT.rc
trunk/reactos/dll/win32/msgina/lang/ja-JP.rc
trunk/reactos/dll/win32/msgina/lang/no-NO.rc
trunk/reactos/dll/win32/msgina/lang/pl-PL.rc
trunk/reactos/dll/win32/msgina/lang/ro-RO.rc
trunk/reactos/dll/win32/msgina/lang/ru-RU.rc
trunk/reactos/dll/win32/msgina/lang/sk-SK.rc
trunk/reactos/dll/win32/msgina/lang/sq-AL.rc
trunk/reactos/dll/win32/msgina/lang/tr-TR.rc
trunk/reactos/dll/win32/msgina/lang/uk-UA.rc
trunk/reactos/dll/win32/msgina/lang/zh-CN.rc
trunk/reactos/dll/win32/msgina/lang/zh-TW.rc
trunk/reactos/dll/win32/msgina/msgina.c
trunk/reactos/dll/win32/msgina/msgina.h
trunk/reactos/dll/win32/msgina/resource.h
trunk/reactos/dll/win32/msgina/shutdown.c
trunk/reactos/dll/win32/msgina/tui.c
Modified: trunk/reactos/dll/win32/msgina/gui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/gui.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -93,9 +93,9 @@
return FALSE;
}
- DialogBoxParam(
+ DialogBoxParamW(
hDllInstance,
- MAKEINTRESOURCE(IDD_STATUSWINDOW_DLG),
+ MAKEINTRESOURCEW(IDD_STATUSWINDOW_DLG),
GetDesktopWindow(),
StatusMessageWindowProc,
(LPARAM)lpParam);
@@ -126,7 +126,7 @@
*/
msg = (PDISPLAYSTATUSMSG)HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
- sizeof(DISPLAYSTATUSMSG));
+ sizeof(*msg));
if(!msg)
return FALSE;
@@ -136,10 +136,7 @@
msg->pMessage = pMessage;
msg->hDesktop = hDesktop;
- msg->StartupEvent = CreateEventW(NULL,
- TRUE,
- FALSE,
- NULL);
+ msg->StartupEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
if (!msg->StartupEvent)
{
@@ -204,25 +201,26 @@
{
PGINA_CONTEXT pgContext;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
{
pgContext = (PGINA_CONTEXT)lParam;
- pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (LONG_PTR)pgContext);
+ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
+
+ /* Draw the logo bitmap */
+ pgContext->hBitmap = LoadImageW(pgContext->hDllInstance,
MAKEINTRESOURCEW(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
return TRUE;
}
case WM_PAINT:
{
PAINTSTRUCT ps;
- HDC hdc;
if (pgContext->hBitmap)
{
- hdc = BeginPaint(hwndDlg, &ps);
- DrawStateW(hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0, 0,
0, 0, 0, DST_BITMAP);
+ BeginPaint(hwndDlg, &ps);
+ DrawStateW(ps.hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0,
0, 0, 0, 0, DST_BITMAP);
EndPaint(hwndDlg, &ps);
}
return TRUE;
@@ -288,8 +286,8 @@
WCHAR szCaption[256];
WCHAR szText[256];
- LoadStringW(pgContext->hDllInstance, uCaption, szCaption, 256);
- LoadStringW(pgContext->hDllInstance, uText, szText, 256);
+ LoadStringW(pgContext->hDllInstance, uCaption, szCaption, _countof(szCaption));
+ LoadStringW(pgContext->hDllInstance, uText, szText, _countof(szText));
return pgContext->pWlxFuncs->WlxMessageBox(pgContext->hWlx,
hwnd,
@@ -319,11 +317,11 @@
NTSTATUS ProtocolStatus;
NTSTATUS Status;
- GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_USERNAME, UserName, 256);
- GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_DOMAIN, Domain, 256);
- GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_OLDPWD, OldPassword, 256);
- GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_NEWPWD1, NewPassword1, 256);
- GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_NEWPWD2, NewPassword2, 256);
+ GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_USERNAME, UserName, _countof(UserName));
+ GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_DOMAIN, Domain, _countof(Domain));
+ GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_OLDPWD, OldPassword, _countof(OldPassword));
+ GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_NEWPWD1, NewPassword1,
_countof(NewPassword1));
+ GetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_NEWPWD2, NewPassword2,
_countof(NewPassword2));
/* Compare the two passwords and fail if they do not match */
if (wcscmp(NewPassword1, NewPassword2) != 0)
@@ -440,7 +438,7 @@
(wcscmp(Domain, pgContext->Domain) == 0) &&
(wcscmp(OldPassword, pgContext->Password) == 0))
{
- ZeroMemory(pgContext->Password, 256 * sizeof(WCHAR));
+ ZeroMemory(pgContext->Password, sizeof(pgContext->Password));
wcscpy(pgContext->Password, NewPassword1);
}
@@ -464,19 +462,21 @@
{
PGINA_CONTEXT pgContext;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
+ {
pgContext = (PGINA_CONTEXT)lParam;
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
+ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
SetDlgItemTextW(hwndDlg, IDC_CHANGEPWD_USERNAME, pgContext->UserName);
SendDlgItemMessageW(hwndDlg, IDC_CHANGEPWD_DOMAIN, CB_ADDSTRING, 0,
(LPARAM)pgContext->Domain);
SendDlgItemMessageW(hwndDlg, IDC_CHANGEPWD_DOMAIN, CB_SETCURSEL, 0, 0);
SetFocus(GetDlgItem(hwndDlg, IDC_CHANGEPWD_OLDPWD));
return TRUE;
+ }
case WM_COMMAND:
switch (LOWORD(wParam))
@@ -518,26 +518,26 @@
WCHAR Buffer3[256];
WCHAR Buffer4[512];
- LoadStringW(pgContext->hDllInstance, IDS_LOGONMSG, Buffer1, 256);
+ LoadStringW(pgContext->hDllInstance, IDS_LOGONMSG, Buffer1, _countof(Buffer1));
wsprintfW(Buffer2, L"%s\\%s", pgContext->Domain,
pgContext->UserName);
wsprintfW(Buffer4, Buffer1, Buffer2);
SetDlgItemTextW(hwnd, IDC_LOGONMSG, Buffer4);
- LoadStringW(pgContext->hDllInstance, IDS_LOGONDATE, Buffer1, 256);
+ LoadStringW(pgContext->hDllInstance, IDS_LOGONDATE, Buffer1, _countof(Buffer1));
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE,
- (SYSTEMTIME*)&pgContext->LogonTime, NULL, Buffer2, 256);
+ (SYSTEMTIME*)&pgContext->LogonTime, NULL, Buffer2,
_countof(Buffer2));
GetTimeFormatW(LOCALE_USER_DEFAULT, 0,
- (SYSTEMTIME*)&pgContext->LogonTime, NULL, Buffer3, 256);
+ (SYSTEMTIME*)&pgContext->LogonTime, NULL, Buffer3,
_countof(Buffer3));
wsprintfW(Buffer4, Buffer1, Buffer2, Buffer3);
SetDlgItemTextW(hwnd, IDC_LOGONDATE, Buffer4);
- if (pgContext->bAutoAdminLogon == TRUE)
+ if (pgContext->bAutoAdminLogon)
EnableWindow(GetDlgItem(hwnd, IDC_LOGOFF), FALSE);
}
@@ -616,217 +616,25 @@
static
-VOID
-UpdateShutdownDesc(
- IN HWND hwnd)
-{
- WCHAR szBuffer[256];
- UINT shutdownDescId = 0;
- int shutdownCode = 0;
-
- shutdownCode = SendDlgItemMessageW(hwnd, IDC_SHUTDOWN_LIST, CB_GETCURSEL, 0, 0);
-
- switch (shutdownCode)
- {
- case 0: /* Log off */
- shutdownDescId = IDS_SHUTDOWN_LOGOFF_DESC;
- break;
-
- case 1: /* Shut down */
- shutdownDescId = IDS_SHUTDOWN_SHUTDOWN_DESC;
- break;
-
- case 2: /* Restart */
- shutdownDescId = IDS_SHUTDOWN_RESTART_DESC;
- break;
-
- case 3: /* Sleep */
- shutdownDescId = IDS_SHUTDOWN_SLEEP_DESC;
- break;
-
- case 4: /* Hibernate */
- shutdownDescId = IDS_SHUTDOWN_HIBERNATE_DESC;
- break;
-
- default:
- break;
- }
-
- LoadStringW(hDllInstance, shutdownDescId, szBuffer, sizeof(szBuffer));
- SetDlgItemTextW(hwnd, IDC_SHUTDOWN_DESCRIPTION, szBuffer);
-}
-
-
-static
-VOID
-ShutDownOnInit(
- IN HWND hwndDlg,
- IN PGINA_CONTEXT pgContext)
-{
- WCHAR szBuffer[256];
- WCHAR szBuffer2[256];
- HWND hwndList;
- INT idx, count, i;
-
- hwndList = GetDlgItem(hwndDlg, IDC_SHUTDOWN_LIST);
-
- /* Clears the content before it's used */
- SendMessageW(hwndList, CB_RESETCONTENT, 0, 0);
-
- /* Log off */
- LoadStringW(hDllInstance, IDS_SHUTDOWN_LOGOFF, szBuffer, sizeof(szBuffer) /
sizeof(WCHAR));
- wsprintfW(szBuffer2, szBuffer, pgContext->UserName);
- idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer2);
- if (idx != CB_ERR)
- SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_LOGOFF);
-
- /* Shut down */
- LoadStringW(hDllInstance, IDS_SHUTDOWN_SHUTDOWN, szBuffer, sizeof(szBuffer) /
sizeof(WCHAR));
- idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
- if (idx != CB_ERR)
- SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_POWER_OFF);
-
- /* Restart */
- LoadStringW(hDllInstance, IDS_SHUTDOWN_RESTART, szBuffer, sizeof(szBuffer) /
sizeof(WCHAR));
- idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
- if (idx != CB_ERR)
- SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_REBOOT);
-
- /* Sleep */
-#if 0
- LoadStringW(hDllInstance, IDS_SHUTDOWN_SLEEP, szBuffer, sizeof(szBuffer) /
sizeof(WCHAR));
- idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
- if (idx != CB_ERR)
- SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_SLEEP);
-#endif
-
- /* Hibernate */
-#if 0
- LoadStringW(hDllInstance, IDS_SHUTDOWN_HIBERNATE, szBuffer, sizeof(szBuffer) /
sizeof(WCHAR));
- idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
- if (idx != CB_ERR)
- SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_HIBERNATE);
-#endif
-
- /* Sets the default shut down selection */
- count = SendMessageW(hwndList, CB_GETCOUNT, 0, 0);
- for (i = 0; i < count; i++)
- {
- if (pgContext->nShutdownAction == SendMessageW(hwndList, CB_GETITEMDATA, i,
0))
- {
- SendMessageW(hwndList, CB_SETCURSEL, i, 0);
- break;
- }
- }
-
- /* Updates the choice description based on the current selection */
- UpdateShutdownDesc(hwndDlg);
-}
-
-
-static
-VOID
-ShutDownOnOk(
- IN HWND hwndDlg,
- IN PGINA_CONTEXT pgContext)
-{
- INT idx;
-
- idx = SendDlgItemMessageW(hwndDlg,
- IDC_SHUTDOWN_LIST,
- CB_GETCURSEL,
- 0,
- 0);
- if (idx != CB_ERR)
- {
- pgContext->nShutdownAction = SendDlgItemMessageW(hwndDlg,
- IDC_SHUTDOWN_LIST,
- CB_GETITEMDATA,
- idx,
- 0);
- }
-}
-
-
-BOOL
-CALLBACK
-ShutDownDialogProc(
- HWND hwnd,
- UINT Message,
- WPARAM wParam,
- LPARAM lParam)
-{
- PGINA_CONTEXT pgContext;
-
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwnd, GWL_USERDATA);
-
- switch (Message)
- {
- case WM_INITDIALOG:
- pgContext = (PGINA_CONTEXT)lParam;
- SetWindowLongPtr(hwnd, GWL_USERDATA, (INT_PTR)pgContext);
-
- ShutDownOnInit(hwnd, pgContext);
-
- /* Draw the logo graphic */
- pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
- return TRUE;
-
- case WM_PAINT:
- {
- PAINTSTRUCT ps;
- HDC hdc;
- if (pgContext->hBitmap)
- {
- hdc = BeginPaint(hwnd, &ps);
- DrawStateW(hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0, 0,
0, 0, 0, DST_BITMAP);
- EndPaint(hwnd, &ps);
- }
- return TRUE;
- }
-
- case WM_DESTROY:
- DeleteObject(pgContext->hBitmap);
- return TRUE;
-
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- case IDOK:
- ShutDownOnOk(hwnd, pgContext);
- EndDialog(hwnd, IDOK);
- break;
-
- case IDCANCEL:
- EndDialog(hwnd, IDCANCEL);
- break;
-
- case IDC_SHUTDOWN_LIST:
- UpdateShutdownDesc(hwnd);
- break;
- }
- break;
-
- default:
- return FALSE;
- }
- return TRUE;
-}
-
-
-static
INT
OnShutDown(
IN HWND hwndDlg,
IN PGINA_CONTEXT pgContext)
{
- return pgContext->pWlxFuncs->WlxDialogBoxParam(
- pgContext->hWlx,
- pgContext->hDllInstance,
- MAKEINTRESOURCEW(IDD_SHUTDOWN_DLG),
- hwndDlg,
- ShutDownDialogProc,
- (LPARAM)pgContext);
+ INT ret;
+ DWORD ShutdownOptions;
+
+ // FIXME: User impersonation!!
+ pgContext->nShutdownAction = LoadShutdownSelState();
+ ShutdownOptions = GetAllowedShutdownOptions();
+
+ ret = ShutdownDialog(hwndDlg, ShutdownOptions, pgContext);
+
+ // FIXME: User impersonation!!
+ if (ret == IDOK)
+ SaveShutdownSelState(pgContext->nShutdownAction);
+
+ return ret;
}
@@ -839,14 +647,14 @@
{
PGINA_CONTEXT pgContext;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
{
pgContext = (PGINA_CONTEXT)lParam;
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
+ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
OnInitSecurityDlg(hwndDlg, (PGINA_CONTEXT)lParam);
SetFocus(GetDlgItem(hwndDlg, IDNO));
@@ -980,7 +788,7 @@
}
else if (SubStatus == STATUS_ACCOUNT_LOCKED_OUT)
{
-TRACE("Account locked!\n");
+ TRACE("Account locked!\n");
pgContext->pWlxFuncs->WlxMessageBox(pgContext->hWlx,
hwndDlg,
L"Account locked!",
@@ -1022,7 +830,7 @@
}
else
{
-TRACE("Other error!\n");
+ TRACE("Other error!\n");
pgContext->pWlxFuncs->WlxMessageBox(pgContext->hWlx,
hwndDlg,
L"Other error!",
@@ -1033,8 +841,7 @@
}
else if (!NT_SUCCESS(Status))
{
-TRACE("DoLoginTasks failed! Status 0x%08lx\n", Status);
-
+ TRACE("DoLoginTasks failed! Status 0x%08lx\n", Status);
goto done;
}
@@ -1045,7 +852,7 @@
goto done;
}
- ZeroMemory(pgContext->Password, 256 * sizeof(WCHAR));
+ ZeroMemory(pgContext->Password, sizeof(pgContext->Password));
wcscpy(pgContext->Password, Password);
result = TRUE;
@@ -1077,7 +884,7 @@
SendMessageW(hwndDomainComboBox, CB_RESETCONTENT, 0, 0);
- dwComputerNameLength = sizeof(szComputerName) / sizeof(WCHAR);
+ dwComputerNameLength = _countof(szComputerName);
if (GetComputerNameW(szComputerName, &dwComputerNameLength))
{
lIndex = SendMessageW(hwndDomainComboBox, CB_ADDSTRING, 0,
(LPARAM)szComputerName);
@@ -1109,39 +916,41 @@
{
PGINA_CONTEXT pgContext;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
+ {
/* FIXME: take care of NoDomainUI */
pgContext = (PGINA_CONTEXT)lParam;
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
-
- if (pgContext->bDontDisplayLastUserName == FALSE)
+ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
+
+ if (!pgContext->bDontDisplayLastUserName)
SetDlgItemTextW(hwndDlg, IDC_USERNAME, pgContext->UserName);
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE);
- if (pgContext->bShutdownWithoutLogon == FALSE)
+ if (!pgContext->bShutdownWithoutLogon)
EnableWindow(GetDlgItem(hwndDlg, IDC_SHUTDOWN), FALSE);
SetDomainComboBox(GetDlgItem(hwndDlg, IDC_LOGON_TO), pgContext);
SetFocus(GetDlgItem(hwndDlg, pgContext->bDontDisplayLastUserName ?
IDC_USERNAME : IDC_PASSWORD));
- pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
- return TRUE;
+ /* Draw the logo bitmap */
+ pgContext->hBitmap = LoadImageW(pgContext->hDllInstance,
MAKEINTRESOURCEW(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
+ return TRUE;
+ }
case WM_PAINT:
{
PAINTSTRUCT ps;
- HDC hdc;
if (pgContext->hBitmap)
{
- hdc = BeginPaint(hwndDlg, &ps);
- DrawStateW(hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0, 0,
0, 0, 0, DST_BITMAP);
+ BeginPaint(hwndDlg, &ps);
+ DrawStateW(ps.hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0,
0, 0, 0, 0, DST_BITMAP);
EndPaint(hwndDlg, &ps);
}
return TRUE;
@@ -1286,7 +1095,7 @@
WCHAR Buffer2[256];
WCHAR Buffer3[512];
- LoadStringW(pgContext->hDllInstance, IDS_LOCKMSG, Buffer1, 256);
+ LoadStringW(pgContext->hDllInstance, IDS_LOCKMSG, Buffer1, _countof(Buffer1));
wsprintfW(Buffer2, L"%s\\%s", pgContext->Domain,
pgContext->UserName);
wsprintfW(Buffer3, Buffer1, Buffer2);
@@ -1327,8 +1136,8 @@
wcscmp(Password, pgContext->Password) != 0)
{
/* Wrong Password */
- LoadStringW(pgContext->hDllInstance, IDS_LOCKEDWRONGPASSWORD, Buffer2,
256);
- LoadStringW(pgContext->hDllInstance, IDS_COMPUTERLOCKED, Buffer1, 256);
+ LoadStringW(pgContext->hDllInstance, IDS_LOCKEDWRONGPASSWORD, Buffer2,
_countof(Buffer2));
+ LoadStringW(pgContext->hDllInstance, IDS_COMPUTERLOCKED, Buffer1,
_countof(Buffer1));
MessageBoxW(hwndDlg, Buffer2, Buffer1, MB_OK | MB_ICONERROR);
}
else
@@ -1341,9 +1150,9 @@
}
else
{
- LoadStringW(pgContext->hDllInstance, IDS_LOCKEDWRONGUSER, Buffer1,
256);
+ LoadStringW(pgContext->hDllInstance, IDS_LOCKEDWRONGUSER, Buffer1,
_countof(Buffer1));
wsprintfW(Buffer2, Buffer1, pgContext->Domain,
pgContext->UserName);
- LoadStringW(pgContext->hDllInstance, IDS_COMPUTERLOCKED, Buffer1,
256);
+ LoadStringW(pgContext->hDllInstance, IDS_COMPUTERLOCKED, Buffer1,
_countof(Buffer1));
MessageBoxW(hwndDlg, Buffer2, Buffer1, MB_OK | MB_ICONERROR);
}
}
@@ -1371,33 +1180,35 @@
PGINA_CONTEXT pgContext;
INT result = WLX_SAS_ACTION_NONE;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
+ {
pgContext = (PGINA_CONTEXT)lParam;
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
+ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
SetLockMessage(hwndDlg, IDC_LOCKMSG, pgContext);
SetDlgItemTextW(hwndDlg, IDC_USERNAME, pgContext->UserName);
SetFocus(GetDlgItem(hwndDlg, IDC_PASSWORD));
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE);
- pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
- return TRUE;
+ /* Draw the logo bitmap */
+ pgContext->hBitmap = LoadImageW(pgContext->hDllInstance,
MAKEINTRESOURCEW(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
+ return TRUE;
+ }
case WM_PAINT:
{
PAINTSTRUCT ps;
- HDC hdc;
if (pgContext->hBitmap)
{
- hdc = BeginPaint(hwndDlg, &ps);
- DrawStateW(hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0, 0,
0, 0, 0, DST_BITMAP);
+ BeginPaint(hwndDlg, &ps);
+ DrawStateW(ps.hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0,
0, 0, 0, 0, DST_BITMAP);
EndPaint(hwndDlg, &ps);
}
return TRUE;
@@ -1461,27 +1272,27 @@
{
PGINA_CONTEXT pgContext;
- pgContext = (PGINA_CONTEXT)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+ pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
{
pgContext = (PGINA_CONTEXT)lParam;
- SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)pgContext);
-
- pgContext->hBitmap = LoadImage(hDllInstance, MAKEINTRESOURCE(IDI_ROSLOGO),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
+ SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pgContext);
+
+ /* Draw the logo bitmap */
+ pgContext->hBitmap = LoadImageW(pgContext->hDllInstance,
MAKEINTRESOURCEW(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
SetLockMessage(hwndDlg, IDC_LOCKMSG, pgContext);
return TRUE;
}
case WM_PAINT:
{
PAINTSTRUCT ps;
- HDC hdc;
if (pgContext->hBitmap)
{
- hdc = BeginPaint(hwndDlg, &ps);
- DrawStateW(hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0, 0,
0, 0, 0, DST_BITMAP);
+ BeginPaint(hwndDlg, &ps);
+ DrawStateW(ps.hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, (WPARAM)0,
0, 0, 0, 0, DST_BITMAP);
EndPaint(hwndDlg, &ps);
}
return TRUE;
Modified: trunk/reactos/dll/win32/msgina/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/bg-B…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/bg-BG.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "ÐобÑе", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "ÐÑказ", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "ÐобÑе", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "ÐÑказ", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "Ðомо&Ñ", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "ÐзклÑÑване на РеакÑÐС"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Ðакво иÑкаÑе да напÑави
компÑÑÑÑа?", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
- DEFPUSHBUTTON "ÐобÑе", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "ÐÑказ", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "Ðомо&Ñ", IDHELP, 204, 122, 55, 14
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/cs-C…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/cs-CZ.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -131,6 +131,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Storno", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Storno", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&NápovÄda", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -142,19 +146,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Vypnout ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Co má poÄÃtaÄ provést?", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Storno", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&NápovÄda", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/de-D…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/de-DE.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Abbrechen", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Abbrechen", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Hilfe", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "ReactOS herunterfahren"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Welcher Vorgang soll durchgeführt werden?", IDC_STATIC, 39,
57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Abbrechen", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Hilfe", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/en-U…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/en-US.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -116,6 +116,7 @@
IDD_SHUTDOWN_DLG DIALOGEX 0, 0, 275, 146
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUPWINDOW | WS_CAPTION
+// STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER |
WS_CAPTION | WS_DLGFRAME | WS_POPUP
CAPTION "Shut Down ReactOS"
FONT 8, "MS Shell Dlg"
BEGIN
@@ -126,6 +127,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +142,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Shut Down ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/es-E…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/es-ES.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -127,6 +127,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "Aceptar", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Cancelar", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "Aceptar", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Cancelar", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Ayuda", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -138,19 +142,12 @@
DEFPUSHBUTTON "Aceptar", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Apagar ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "¿&Qué desea hacer con el equipo?", IDC_STATIC, 39, 57, 167,
10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
- DEFPUSHBUTTON "Aceptar", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Cancelar", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Ayuda", IDHELP, 204, 122, 55, 14
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/fr-F…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/fr-FR.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Annuler", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Annuler", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Aide", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Fermer ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Que voulez-vous que l'ordinateur fasse ?", IDC_STATIC, 39,
57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Annuler", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Aide", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/he-IL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/he-I…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/he-IL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/he-IL.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Shut Down ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/id-I…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/id-ID.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Shut Down ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Cancel", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Help", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/it-I…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/it-IT.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -135,6 +135,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Annulla", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Annulla", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Aiuto", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -146,19 +150,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Spegnimento di ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Cosa volete che faccia ReactOS?", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Annulla", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Aiuto", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/ja-J…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/ja-JP.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "ãã£ã³ã»ã«", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "ãã£ã³ã»ã«", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "ãã«ã(&H)", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "ReactOSã®ã·ã£ãããã¦ã³"
-FONT 9, "MS UI Gothic"
+CAPTION "Luna-XP-style Shut Down dialog"
+FONT 9,"MS UI Gothic", 400, 0, 1
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&ã³ã³ãã¥ã¼ã¿ã®åä½ãé¸æãã¦ãã ãã",
IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "ãã£ã³ã»ã«", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "ãã«ã(&H)", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/no-N…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/no-NO.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -126,6 +126,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Avbryt", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Avbryt", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Hjelp", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -137,19 +141,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Slå av ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Hva vil du at datamaskinen skal gjøre?", IDC_STATIC, 39, 57,
167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Avbryt", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Hjelp", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/pl-P…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/pl-PL.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -136,6 +136,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Anuluj", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Anuluj", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Pomoc", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -147,19 +151,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
-STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Zamknij ReactOS"
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
+STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Co chcesz, aby zrobiÅ komputer?", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Anuluj", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Pomoc", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/ro-R…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/ro-RO.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -135,6 +135,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "Con&firmÄ", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "A&nuleazÄ", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "Con&firmÄ", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "A&nuleazÄ", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Manualâ¦", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -146,19 +150,12 @@
DEFPUSHBUTTON "Ã&nchide", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Ãnchidere ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Ce doriÈi sÄ se întâmple?", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
- DEFPUSHBUTTON "Con&firmÄ", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "A&nuleazÄ", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Manualâ¦", IDHELP, 204, 122, 55, 14
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/ru-R…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/ru-RU.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -128,6 +128,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "ÐÑмена", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "ÐÑмена", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&СпÑавка", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -139,19 +143,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "ÐавеÑÑение ÑабоÑÑ ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&ÐÑбеÑиÑе желаемое дейÑÑвие.",
IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "ÐÑмена", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&СпÑавка", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/sk-S…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/sk-SK.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -131,6 +131,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Zrušiť", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Zrušiť", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&PomocnÃk", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -142,19 +146,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Vypnutie systému ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Äo chcete aby poÄÃtaÄ urobil?", IDC_STATIC, 39, 57, 167,
10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Zrušiť", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&PomocnÃk", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/sq-A…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/sq-AL.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -129,6 +129,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Anulo", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Anulo", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Ndihmë", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -140,19 +144,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Shut Down ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&What do you want the computer to do?", IDC_STATIC, 39, 57, 167,
10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Anulo", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Ndihmë", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/tr-T…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/tr-TR.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -128,6 +128,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "Tamam", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "Ä°ptal", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "Tamam", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "Ä°ptal", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&Yardım", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -139,19 +143,12 @@
DEFPUSHBUTTON "Tamam", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "Oturumu Kapat"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&Bilgisayarınızın ne yapmasını istiyorsunuz?", IDC_STATIC,
39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
- DEFPUSHBUTTON "Tamam", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "Ä°ptal", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&Yardım", IDHELP, 204, 122, 55, 14
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/uk-U…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/uk-UA.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -134,6 +134,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "СкаÑÑваÑи", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "СкаÑÑваÑи", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "&ÐовÑдка", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -145,19 +149,12 @@
DEFPUSHBUTTON "OK", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "ÐавеÑÑÐµÐ½Ð½Ñ ÑобоÑи ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "&ÐибеÑÑÑÑ Ð¾Ð´Ð½Ñ Ð· ÑакиÑ
можливоÑÑей?", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "СкаÑÑваÑи", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "&ÐовÑдка", IDHELP, 204, 122, 55, 14
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/zh-C…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/zh-CN.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -128,6 +128,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "ç¡®å®", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "åæ¶", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "ç¡®å®", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "åæ¶", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "帮å©(&H)", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -139,19 +143,12 @@
DEFPUSHBUTTON "ç¡®å®", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "å
³é ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "ä½ æ³è®©è®¡ç®æºåä»ä¹?(&W)", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
- DEFPUSHBUTTON "ç¡®å®", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "åæ¶", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "帮å©(&H)", IDHELP, 204, 122, 55, 14
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lang/zh-T…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lang/zh-TW.rc [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -128,6 +128,10 @@
LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
DEFPUSHBUTTON "確å®", IDOK, 143, 122, 55, 14, WS_GROUP
PUSHBUTTON "åæ¶", IDCANCEL, 204, 122, 55, 14
+
+ // DEFPUSHBUTTON "確å®", IDOK, 80, 122, 55, 14, WS_GROUP
+ // PUSHBUTTON "åæ¶", IDCANCEL, 143, 122, 55, 14
+ // PUSHBUTTON "幫å©(&H)", IDHELP, 204, 122, 55, 14
END
IDD_LEGALNOTICE_DLG DIALOGEX 0, 0, 280, 200
@@ -139,19 +143,12 @@
DEFPUSHBUTTON "確å®", IDOK, 115, 179, 50, 14
END
-IDD_SHUTDOWN_SHELL DIALOGEX 0, 0, 275, 146
+IDD_SHUTDOWN_FANCY DIALOGEX 0, 0, 275, 146
STYLE NOT WS_VISIBLE | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION
| WS_DLGFRAME | WS_POPUP
-CAPTION "éé ReactOS"
+CAPTION "Luna-XP-style Shut Down dialog"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL IDI_ROSLOGO, IDC_ROSLOGO, "Static", SS_BITMAP, 0, 0, 275, 54
- ICON IDI_SHUTDOWN, IDI_SHUTDOWN, 9, 57, 21, 20, WS_GROUP
- LTEXT "ä½ æ³è®è¨ç®æ©åä»éº¼?(&W)", IDC_STATIC, 39, 57, 167, 10
- COMBOBOX IDC_SHUTDOWN_LIST, 39, 70, 165, 210, CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
- LTEXT "", IDC_SHUTDOWN_DESCRIPTION, 39, 93, 187, 27
- DEFPUSHBUTTON "確å®", IDOK, 80, 122, 55, 14, WS_GROUP
- PUSHBUTTON "åæ¶", IDCANCEL, 143, 122, 55, 14
- PUSHBUTTON "幫å©(&H)", IDHELP, 204, 122, 55, 14
+ DEFPUSHBUTTON "OK", IDOK, 80, 122, 55, 14, WS_GROUP
END
STRINGTABLE
Modified: trunk/reactos/dll/win32/msgina/msgina.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.c?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.c [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -26,11 +26,9 @@
#include "msgina.h"
-#include <winreg.h>
#include <winsvc.h>
#include <userenv.h>
#include <ndk/sefuncs.h>
-#include <strsafe.h>
HINSTANCE hDllInstance;
@@ -228,7 +226,7 @@
pgContext->bDontDisplayLastUserName = TRUE;
}
- dwSize = 256 * sizeof(WCHAR);
+ dwSize = sizeof(pgContext->UserName);
rc = RegQueryValueExW(hKey,
L"DefaultUserName",
NULL,
@@ -236,7 +234,7 @@
(LPBYTE)&pgContext->UserName,
&dwSize);
- dwSize = 256 * sizeof(WCHAR);
+ dwSize = sizeof(pgContext->Domain);
rc = RegQueryValueExW(hKey,
L"DefaultDomain",
NULL,
@@ -327,7 +325,7 @@
pgContext->station = lpWinsta;
/* Clear status window handle */
- pgContext->hStatusWindow = 0;
+ pgContext->hStatusWindow = NULL;
/* Notify winlogon that we will use the default SAS */
pgContext->pWlxFuncs->WlxUseCtrlAltDel(hWlx);
@@ -370,6 +368,8 @@
* User setting:
* HKCU\Control Panel\Desktop : ScreenSaverIsSecure
*/
+
+ // FIXME: User impersonation!!
rc = RegOpenKeyExW(HKEY_CURRENT_USER,
L"Control Panel\\Desktop",
@@ -766,7 +766,7 @@
wcscpy(pgContext->UserName, UserName);
if (Domain == NULL || wcslen(Domain) == 0)
{
- dwLength = 256;
+ dwLength = _countof(pgContext->Domain);
GetComputerNameW(pgContext->Domain, &dwLength);
}
else
@@ -935,9 +935,9 @@
}
result = CreateProfile(pgContext, UserName, Domain, Password);
- if (result == TRUE)
+ if (result)
{
- ZeroMemory(pgContext->Password, 256 * sizeof(WCHAR));
+ ZeroMemory(pgContext->Password, sizeof(pgContext->Password));
wcscpy(pgContext->Password, Password);
NotifyBootConfigStatus(TRUE);
@@ -976,7 +976,7 @@
return;
}
- if (pgContext->bAutoAdminLogon == TRUE)
+ if (pgContext->bAutoAdminLogon)
{
/* Don't display the window, we want to do an automatic logon */
pgContext->AutoLogonState = AUTOLOGON_ONCE;
@@ -986,7 +986,7 @@
else
pgContext->AutoLogonState = AUTOLOGON_DISABLED;
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
{
pgContext->pWlxFuncs->WlxSasNotify(pgContext->hWlx,
WLX_SAS_TYPE_CTRL_ALT_DEL);
return;
@@ -1067,7 +1067,7 @@
TRACE("WlxDisplayLockedNotice()\n");
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
{
pgContext->pWlxFuncs->WlxSasNotify(pgContext->hWlx,
WLX_SAS_TYPE_CTRL_ALT_DEL);
return;
Modified: trunk/reactos/dll/win32/msgina/msgina.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/msgina.h?…
==============================================================================
--- trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/msgina.h [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -6,6 +6,8 @@
#endif
#include <stdarg.h>
+#include <stdlib.h>
+#include <tchar.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
@@ -13,10 +15,13 @@
#include <windef.h>
#include <winbase.h>
+#include <winreg.h>
#include <winuser.h>
#include <winwlx.h>
#include <ndk/rtlfuncs.h>
#include <ntsecapi.h>
+
+#include <strsafe.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(msgina);
@@ -43,7 +48,7 @@
BOOL bDontDisplayLastUserName;
BOOL bShutdownWithoutLogon;
- INT nShutdownAction;
+ ULONG nShutdownAction;
/* Information to be filled during logon */
WCHAR UserName[256];
@@ -129,6 +134,24 @@
IN PWSTR Domain,
IN PWSTR Password);
+/* shutdown.c */
+
+DWORD
+LoadShutdownSelState(VOID);
+
+VOID
+SaveShutdownSelState(DWORD ShutdownCode);
+
+DWORD
+GetAllowedShutdownOptions(VOID);
+
+INT_PTR
+ShutdownDialog(
+ IN HWND hwndDlg,
+ IN DWORD ShutdownOptions,
+ IN PGINA_CONTEXT pgContext);
+
+
#ifdef __cplusplus
} // extern "C"
#endif
Modified: trunk/reactos/dll/win32/msgina/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/resource.…
==============================================================================
--- trunk/reactos/dll/win32/msgina/resource.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/resource.h [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -8,7 +8,7 @@
#define IDD_LOCKED_DLG 104
#define IDD_UNLOCK_DLG 105
#define IDD_SHUTDOWN_DLG 108
-#define IDD_SHUTDOWN_SHELL 109
+#define IDD_SHUTDOWN_FANCY 109
#define IDC_LOGOFF 1001
#define IDC_USERNAME 1002
Modified: trunk/reactos/dll/win32/msgina/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/shutdown.…
==============================================================================
--- trunk/reactos/dll/win32/msgina/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/shutdown.c [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -2,29 +2,41 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS msgina.dll
* FILE: lib/msgina/shutdown.c
- * PURPOSE: Shutdown Dialog Box
- * PROGRAMMER: Lee Schroeder (spaceseel at gmail dot com)
+ * PURPOSE: Shutdown Dialog Box (GUI only)
+ * PROGRAMMERS: Lee Schroeder (spaceseel at gmail dot com)
+ * Hermes Belusca-Maito (hermes.belusca(a)sfr.fr)
*/
#include "msgina.h"
#include <powrprof.h>
-#include <strsafe.h>
#include <wingdi.h>
-#include <winreg.h>
-#include <stdlib.h>
-
-DWORD g_shutdownCode = 0;
-BOOL g_logoffHideState = FALSE;
-
-static DWORD
+
+/* Shutdown state flags */
+#define WLX_SHUTDOWN_STATE_LOGOFF 0x01
+#define WLX_SHUTDOWN_STATE_POWER_OFF 0x02
+#define WLX_SHUTDOWN_STATE_REBOOT 0x04
+// 0x08
+#define WLX_SHUTDOWN_STATE_SLEEP 0x10
+// 0x20
+#define WLX_SHUTDOWN_STATE_HIBERNATE 0x40
+// 0x80
+
+typedef struct _SHUTDOWN_DLG_CONTEXT
+{
+ PGINA_CONTEXT pgContext;
+ DWORD ShutdownOptions;
+ BOOL bCloseDlg;
+} SHUTDOWN_DLG_CONTEXT, *PSHUTDOWN_DLG_CONTEXT;
+
+DWORD
LoadShutdownSelState(VOID)
{
+ LONG lRet;
HKEY hKey;
- LONG lRet;
DWORD dwValue, dwTemp, dwSize;
/* Default to shutdown */
- dwValue = 1;
+ dwValue = WLX_SAS_ACTION_SHUTDOWN_POWER_OFF;
lRet = RegOpenKeyExW(HKEY_CURRENT_USER,
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
@@ -43,33 +55,40 @@
{
switch (dwTemp)
{
- case 0x01: /* Log off */
- dwValue = 0;
+ case WLX_SHUTDOWN_STATE_LOGOFF:
+ dwValue = WLX_SAS_ACTION_LOGOFF;
break;
- case 0x02: /* Shut down */
- dwValue = 1;
+ case WLX_SHUTDOWN_STATE_POWER_OFF:
+ dwValue = WLX_SAS_ACTION_SHUTDOWN_POWER_OFF;
break;
- case 0x04: /* Reboot */
- dwValue = 2;
+ case WLX_SHUTDOWN_STATE_REBOOT:
+ dwValue = WLX_SAS_ACTION_SHUTDOWN_REBOOT;
break;
- case 0x10: /* Sleep */
- dwValue = 3;
+ // 0x08
+
+ case WLX_SHUTDOWN_STATE_SLEEP:
+ dwValue = WLX_SAS_ACTION_SHUTDOWN_SLEEP;
break;
- case 0x40: /* Hibernate */
- dwValue = 4;
+ // 0x20
+
+ case WLX_SHUTDOWN_STATE_HIBERNATE:
+ dwValue = WLX_SAS_ACTION_SHUTDOWN_HIBERNATE;
break;
+
+ // 0x80
}
}
return dwValue;
}
-static VOID
-SaveShutdownSelState(DWORD ShutdownCode)
+VOID
+SaveShutdownSelState(
+ IN DWORD ShutdownCode)
{
HKEY hKey;
DWORD dwValue = 0;
@@ -86,24 +105,24 @@
switch (ShutdownCode)
{
- case 0: /* Log off */
- dwValue = 0x01;
- break;
-
- case 1: /* Shut down */
- dwValue = 0x02;
- break;
-
- case 2: /* Reboot */
- dwValue = 0x04;
- break;
-
- case 3: /* Sleep */
- dwValue = 0x10;
- break;
-
- case 4: /* Hibernate */
- dwValue = 0x40;
+ case WLX_SAS_ACTION_LOGOFF:
+ dwValue = WLX_SHUTDOWN_STATE_LOGOFF;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_POWER_OFF:
+ dwValue = WLX_SHUTDOWN_STATE_POWER_OFF;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_REBOOT:
+ dwValue = WLX_SHUTDOWN_STATE_REBOOT;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_SLEEP:
+ dwValue = WLX_SHUTDOWN_STATE_SLEEP;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_HIBERNATE:
+ dwValue = WLX_SHUTDOWN_STATE_HIBERNATE;
break;
}
@@ -114,232 +133,255 @@
RegCloseKey(hKey);
}
+DWORD
+GetAllowedShutdownOptions(VOID)
+{
+ DWORD Options = 0;
+
+ // FIXME: Compute those options accordings to current user's rights!
+ Options |= WLX_SHUTDOWN_STATE_LOGOFF | WLX_SHUTDOWN_STATE_POWER_OFF |
WLX_SHUTDOWN_STATE_REBOOT;
+
+ if (IsPwrSuspendAllowed())
+ Options |= WLX_SHUTDOWN_STATE_SLEEP;
+
+ if (IsPwrHibernateAllowed())
+ Options |= WLX_SHUTDOWN_STATE_HIBERNATE;
+
+ return Options;
+}
+
static VOID
-UpdateShutdownShellDesc(HWND hWnd)
+UpdateShutdownDesc(
+ IN HWND hDlg,
+ IN PSHUTDOWN_DLG_CONTEXT pContext) // HINSTANCE hInstance
{
UINT DescId = 0;
- DWORD ShutdownCode = 0;
- WCHAR tmpBuffer[256];
-
- ShutdownCode = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_GETCURSEL, 0, 0);
-
- if (!g_logoffHideState)
- {
- switch (ShutdownCode)
+ DWORD ShutdownCode;
+ WCHAR szBuffer[256];
+
+ ShutdownCode = SendDlgItemMessageW(hDlg, IDC_SHUTDOWN_LIST, CB_GETCURSEL, 0, 0);
+ if (ShutdownCode == CB_ERR) // Invalid selection
+ return;
+
+ ShutdownCode = SendDlgItemMessageW(hDlg, IDC_SHUTDOWN_LIST, CB_GETITEMDATA,
ShutdownCode, 0);
+
+ switch (ShutdownCode)
+ {
+ case WLX_SAS_ACTION_LOGOFF:
+ DescId = IDS_SHUTDOWN_LOGOFF_DESC;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_POWER_OFF:
+ DescId = IDS_SHUTDOWN_SHUTDOWN_DESC;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_REBOOT:
+ DescId = IDS_SHUTDOWN_RESTART_DESC;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_SLEEP:
+ DescId = IDS_SHUTDOWN_SLEEP_DESC;
+ break;
+
+ case WLX_SAS_ACTION_SHUTDOWN_HIBERNATE:
+ DescId = IDS_SHUTDOWN_HIBERNATE_DESC;
+ break;
+
+ default:
+ break;
+ }
+
+ LoadStringW(pContext->pgContext->hDllInstance, DescId, szBuffer,
_countof(szBuffer));
+ SetDlgItemTextW(hDlg, IDC_SHUTDOWN_DESCRIPTION, szBuffer);
+}
+
+static VOID
+ShutdownOnInit(
+ IN HWND hDlg,
+ IN PSHUTDOWN_DLG_CONTEXT pContext)
+{
+ PGINA_CONTEXT pgContext = pContext->pgContext;
+ HWND hwndList;
+ INT idx, count, i;
+ WCHAR szBuffer[256];
+ WCHAR szBuffer2[256];
+
+ hwndList = GetDlgItem(hDlg, IDC_SHUTDOWN_LIST);
+
+ /* Clear the content before it's used */
+ SendMessageW(hwndList, CB_RESETCONTENT, 0, 0);
+
+ /* Log off */
+ if (pContext->ShutdownOptions & WLX_SHUTDOWN_STATE_LOGOFF)
+ {
+ LoadStringW(pgContext->hDllInstance, IDS_SHUTDOWN_LOGOFF, szBuffer,
_countof(szBuffer));
+ StringCchPrintfW(szBuffer2, _countof(szBuffer2), szBuffer,
pgContext->UserName);
+ idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer2);
+ if (idx != CB_ERR)
+ SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_LOGOFF);
+ }
+
+ /* Shut down - DEFAULT */
+ if (pContext->ShutdownOptions & WLX_SHUTDOWN_STATE_POWER_OFF)
+ {
+ LoadStringW(pgContext->hDllInstance, IDS_SHUTDOWN_SHUTDOWN, szBuffer,
_countof(szBuffer));
+ idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
+ if (idx != CB_ERR)
+ SendMessageW(hwndList, CB_SETITEMDATA, idx,
WLX_SAS_ACTION_SHUTDOWN_POWER_OFF);
+ }
+
+ /* Restart */
+ if (pContext->ShutdownOptions & WLX_SHUTDOWN_STATE_REBOOT)
+ {
+ LoadStringW(pgContext->hDllInstance, IDS_SHUTDOWN_RESTART, szBuffer,
_countof(szBuffer));
+ idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
+ if (idx != CB_ERR)
+ SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_REBOOT);
+ }
+
+ // if (pContext->ShutdownOptions & 0x08) {}
+
+ /* Sleep */
+ if (pContext->ShutdownOptions & WLX_SHUTDOWN_STATE_SLEEP)
+ {
+ LoadStringW(pgContext->hDllInstance, IDS_SHUTDOWN_SLEEP, szBuffer,
_countof(szBuffer));
+ idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
+ if (idx != CB_ERR)
+ SendMessageW(hwndList, CB_SETITEMDATA, idx, WLX_SAS_ACTION_SHUTDOWN_SLEEP);
+ }
+
+ // if (pContext->ShutdownOptions & 0x20) {}
+
+ /* Hibernate */
+ if (pContext->ShutdownOptions & WLX_SHUTDOWN_STATE_HIBERNATE)
+ {
+ LoadStringW(pgContext->hDllInstance, IDS_SHUTDOWN_HIBERNATE, szBuffer,
_countof(szBuffer));
+ idx = SendMessageW(hwndList, CB_ADDSTRING, 0, (LPARAM)szBuffer);
+ if (idx != CB_ERR)
+ SendMessageW(hwndList, CB_SETITEMDATA, idx,
WLX_SAS_ACTION_SHUTDOWN_HIBERNATE);
+ }
+
+ // if (pContext->ShutdownOptions & 0x80) {}
+
+ /* Set the default shut down selection */
+ count = SendMessageW(hwndList, CB_GETCOUNT, 0, 0);
+ for (i = 0; i < count; i++)
+ {
+ if (SendMessageW(hwndList, CB_GETITEMDATA, i, 0) ==
pgContext->nShutdownAction)
{
- case 0: /* Log off */
- DescId = IDS_SHUTDOWN_LOGOFF_DESC;
- break;
- case 1: /* Shut down */
- DescId = IDS_SHUTDOWN_SHUTDOWN_DESC;
- break;
- case 2: /* Restart */
- DescId = IDS_SHUTDOWN_RESTART_DESC;
- break;
- default:
+ SendMessageW(hwndList, CB_SETCURSEL, i, 0);
break;
}
-
- if (IsPwrSuspendAllowed())
- {
- if (ShutdownCode == 3) /* Sleep */
- {
- DescId = IDS_SHUTDOWN_SLEEP_DESC;
- }
- else if (ShutdownCode == 4) /* Hibernate */
- {
- DescId = IDS_SHUTDOWN_HIBERNATE_DESC;
- }
- }
- else
- {
- if (ShutdownCode == 3) /* Hibernate */
- {
- DescId = IDS_SHUTDOWN_SLEEP_DESC;
- }
- }
- }
- else
- {
- switch (ShutdownCode)
- {
- case 0: /* Shut down */
- DescId = IDS_SHUTDOWN_SHUTDOWN_DESC;
- break;
- case 1: /* Restart */
- DescId = IDS_SHUTDOWN_RESTART_DESC;
- break;
- default:
- break;
- }
-
- if (IsPwrSuspendAllowed())
- {
- if (ShutdownCode == 2) /* Sleep */
- {
- DescId = IDS_SHUTDOWN_SLEEP_DESC;
- }
- else if (ShutdownCode == 3) /* Hibernate */
- {
- DescId = IDS_SHUTDOWN_HIBERNATE_DESC;
- }
- }
- else
- {
- if (ShutdownCode == 2) /* Hibernate */
- {
- DescId = IDS_SHUTDOWN_SLEEP_DESC;
- }
- }
- }
-
- LoadStringW(hDllInstance, DescId, tmpBuffer, _countof(tmpBuffer));
- SetDlgItemTextW(hWnd, IDC_SHUTDOWN_DESCRIPTION, tmpBuffer);
-}
-
-BOOL CALLBACK
-ExitWindowsDialogShellProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- PGINA_CONTEXT pgContext;
-
- pgContext = (PGINA_CONTEXT)GetWindowLongPtrW(hWnd, GWLP_USERDATA);
+ }
+
+ /* Update the choice description based on the current selection */
+ UpdateShutdownDesc(hDlg, pContext);
+}
+
+static VOID
+ShutdownOnOk(
+ IN HWND hDlg,
+ IN PGINA_CONTEXT pgContext)
+{
+ INT idx;
+
+ idx = SendDlgItemMessageW(hDlg,
+ IDC_SHUTDOWN_LIST,
+ CB_GETCURSEL,
+ 0,
+ 0);
+ if (idx != CB_ERR)
+ {
+ pgContext->nShutdownAction =
+ SendDlgItemMessageW(hDlg,
+ IDC_SHUTDOWN_LIST,
+ CB_GETITEMDATA,
+ idx,
+ 0);
+ }
+}
+
+static BOOL
+CALLBACK
+ShutdownDialogProc(
+ HWND hDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ PSHUTDOWN_DLG_CONTEXT pContext;
+
+ pContext = (PSHUTDOWN_DLG_CONTEXT)GetWindowLongPtrW(hDlg, GWLP_USERDATA);
switch (uMsg)
{
case WM_INITDIALOG:
{
- int defSelect = 0;
- int tmpSelect, lastState;
- WCHAR userBuffer[256];
- DWORD userBufferSize = _countof(userBuffer);
- WCHAR tmpBuffer[256];
- WCHAR tmpBuffer2[512];
-
- pgContext = (PGINA_CONTEXT)lParam;
- if (!pgContext)
+ pContext = (PSHUTDOWN_DLG_CONTEXT)lParam;
+ SetWindowLongPtrW(hDlg, GWLP_USERDATA, (LONG_PTR)pContext);
+
+ ShutdownOnInit(hDlg, pContext);
+
+ /* Draw the logo bitmap */
+ pContext->pgContext->hBitmap =
+ LoadImageW(pContext->pgContext->hDllInstance,
MAKEINTRESOURCEW(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
+ return TRUE;
+ }
+
+ case WM_DESTROY:
+ DeleteObject(pContext->pgContext->hBitmap);
+ return TRUE;
+
+ case WM_ACTIVATE:
+ {
+ /*
+ * If the user deactivates the shutdown dialog (it loses its focus
+ * while the dialog is not being closed), then destroy the dialog
+ * and cancel shutdown.
+ */
+ if (LOWORD(wParam) == WA_INACTIVE)
{
- WARN("pgContext is NULL, branding bitmaps will not be
displayed.\n");
- }
-
- SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LONG_PTR)pgContext);
-
- /* Clear the content before it's used */
- SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_RESETCONTENT, 0, 0);
-
- lastState = LoadShutdownSelState();
-
- if (!g_logoffHideState)
- {
- /* Log off */
- LoadStringW(hDllInstance, IDS_SHUTDOWN_LOGOFF, tmpBuffer,
_countof(tmpBuffer));
- GetUserNameW(userBuffer, &userBufferSize);
- StringCchPrintfW(tmpBuffer2, _countof(tmpBuffer2), tmpBuffer,
userBuffer);
- tmpSelect = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_ADDSTRING, 0,
(LPARAM)tmpBuffer2);
- if (lastState == 0)
+ if (!pContext->bCloseDlg)
{
- defSelect = tmpSelect;
+ pContext->bCloseDlg = TRUE;
+ EndDialog(hDlg, 0);
}
}
-
- /* Shut down - DEFAULT */
- LoadStringW(hDllInstance, IDS_SHUTDOWN_SHUTDOWN, tmpBuffer,
_countof(tmpBuffer));
- tmpSelect = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_ADDSTRING, 0,
(LPARAM)tmpBuffer);
- if (lastState == 1)
- {
- defSelect = tmpSelect;
- }
-
- /* Restart */
- LoadStringW(hDllInstance, IDS_SHUTDOWN_RESTART, tmpBuffer,
_countof(tmpBuffer));
- tmpSelect = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_ADDSTRING, 0,
(LPARAM)tmpBuffer);
- if (lastState == 2)
- {
- defSelect = tmpSelect;
- }
-
- /* Sleep */
- if (IsPwrSuspendAllowed())
- {
- LoadStringW(hDllInstance, IDS_SHUTDOWN_SLEEP, tmpBuffer,
_countof(tmpBuffer));
- tmpSelect = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_ADDSTRING, 0,
(LPARAM)tmpBuffer);
- if (lastState == 3)
- {
- defSelect = tmpSelect;
- }
- }
-
- /* Hibernate */
- if (IsPwrHibernateAllowed())
- {
- LoadStringW(hDllInstance, IDS_SHUTDOWN_HIBERNATE, tmpBuffer,
_countof(tmpBuffer));
- tmpSelect = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_ADDSTRING, 0,
(LPARAM)tmpBuffer);
- if (lastState == 4)
- {
- defSelect = tmpSelect;
- }
- }
-
- /* Sets the default shut down selection */
- SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST, CB_SETCURSEL, defSelect, 0);
-
- /* Updates the choice description based on the current selection */
- UpdateShutdownShellDesc(hWnd);
-
- /* Draw the logo bitmap */
- if (pgContext)
- pgContext->hBitmap = LoadImageW(hDllInstance,
MAKEINTRESOURCEW(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
-
- return TRUE;
- }
-
- case WM_DESTROY:
- {
- if (pgContext)
- DeleteObject(pgContext->hBitmap);
- return TRUE;
- }
-
-#if 0
- case WM_ACTIVATE:
- {
- if (LOWORD(wParam) == WA_INACTIVE)
- EndDialog(hWnd, 0);
return FALSE;
}
-#endif
case WM_PAINT:
{
PAINTSTRUCT ps;
- if (pgContext && pgContext->hBitmap)
+ if (pContext->pgContext->hBitmap)
{
- BeginPaint(hWnd, &ps);
- DrawStateW(ps.hdc, NULL, NULL, (LPARAM)pgContext->hBitmap, 0, 0, 0, 0,
0, DST_BITMAP);
- EndPaint(hWnd, &ps);
- return TRUE;
+ BeginPaint(hDlg, &ps);
+ DrawStateW(ps.hdc, NULL, NULL,
(LPARAM)pContext->pgContext->hBitmap, (WPARAM)0, 0, 0, 0, 0, DST_BITMAP);
+ EndPaint(hDlg, &ps);
}
- return FALSE;
+ return TRUE;
}
+
+ case WM_CLOSE:
+ pContext->bCloseDlg = TRUE;
+ EndDialog(hDlg, IDCANCEL);
+ break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
- g_shutdownCode = SendDlgItemMessageW(hWnd, IDC_SHUTDOWN_LIST,
CB_GETCURSEL, 0, 0);
- SaveShutdownSelState(g_shutdownCode);
- EndDialog(hWnd, IDOK);
+ ShutdownOnOk(hDlg, pContext->pgContext);
+
+ /* Fall back */
+ case IDCANCEL:
+ case IDHELP:
+ pContext->bCloseDlg = TRUE;
+ EndDialog(hDlg, LOWORD(wParam));
break;
- case IDCANCEL:
- EndDialog(hWnd, IDCANCEL);
- break;
-
- case IDHELP:
- EndDialog(hWnd, IDHELP);
- break;
-
case IDC_SHUTDOWN_LIST:
- UpdateShutdownShellDesc(hWnd);
+ UpdateShutdownDesc(hDlg, pContext);
break;
}
break;
@@ -349,6 +391,55 @@
}
return TRUE;
}
+
+INT_PTR
+ShutdownDialog(
+ IN HWND hwndDlg,
+ IN DWORD ShutdownOptions,
+ IN PGINA_CONTEXT pgContext)
+{
+ INT_PTR ret;
+ SHUTDOWN_DLG_CONTEXT Context;
+
+#if 0
+ DWORD ShutdownOptions;
+
+ // FIXME: User impersonation!!
+ pgContext->nShutdownAction = LoadShutdownSelState();
+ ShutdownOptions = GetAllowedShutdownOptions();
+#endif
+
+ Context.pgContext = pgContext;
+ Context.ShutdownOptions = ShutdownOptions;
+ Context.bCloseDlg = FALSE;
+
+ if (pgContext->hWlx && pgContext->pWlxFuncs)
+ {
+ ret = pgContext->pWlxFuncs->WlxDialogBoxParam(pgContext->hWlx,
+ pgContext->hDllInstance,
+
MAKEINTRESOURCEW(IDD_SHUTDOWN_DLG),
+ hwndDlg,
+ ShutdownDialogProc,
+ (LPARAM)&Context);
+ }
+ else
+ {
+ ret = DialogBoxParamW(pgContext->hDllInstance,
+ MAKEINTRESOURCEW(IDD_SHUTDOWN_DLG),
+ hwndDlg,
+ ShutdownDialogProc,
+ (LPARAM)&Context);
+ }
+
+#if 0
+ // FIXME: User impersonation!!
+ if (ret == IDOK)
+ SaveShutdownSelState(pgContext->nShutdownAction);
+#endif
+
+ return ret;
+}
+
/*
* NOTES:
@@ -373,35 +464,62 @@
LPWSTR lpUsername,
BOOL bHideLogoff)
{
- GINA_CONTEXT pgContext = { 0 };
- INT_PTR dlgValue = 0;
+ INT_PTR dlgValue;
+ DWORD ShutdownOptions;
+
+ /*
+ * As we are called by the shell itself, don't use
+ * the cached GINA context but use a local copy here.
+ */
+ GINA_CONTEXT gContext = { 0 };
+ DWORD BufferSize;
UNREFERENCED_PARAMETER(lpUsername);
- g_logoffHideState = bHideLogoff;
-
- /* Load the shut down dialog box */
- dlgValue = DialogBoxParamW(hDllInstance,
- MAKEINTRESOURCEW(IDD_SHUTDOWN_SHELL),
- hParent,
- ExitWindowsDialogShellProc,
- (LPARAM)&pgContext);
+ ShutdownOptions = GetAllowedShutdownOptions();
+ if (bHideLogoff)
+ ShutdownOptions &= ~WLX_SHUTDOWN_STATE_LOGOFF;
+
+ /* Initialize our local GINA context */
+ gContext.hDllInstance = hDllInstance;
+ BufferSize = _countof(gContext.UserName);
+ // NOTE: Only when this function is called, Win checks inside
+ // HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
+ // value "Logon User Name", and determines whether it will display
+ // the user name.
+ GetUserNameW(gContext.UserName, &BufferSize);
+ gContext.nShutdownAction = LoadShutdownSelState();
+
+ /* Load the shutdown dialog box */
+ dlgValue = ShutdownDialog(hParent, ShutdownOptions, &gContext);
/* Determine what to do based on user selection */
if (dlgValue == IDOK)
{
- switch (g_shutdownCode)
+ SaveShutdownSelState(gContext.nShutdownAction);
+
+ switch (gContext.nShutdownAction)
{
- case 0: /* Log off */
- return 0x01;
- case 1: /* Shut down */
- return 0x02;
- case 2: /* Reboot */
- return 0x04;
- case 3: /* Sleep */
- return 0x10;
- case 4: /* Hibernate */
- return 0x40;
+ case WLX_SAS_ACTION_LOGOFF:
+ return WLX_SHUTDOWN_STATE_LOGOFF;
+
+ case WLX_SAS_ACTION_SHUTDOWN_POWER_OFF:
+ return WLX_SHUTDOWN_STATE_POWER_OFF;
+
+ case WLX_SAS_ACTION_SHUTDOWN_REBOOT:
+ return WLX_SHUTDOWN_STATE_REBOOT;
+
+ // 0x08
+
+ case WLX_SAS_ACTION_SHUTDOWN_SLEEP:
+ return WLX_SHUTDOWN_STATE_SLEEP;
+
+ // 0x20
+
+ case WLX_SAS_ACTION_SHUTDOWN_HIBERNATE:
+ return WLX_SHUTDOWN_STATE_HIBERNATE;
+
+ // 0x80
}
}
/* Help file is called directly here */
@@ -415,5 +533,5 @@
ERR("Failed to create dialog\n");
}
- return 0x00;
-}
+ return 0;
+}
Modified: trunk/reactos/dll/win32/msgina/tui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/tui.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/tui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/tui.c [iso-8859-1] Sun Sep 18 19:37:25 2016
@@ -70,7 +70,7 @@
static LPCWSTR newLine = L"\n";
DWORD count;
- if (0 == LoadStringW(hDllInstance, uIdResourceText, Prompt, 256))
+ if (0 == LoadStringW(hDllInstance, uIdResourceText, Prompt, _countof(Prompt)))
return FALSE;
if (!WriteConsoleW(
GetStdHandle(STD_OUTPUT_HANDLE),
@@ -205,9 +205,9 @@
TRACE("TUILoggedOutSAS()\n");
/* Ask the user for credentials */
- if (!ReadString(IDS_ASKFORUSER, UserName, 256, TRUE))
- return WLX_SAS_ACTION_NONE;
- if (!ReadString(IDS_ASKFORPASSWORD, Password, 256, FALSE))
+ if (!ReadString(IDS_ASKFORUSER, UserName, _countof(UserName), TRUE))
+ return WLX_SAS_ACTION_NONE;
+ if (!ReadString(IDS_ASKFORPASSWORD, Password, _countof(Password), FALSE))
return WLX_SAS_ACTION_NONE;
Status = DoLoginTasks(pgContext, UserName, NULL, Password, &SubStatus);
@@ -238,9 +238,9 @@
return WLX_SAS_ACTION_UNLOCK_WKSTA;
/* Ask the user for credentials */
- if (!ReadString(IDS_ASKFORUSER, UserName, 256, TRUE))
- return WLX_SAS_ACTION_NONE;
- if (!ReadString(IDS_ASKFORPASSWORD, Password, 256, FALSE))
+ if (!ReadString(IDS_ASKFORUSER, UserName, _countof(UserName), TRUE))
+ return WLX_SAS_ACTION_NONE;
+ if (!ReadString(IDS_ASKFORPASSWORD, Password, _countof(Password), FALSE))
return WLX_SAS_ACTION_NONE;
Status = ConnectToLsa(pgContext);