https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a5a426f867c6ef160e083…
commit a5a426f867c6ef160e083e2477bc815bd0acaebf
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Thu Apr 9 18:54:15 2020 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Apr 9 18:54:15 2020 +0200
[MSGINA] gui: Remove superfluous DLG_DATA.TimerID (#2505)
And use a timer ID define, with a positive value; report SetTimer() failure.
---
dll/win32/msgina/gui.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dll/win32/msgina/gui.c b/dll/win32/msgina/gui.c
index dbe28c6636a..e9cba9580ea 100644
--- a/dll/win32/msgina/gui.c
+++ b/dll/win32/msgina/gui.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS msgina.dll
* FILE: dll/win32/msgina/gui.c
* PURPOSE: ReactOS Logon GINA DLL
- * PROGRAMMERS: Herv� Poussineau (hpoussin(a)reactos.org)
+ * PROGRAMMERS: Hervé Poussineau (hpoussin(a)reactos.org)
* Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com)
*/
@@ -28,12 +28,14 @@ typedef struct _LEGALNOTICEDATA
LPWSTR pszText;
} LEGALNOTICEDATA, *PLEGALNOTICEDATA;
+// Timer ID for the animated dialog bar.
+#define IDT_BAR 1
+
typedef struct _DLG_DATA
{
PGINA_CONTEXT pgContext;
HBITMAP hLogoBitmap;
HBITMAP hBarBitmap;
- UINT_PTR TimerID;
DWORD BarCounter;
DWORD LogoWidth;
DWORD LogoHeight;
@@ -191,7 +193,10 @@ StatusDialogProc(
if (DlgData_LoadBitmaps(pDlgData))
{
- pDlgData->TimerID = SetTimer(hwndDlg, -1, 20, NULL);
+ if (SetTimer(hwndDlg, IDT_BAR, 20, NULL) == 0)
+ {
+ ERR("SetTimer(IDT_BAR) failed: %d\n", GetLastError());
+ }
}
return TRUE;
}
@@ -244,7 +249,7 @@ StatusDialogProc(
{
if (pDlgData && pDlgData->hBarBitmap)
{
- KillTimer(hwndDlg, pDlgData->TimerID);
+ KillTimer(hwndDlg, IDT_BAR);
}
DlgData_Destroy(pDlgData);
return TRUE;