mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 19:14:48 +00:00
[RAPPS] Move CMainWindow creation to upper function
This commit is contained in:
parent
85ca8afb60
commit
d6fecc52d1
4 changed files with 8 additions and 13 deletions
|
@ -781,15 +781,11 @@ CMainWindow::HandleTabOrder(int direction)
|
||||||
// **** CMainWindow ****
|
// **** CMainWindow ****
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
MainWindowLoop(CAppDB *db, INT nShowCmd)
|
MainWindowLoop(CMainWindow *wnd, INT nShowCmd)
|
||||||
{
|
{
|
||||||
HACCEL KeyBrd;
|
HACCEL KeyBrd;
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
|
|
||||||
CMainWindow *wnd = new CMainWindow(db);
|
|
||||||
if (!wnd)
|
|
||||||
return;
|
|
||||||
|
|
||||||
hMainWnd = wnd->Create();
|
hMainWnd = wnd->Create();
|
||||||
if (!hMainWnd)
|
if (!hMainWnd)
|
||||||
return;
|
return;
|
||||||
|
@ -819,6 +815,4 @@ MainWindowLoop(CAppDB *db, INT nShowCmd)
|
||||||
DispatchMessageW(&Msg);
|
DispatchMessageW(&Msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete wnd;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
VOID
|
VOID
|
||||||
CreateSettingsDlg(HWND hwnd);
|
CreateSettingsDlg(HWND hwnd);
|
||||||
|
|
||||||
// Main window
|
|
||||||
VOID
|
|
||||||
MainWindowLoop(class CAppDB *db, INT nShowCmd);
|
|
||||||
|
|
||||||
// Download dialogs
|
// Download dialogs
|
||||||
VOID
|
VOID
|
||||||
DownloadApplicationsDB(LPCWSTR lpUrl, BOOL IsOfficial);
|
DownloadApplicationsDB(LPCWSTR lpUrl, BOOL IsOfficial);
|
||||||
|
|
|
@ -131,3 +131,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits>
|
||||||
void
|
void
|
||||||
HandleTabOrder(int direction);
|
HandleTabOrder(int direction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Main window
|
||||||
|
VOID
|
||||||
|
MainWindowLoop(CMainWindow *wnd, INT nShowCmd);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Copyright 2020 He Yang (1160386205@qq.com)
|
* Copyright 2020 He Yang (1160386205@qq.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rapps.h"
|
#include "gui.h"
|
||||||
#include "unattended.h"
|
#include "unattended.h"
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
#include <conutils.h>
|
#include <conutils.h>
|
||||||
|
@ -256,7 +256,8 @@ ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindowLoop(&db, nCmdShow);
|
CMainWindow wnd(&db);
|
||||||
|
MainWindowLoop(&wnd, nCmdShow);
|
||||||
|
|
||||||
if (hMutex)
|
if (hMutex)
|
||||||
CloseHandle(hMutex);
|
CloseHandle(hMutex);
|
||||||
|
|
Loading…
Reference in a new issue