mirror of
https://github.com/reactos/reactos.git
synced 2025-05-31 23:18:39 +00:00
[RAPPS] move the message proc to gui.cpp
This commit is contained in:
parent
2bcc31a187
commit
2c965f67d5
3 changed files with 31 additions and 23 deletions
|
@ -1829,3 +1829,31 @@ VOID InsertRichEditText(const ATL::CStringW& szText, DWORD flags)
|
||||||
{
|
{
|
||||||
InsertRichEditText(szText.GetString(), flags);
|
InsertRichEditText(szText.GetString(), flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID ShowMainWindow(INT nShowCmd)
|
||||||
|
{
|
||||||
|
HACCEL KeyBrd;
|
||||||
|
MSG Msg;
|
||||||
|
|
||||||
|
hMainWnd = CreateMainWindow();
|
||||||
|
|
||||||
|
if (hMainWnd)
|
||||||
|
{
|
||||||
|
/* Maximize it if we must */
|
||||||
|
ShowWindow(hMainWnd, ((SettingsInfo.bSaveWndPos && SettingsInfo.Maximized) ? SW_MAXIMIZE : nShowCmd));
|
||||||
|
UpdateWindow(hMainWnd);
|
||||||
|
|
||||||
|
/* Load the menu hotkeys */
|
||||||
|
KeyBrd = LoadAcceleratorsW(NULL, MAKEINTRESOURCEW(HOTKEYS));
|
||||||
|
|
||||||
|
/* Message Loop */
|
||||||
|
while (GetMessageW(&Msg, NULL, 0, 0))
|
||||||
|
{
|
||||||
|
if (!TranslateAcceleratorW(hMainWnd, KeyBrd, &Msg))
|
||||||
|
{
|
||||||
|
TranslateMessage(&Msg);
|
||||||
|
DispatchMessageW(&Msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -38,3 +38,5 @@ VOID CreateSettingsDlg(HWND hwnd);
|
||||||
|
|
||||||
// About dialog (aboutdlg.cpp)
|
// About dialog (aboutdlg.cpp)
|
||||||
VOID ShowAboutDialog();
|
VOID ShowAboutDialog();
|
||||||
|
|
||||||
|
VOID ShowMainWindow(INT nShowCmd);
|
||||||
|
|
|
@ -126,8 +126,6 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
|
||||||
{
|
{
|
||||||
LPCWSTR szWindowClass = L"ROSAPPMGR";
|
LPCWSTR szWindowClass = L"ROSAPPMGR";
|
||||||
HANDLE hMutex;
|
HANDLE hMutex;
|
||||||
HACCEL KeyBrd;
|
|
||||||
MSG Msg;
|
|
||||||
BOOL bIsFirstLaunch;
|
BOOL bIsFirstLaunch;
|
||||||
|
|
||||||
InitializeAtlModule(hInstance, TRUE);
|
InitializeAtlModule(hInstance, TRUE);
|
||||||
|
@ -165,27 +163,7 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
|
||||||
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
|
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
|
||||||
CAvailableApps::ForceUpdateAppsDB();
|
CAvailableApps::ForceUpdateAppsDB();
|
||||||
|
|
||||||
hMainWnd = CreateMainWindow();
|
ShowMainWindow(nShowCmd);
|
||||||
|
|
||||||
if (hMainWnd)
|
|
||||||
{
|
|
||||||
/* Maximize it if we must */
|
|
||||||
ShowWindow(hMainWnd, ((SettingsInfo.bSaveWndPos && SettingsInfo.Maximized) ? SW_MAXIMIZE : nShowCmd));
|
|
||||||
UpdateWindow(hMainWnd);
|
|
||||||
|
|
||||||
/* Load the menu hotkeys */
|
|
||||||
KeyBrd = LoadAcceleratorsW(NULL, MAKEINTRESOURCEW(HOTKEYS));
|
|
||||||
|
|
||||||
/* Message Loop */
|
|
||||||
while (GetMessageW(&Msg, NULL, 0, 0))
|
|
||||||
{
|
|
||||||
if (!TranslateAcceleratorW(hMainWnd, KeyBrd, &Msg))
|
|
||||||
{
|
|
||||||
TranslateMessage(&Msg);
|
|
||||||
DispatchMessageW(&Msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hMutex)
|
if (hMutex)
|
||||||
|
|
Loading…
Reference in a new issue