mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[MSGINA] Be sure to always initialize the cached DLG_DATA GINA context (#2360)
The ReactOS logo banner is loaded from the GINA context whereas the animation bar is loaded from the main application instance. However, the aforementioned context is not initialized when WM_INITDIALOG occurs hence DlgData_LoadBitmaps() would fail on proceeding at loading the remaining bitmaps to be loaded.
This fixes the regression introduced by commit 623dd26c
(PR #2353).
This commit is contained in:
parent
623dd26cce
commit
61c8d3432c
1 changed files with 8 additions and 15 deletions
|
@ -42,11 +42,12 @@ typedef struct _DLG_DATA
|
|||
} DLG_DATA, *PDLG_DATA;
|
||||
|
||||
static PDLG_DATA
|
||||
DlgData_Create(HWND hwndDlg)
|
||||
DlgData_Create(HWND hwndDlg, PGINA_CONTEXT pgContext)
|
||||
{
|
||||
PDLG_DATA pDlgData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pDlgData));
|
||||
if (pDlgData)
|
||||
{
|
||||
pDlgData->pgContext = pgContext;
|
||||
SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR)pDlgData);
|
||||
}
|
||||
return pDlgData;
|
||||
|
@ -184,7 +185,7 @@ StatusDialogProc(
|
|||
SetDlgItemTextW(hwndDlg, IDC_STATUS_MESSAGE, msg->pMessage);
|
||||
SetEvent(msg->StartupEvent);
|
||||
|
||||
pDlgData = DlgData_Create(hwndDlg);
|
||||
pDlgData = DlgData_Create(hwndDlg, msg->Context);
|
||||
if (pDlgData == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
@ -394,12 +395,10 @@ WelcomeDialogProc(
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
pDlgData = DlgData_Create(hwndDlg);
|
||||
pDlgData = DlgData_Create(hwndDlg, (PGINA_CONTEXT)lParam);
|
||||
if (pDlgData == NULL)
|
||||
return FALSE;
|
||||
|
||||
pDlgData->pgContext = (PGINA_CONTEXT)lParam;
|
||||
|
||||
DlgData_LoadBitmaps(pDlgData);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1168,13 +1167,11 @@ LogonDialogProc(
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
pDlgData = DlgData_Create(hwndDlg);
|
||||
/* FIXME: take care of NoDomainUI */
|
||||
pDlgData = DlgData_Create(hwndDlg, (PGINA_CONTEXT)lParam);
|
||||
if (pDlgData == NULL)
|
||||
return FALSE;
|
||||
|
||||
/* FIXME: take care of NoDomainUI */
|
||||
pDlgData->pgContext = (PGINA_CONTEXT)lParam;
|
||||
|
||||
DlgData_LoadBitmaps(pDlgData);
|
||||
|
||||
SetWelcomeText(hwndDlg);
|
||||
|
@ -1444,12 +1441,10 @@ UnlockDialogProc(
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
pDlgData = DlgData_Create(hwndDlg);
|
||||
pDlgData = DlgData_Create(hwndDlg, (PGINA_CONTEXT)lParam);
|
||||
if (pDlgData == NULL)
|
||||
return FALSE;
|
||||
|
||||
pDlgData->pgContext = (PGINA_CONTEXT)lParam;
|
||||
|
||||
SetWelcomeText(hwndDlg);
|
||||
|
||||
SetLockMessage(hwndDlg, IDC_UNLOCK_MESSAGE, pDlgData->pgContext);
|
||||
|
@ -1540,12 +1535,10 @@ LockedDialogProc(
|
|||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
pDlgData = DlgData_Create(hwndDlg);
|
||||
pDlgData = DlgData_Create(hwndDlg, (PGINA_CONTEXT)lParam);
|
||||
if (pDlgData == NULL)
|
||||
return FALSE;
|
||||
|
||||
pDlgData->pgContext = (PGINA_CONTEXT)lParam;
|
||||
|
||||
DlgData_LoadBitmaps(pDlgData);
|
||||
|
||||
SetWelcomeText(hwndDlg);
|
||||
|
|
Loading…
Reference in a new issue