mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:05:50 +00:00
[RAPPS] Load icons on background thread (#6881)
- Load icons on background thread to massively reduce loading time. - Use SM_CXICON sized icons consistently instead of hardcoding 32 in some places.
This commit is contained in:
parent
4321c975c7
commit
d73a838245
3 changed files with 158 additions and 51 deletions
|
@ -459,6 +459,14 @@ CMainWindow::ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPa
|
|||
}
|
||||
break;
|
||||
|
||||
case WM_SETTINGCHANGE:
|
||||
if (wParam == SPI_SETNONCLIENTMETRICS || wParam == SPI_SETICONMETRICS)
|
||||
{
|
||||
DestroyIcon(g_hDefaultPackageIcon);
|
||||
g_hDefaultPackageIcon = NULL; // Trigger imagelist recreation on next load
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
if (wParam == SEARCH_TIMER_ID)
|
||||
{
|
||||
|
@ -598,6 +606,7 @@ CMainWindow::AddApplicationsToView(CAtlList<CAppInfo *> &List)
|
|||
m_ApplicationView->AddApplication(Info, bSelected);
|
||||
}
|
||||
}
|
||||
m_ApplicationView->AddApplication(NULL, FALSE); // Tell the list we are done
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -605,6 +614,13 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload, BOOL
|
|||
{
|
||||
bUpdating = TRUE;
|
||||
|
||||
if (HCURSOR hCursor = LoadCursor(NULL, IDC_APPSTARTING))
|
||||
{
|
||||
// The database (.ini files) is parsed on the UI thread, let the user know we are busy
|
||||
SetCursor(hCursor);
|
||||
PostMessage(WM_SETCURSOR, (WPARAM)m_hWnd, MAKELONG(HTCLIENT, WM_MOUSEMOVE));
|
||||
}
|
||||
|
||||
if (bCheckAvailable)
|
||||
CheckAvailable();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue