[RAPPS] Replace Extract with FDI for handling .cab
[reactos.git] / base / applications / rapps / include / misc.h
1 #pragma once
2
3 #include <windef.h>
4 #include <atlstr.h>
5
6 INT GetWindowWidth(HWND hwnd);
7 INT GetWindowHeight(HWND hwnd);
8 INT GetClientWindowWidth(HWND hwnd);
9 INT GetClientWindowHeight(HWND hwnd);
10
11 VOID CopyTextToClipboard(LPCWSTR lpszText);
12 VOID SetWelcomeText();
13 VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem);
14 BOOL StartProcess(ATL::CStringW &Path, BOOL Wait);
15 BOOL StartProcess(LPWSTR lpPath, BOOL Wait);
16 BOOL GetStorageDirectory(ATL::CStringW &lpDirectory);
17
18 VOID InitLogs();
19 VOID FreeLogs();
20 BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg);
21 BOOL GetInstalledVersion(ATL::CStringW *pszVersion, const ATL::CStringW &szRegName);
22
23 BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName,
24 const ATL::CStringW& szCabDir,
25 const ATL::CStringW& szOutputDir);
26
27 class CConfigParser
28 {
29 // Locale names cache
30 const static INT m_cchLocaleSize = 5;
31
32 ATL::CStringW m_szLocaleID;
33 ATL::CStringW m_szCachedINISectionLocale;
34 ATL::CStringW m_szCachedINISectionLocaleNeutral;
35
36 const ATL::CStringW szConfigPath;
37
38 ATL::CStringW GetINIFullPath(const ATL::CStringW& FileName);
39 VOID CacheINILocale();
40
41 public:
42 CConfigParser(const ATL::CStringW& FileName = "");
43
44 UINT GetString(const ATL::CStringW& KeyName, ATL::CStringW& ResultString);
45 UINT GetInt(const ATL::CStringW& KeyName);
46 };