mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[MSGINA] gui: Remove superfluous DLG_DATA.TimerID (#2505)
And use a timer ID define, with a positive value; report SetTimer() failure.
This commit is contained in:
parent
b8dd046ee4
commit
a5a426f867
1 changed files with 9 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
* PROJECT: ReactOS msgina.dll
|
||||
* FILE: dll/win32/msgina/gui.c
|
||||
* PURPOSE: ReactOS Logon GINA DLL
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
* PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
|
||||
* Katayama Hirofumi MZ (katayama.hirofumi.mz@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;
|
||||
|
|
Loading…
Reference in a new issue