mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +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:
@@ -2,7 +2,7 @@
|
||||
* PROJECT: ReactOS msgina.dll
|
||||
* FILE: dll/win32/msgina/gui.c
|
||||
* PURPOSE: ReactOS Logon GINA DLL
|
||||
* PROGRAMMERS: Hervé Poussineau ([email protected])
|
||||
* PROGRAMMERS: Hervé Poussineau ([email protected])
|
||||
* Katayama Hirofumi MZ ([email protected])
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user