mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:33:00 +00:00
[RAPPS] Simplified string creation in CAvailableApps
Created a struct that fills itself upon creation. This makes it easy to include in CAvailableApps without additional weirdness.
This commit is contained in:
parent
b20280a0f9
commit
8d436d9bb5
2 changed files with 34 additions and 71 deletions
|
@ -79,15 +79,19 @@ private:
|
|||
|
||||
typedef BOOL(CALLBACK *AVAILENUMPROC)(CAvailableApplicationInfo *Info, LPCWSTR szFolderPath);
|
||||
|
||||
struct AvailableStrings
|
||||
{
|
||||
ATL::CStringW szPath;
|
||||
ATL::CStringW szCabPath;
|
||||
ATL::CStringW szAppsPath;
|
||||
ATL::CStringW szSearchPath;
|
||||
|
||||
AvailableStrings();
|
||||
};
|
||||
|
||||
class CAvailableApps
|
||||
{
|
||||
static ATL::CStringW m_szPath;
|
||||
static ATL::CStringW m_szCabPath;
|
||||
static ATL::CStringW m_szAppsPath;
|
||||
static ATL::CStringW m_szSearchPath;
|
||||
|
||||
static BOOL InitializeStaticStrings();
|
||||
|
||||
static AvailableStrings m_Strings;
|
||||
ATL::CAtlList<CAvailableApplicationInfo*> m_InfoList;
|
||||
|
||||
public:
|
||||
|
@ -106,7 +110,4 @@ public:
|
|||
const ATL::CStringW& GetFolderPath() const;
|
||||
const ATL::CStringW& GetAppPath() const;
|
||||
const ATL::CStringW& GetCabPath() const;
|
||||
LPCWSTR GetFolderPathString() const;
|
||||
LPCWSTR GetAppPathString() const;
|
||||
LPCWSTR GetCabPathString() const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue