mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +00:00
[RAPPS] listview refactor (#2970)
This makes it easier to maintain the listview, and better separates the application list and listview. * [RAPPS] fix memory leak when cleanup. some renaming are also done * [RAPPS] move the code adding apps info inside class CAppsListView * [RAPPS] add table view, create listview and AppInfoDisplay inside it * [RAPPS] rename INSTALLED_INFO as CInstalledApplicationInfo now it corresponds with CAvailableApplicationInfo * [RAPPS] add CInstalledApps * [RAPPS] optimize the speed when refreshing listview * [RAPPS] correctly handle Enum for InstalledApps * [RAPPS] make check all working properly (this also fixes some bugs) the old version has some bugs when check all items after switching tags in tree-view * [RAPPS] add handling for wow64 * [RAPPS] use an inline function to replace INSERT_TEXT macro * [RAPPS] fix the bug that StatusBar won't update when switching tags * [RAPPS] now TableView always reset bIsAscending in SetDisplayMode * [RAPPS] rename TableView to ApplicationView * [RAPPS] now bIsAscending would be reset when switching column in listview
This commit is contained in:
parent
4482d0f455
commit
10c0ff7416
8 changed files with 1147 additions and 653 deletions
|
@ -3,19 +3,51 @@
|
|||
#include <windef.h>
|
||||
#include <atlstr.h>
|
||||
|
||||
struct INSTALLED_INFO
|
||||
class CInstalledApplicationInfo
|
||||
{
|
||||
HKEY hRootKey;
|
||||
public:
|
||||
BOOL IsUserKey;
|
||||
REGSAM WowKey;
|
||||
HKEY hSubKey;
|
||||
BOOL bIsUpdate = FALSE;
|
||||
|
||||
ATL::CStringW szKeyName;
|
||||
|
||||
CInstalledApplicationInfo(BOOL bIsUserKey, REGSAM RegWowKey, HKEY hKey);
|
||||
BOOL GetApplicationString(LPCWSTR lpKeyName, ATL::CStringW& String);
|
||||
BOOL UninstallApplication(BOOL bModify);
|
||||
LSTATUS RemoveFromRegistry();
|
||||
|
||||
ATL::CStringW szDisplayName;
|
||||
ATL::CStringW szDisplayVersion;
|
||||
ATL::CStringW szPublisher;
|
||||
ATL::CStringW szRegOwner;
|
||||
ATL::CStringW szProductID;
|
||||
ATL::CStringW szHelpLink;
|
||||
ATL::CStringW szHelpTelephone;
|
||||
ATL::CStringW szReadme;
|
||||
ATL::CStringW szContact;
|
||||
ATL::CStringW szURLUpdateInfo;
|
||||
ATL::CStringW szURLInfoAbout;
|
||||
ATL::CStringW szComments;
|
||||
ATL::CStringW szInstallDate;
|
||||
ATL::CStringW szInstallLocation;
|
||||
ATL::CStringW szInstallSource;
|
||||
ATL::CStringW szUninstallString;
|
||||
ATL::CStringW szModifyPath;
|
||||
|
||||
~CInstalledApplicationInfo();
|
||||
};
|
||||
|
||||
typedef INSTALLED_INFO *PINSTALLED_INFO;
|
||||
typedef BOOL(CALLBACK *APPENUMPROC)(INT ItemIndex, ATL::CStringW &Name, PINSTALLED_INFO Info, PVOID param);
|
||||
typedef BOOL(CALLBACK *APPENUMPROC)(CInstalledApplicationInfo * Info, PVOID param);
|
||||
|
||||
BOOL EnumInstalledApplications(INT EnumType, BOOL IsUserKey, APPENUMPROC lpEnumProc, PVOID param);
|
||||
BOOL GetApplicationString(HKEY hKey, LPCWSTR lpKeyName, LPWSTR szString);
|
||||
class CInstalledApps
|
||||
{
|
||||
ATL::CAtlList<CInstalledApplicationInfo *> m_InfoList;
|
||||
|
||||
public:
|
||||
BOOL Enum(INT EnumType, APPENUMPROC lpEnumProc, PVOID param);
|
||||
|
||||
VOID FreeCachedEntries();
|
||||
};
|
||||
|
||||
BOOL UninstallApplication(PINSTALLED_INFO ItemInfo, BOOL bModify);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue