diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp index 55df5152175..ad2a13f9a9f 100644 --- a/base/applications/rapps/gui.cpp +++ b/base/applications/rapps/gui.cpp @@ -802,38 +802,33 @@ private: // UpdateApplicationsList(ENUM_ALL_COMPONENTS); } - HTREEITEM AddCategory(HTREEITEM hRootItem, UINT TextIndex, UINT IconIndex) - { - return m_TreeView->AddCategory(hRootItem, TextIndex, IconIndex); - } - VOID InitCategoriesList() { HTREEITEM hRootItemInstalled, hRootItemAvailable; - hRootItemInstalled = AddCategory(TVI_ROOT, IDS_INSTALLED, IDI_CATEGORY); - AddCategory(hRootItemInstalled, IDS_APPLICATIONS, IDI_APPS); - AddCategory(hRootItemInstalled, IDS_UPDATES, IDI_APPUPD); + hRootItemInstalled = m_TreeView->AddCategory(TVI_ROOT, IDS_INSTALLED, IDI_CATEGORY); + m_TreeView->AddCategory(hRootItemInstalled, IDS_APPLICATIONS, IDI_APPS); + m_TreeView->AddCategory(hRootItemInstalled, IDS_UPDATES, IDI_APPUPD); - AddCategory(TVI_ROOT, IDS_SELECTEDFORINST, IDI_SELECTEDFORINST); + m_TreeView->AddCategory(TVI_ROOT, IDS_SELECTEDFORINST, IDI_SELECTEDFORINST); - hRootItemAvailable = AddCategory(TVI_ROOT, IDS_AVAILABLEFORINST, IDI_CATEGORY); - AddCategory(hRootItemAvailable, IDS_CAT_AUDIO, IDI_CAT_AUDIO); - AddCategory(hRootItemAvailable, IDS_CAT_VIDEO, IDI_CAT_VIDEO); - AddCategory(hRootItemAvailable, IDS_CAT_GRAPHICS, IDI_CAT_GRAPHICS); - AddCategory(hRootItemAvailable, IDS_CAT_GAMES, IDI_CAT_GAMES); - AddCategory(hRootItemAvailable, IDS_CAT_INTERNET, IDI_CAT_INTERNET); - AddCategory(hRootItemAvailable, IDS_CAT_OFFICE, IDI_CAT_OFFICE); - AddCategory(hRootItemAvailable, IDS_CAT_DEVEL, IDI_CAT_DEVEL); - AddCategory(hRootItemAvailable, IDS_CAT_EDU, IDI_CAT_EDU); - AddCategory(hRootItemAvailable, IDS_CAT_ENGINEER, IDI_CAT_ENGINEER); - AddCategory(hRootItemAvailable, IDS_CAT_FINANCE, IDI_CAT_FINANCE); - AddCategory(hRootItemAvailable, IDS_CAT_SCIENCE, IDI_CAT_SCIENCE); - AddCategory(hRootItemAvailable, IDS_CAT_TOOLS, IDI_CAT_TOOLS); - AddCategory(hRootItemAvailable, IDS_CAT_DRIVERS, IDI_CAT_DRIVERS); - AddCategory(hRootItemAvailable, IDS_CAT_LIBS, IDI_CAT_LIBS); - AddCategory(hRootItemAvailable, IDS_CAT_THEMES, IDI_CAT_THEMES); - AddCategory(hRootItemAvailable, IDS_CAT_OTHER, IDI_CAT_OTHER); + hRootItemAvailable = m_TreeView->AddCategory(TVI_ROOT, IDS_AVAILABLEFORINST, IDI_CATEGORY); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_AUDIO, IDI_CAT_AUDIO); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_VIDEO, IDI_CAT_VIDEO); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_GRAPHICS, IDI_CAT_GRAPHICS); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_GAMES, IDI_CAT_GAMES); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_INTERNET, IDI_CAT_INTERNET); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_OFFICE, IDI_CAT_OFFICE); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_DEVEL, IDI_CAT_DEVEL); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_EDU, IDI_CAT_EDU); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_ENGINEER, IDI_CAT_ENGINEER); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_FINANCE, IDI_CAT_FINANCE); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_SCIENCE, IDI_CAT_SCIENCE); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_TOOLS, IDI_CAT_TOOLS); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_DRIVERS, IDI_CAT_DRIVERS); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_LIBS, IDI_CAT_LIBS); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_THEMES, IDI_CAT_THEMES); + m_TreeView->AddCategory(hRootItemAvailable, IDS_CAT_OTHER, IDI_CAT_OTHER); m_TreeView->SetImageList(); m_TreeView->Expand(hRootItemInstalled, TVE_EXPAND); @@ -1562,7 +1557,7 @@ private: break; case ID_SEARCH: - ::SetFocus(m_SearchBar->m_hWnd); + m_SearchBar->SetFocus(); break; case ID_INSTALL: @@ -1871,8 +1866,8 @@ VOID ShowMainWindow(INT nShowCmd) return; /* Maximize it if we must */ - ShowWindow(hMainWnd, ((SettingsInfo.bSaveWndPos && SettingsInfo.Maximized) ? SW_MAXIMIZE : nShowCmd)); - UpdateWindow(hMainWnd); + wnd->ShowWindow((SettingsInfo.bSaveWndPos && SettingsInfo.Maximized) ? SW_MAXIMIZE : nShowCmd); + wnd->UpdateWindow(); /* Load the menu hotkeys */ KeyBrd = LoadAcceleratorsW(NULL, MAKEINTRESOURCEW(HOTKEYS));