mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-08-09 15:31:07 +10:00
Update Shell
This commit is contained in:
Binary file not shown.
@@ -96,6 +96,7 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;$(OutDir)pkgread.lib;$(OutDir)pkgmgr.lib;$(OutDir)certmgr.lib;$(OutDir)priformatcli.lib;$(OutDir)notice.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>app.manifest</AdditionalManifestFiles>
|
||||
@@ -132,6 +133,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>shlwapi.lib;version.lib;dwmapi.lib;$(OutDir)pkgread.lib;$(OutDir)pkgmgr.lib;$(OutDir)certmgr.lib;$(OutDir)priformatcli.lib;$(OutDir)notice.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>app.manifest</AdditionalManifestFiles>
|
||||
@@ -167,6 +169,7 @@
|
||||
<ClInclude Include="filepath.h" />
|
||||
<ClInclude Include="ieshell.h" />
|
||||
<ClInclude Include="initfile.h" />
|
||||
<ClInclude Include="localeex.h" />
|
||||
<ClInclude Include="module.h" />
|
||||
<ClInclude Include="mpstr.h" />
|
||||
<ClInclude Include="nstring.h" />
|
||||
@@ -190,6 +193,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="appinstaller.rc" />
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
<ClInclude Include="..\priformatcli\priformatcli.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="localeex.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
|
||||
+41
-2
@@ -12,6 +12,7 @@
|
||||
#include "nstring.h"
|
||||
#include "priformatcli.h"
|
||||
#include "pkgread.h"
|
||||
|
||||
static std::string ws2utf8 (const std::wstring &ws)
|
||||
{
|
||||
std::wstring_convert <std::codecvt_utf8 <wchar_t>> conv;
|
||||
@@ -37,7 +38,7 @@ struct pkginfo
|
||||
// 对于 AppxBundle 包永远返回是资源包(因为框架包无法打包成 AppxBundle,资源包必须与应用包一同打包进 AppxBundle)。
|
||||
// 返回 PKGROLE_* 宏。
|
||||
WORD role = 0;
|
||||
struct
|
||||
struct
|
||||
{
|
||||
std::wstring name,
|
||||
publisher,
|
||||
@@ -47,6 +48,39 @@ struct pkginfo
|
||||
VERSION version, realver;
|
||||
DWORD architecture;
|
||||
} identity;
|
||||
// x86: 0
|
||||
// x64: 9
|
||||
// Arm: 5
|
||||
// Neutral: 11
|
||||
// Arm64: 12
|
||||
std::set <WORD> get_architectures () const
|
||||
{
|
||||
std::set <WORD> ret;
|
||||
switch (type)
|
||||
{
|
||||
case PKGTYPE_APPX: {
|
||||
switch (identity.architecture)
|
||||
{
|
||||
case PKG_ARCHITECTURE_X86: ret.insert (0); break;
|
||||
case PKG_ARCHITECTURE_X64: ret.insert (9); break;
|
||||
case PKG_ARCHITECTURE_ARM: ret.insert (5); break;
|
||||
case PKG_ARCHITECTURE_ARM64: ret.insert (12); break;
|
||||
case PKG_ARCHITECTURE_NEUTRAL: ret.insert (11); break;
|
||||
}
|
||||
} break;
|
||||
case PKGTYPE_BUNDLE: {
|
||||
if (identity.architecture & PKG_ARCHITECTURE_X86) ret.insert (0);
|
||||
if (identity.architecture & PKG_ARCHITECTURE_X64) ret.insert (9);
|
||||
if (identity.architecture & PKG_ARCHITECTURE_ARM) ret.insert (5);
|
||||
if (identity.architecture & PKG_ARCHITECTURE_ARM64) ret.insert (12);
|
||||
// 由于架构历史发展原因:这样做是对的。
|
||||
if (identity.architecture & (PKG_ARCHITECTURE_X86 | PKG_ARCHITECTURE_X64 | PKG_ARCHITECTURE_ARM))
|
||||
{ ret.clear (); ret.insert (11); }
|
||||
if (identity.architecture & PKG_ARCHITECTURE_NEUTRAL) { ret.clear (); ret.insert (11); }
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
struct
|
||||
{
|
||||
std::wstring display_name;
|
||||
@@ -91,6 +125,7 @@ struct pkginfo
|
||||
struct
|
||||
{
|
||||
VERSION os_min_version, os_max_version_tested;
|
||||
std::wstring os_min_version_description, os_max_version_tested_description;
|
||||
} prerequisites;
|
||||
static pkginfo parse (const std::wstring &filepath)
|
||||
{
|
||||
@@ -128,6 +163,8 @@ struct pkginfo
|
||||
auto prer = pread.get_prerequisites ();
|
||||
pkg.prerequisites.os_min_version = prer.os_min_version ();
|
||||
pkg.prerequisites.os_max_version_tested = prer.os_max_version_tested ();
|
||||
pkg.prerequisites.os_min_version_description = prer.os_min_version_description ();
|
||||
pkg.prerequisites.os_max_version_tested_description = prer.os_max_version_tested_description ();
|
||||
}
|
||||
{
|
||||
auto apps = pread.get_applications ();
|
||||
@@ -299,10 +336,12 @@ struct pkginfo
|
||||
Value obj (kObjectType);
|
||||
obj.AddMember ("os_min_version", ver_to_json (prerequisites.os_min_version, alloc), alloc);
|
||||
obj.AddMember ("os_max_version_tested", ver_to_json (prerequisites.os_max_version_tested, alloc), alloc);
|
||||
obj.AddMember ("os_min_version_description", Value (ws2utf8 (prerequisites.os_min_version_description).c_str (), alloc), alloc);
|
||||
obj.AddMember ("os_max_version_tested_description", Value (ws2utf8 (prerequisites.os_max_version_tested_description).c_str (), alloc), alloc);
|
||||
doc.AddMember ("prerequisites", obj, alloc);
|
||||
}
|
||||
StringBuffer buffer;
|
||||
Writer<StringBuffer> writer (buffer);
|
||||
Writer <StringBuffer> writer (buffer);
|
||||
doc.Accept (writer);
|
||||
std::string utf8 = buffer.GetString ();
|
||||
std::wstring_convert <std::codecvt_utf8 <wchar_t>> conv;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "rctools.h"
|
||||
#include "filepath.h"
|
||||
#include "raii.h"
|
||||
#include "resource.h"
|
||||
|
||||
// 允许忽视命令行前缀。如当命令行前缀为“-”"/"时,且开启此项,则输入“-args”与"/args"和"args" 是等效的
|
||||
#define CMDARG_IGNOREPREFIXS 0b001
|
||||
@@ -24,12 +25,14 @@ struct cmdarg
|
||||
std::wstring description; // 描述,用于生成帮助文本
|
||||
DWORD flags; // 标志
|
||||
};
|
||||
#define CMDARG_PREFIXS_DEFAULT {L"-", L"/"}
|
||||
#define CMDARG_PREFIXS_DEFAULT {L"/", L"-"}
|
||||
#define CMDARG_POSTFIXS_DEFAULT {}
|
||||
#define CMDARG_HELP {CMDARG_PREFIXS_DEFAULT, {L"?", L"help", L"h"}, CMDARG_PREFIXS_DEFAULT, L"help", GetRCStringSW (IDS_CMDPARAM_HELP), CMDARG_IGNOREPREFIXS}
|
||||
std::vector <cmdarg> g_argslist = {
|
||||
{CMDARG_PREFIXS_DEFAULT, {L"silent", L"quiet", L"passive"}, CMDARG_POSTFIXS_DEFAULT, L"silent", GetRCStringSW (0), CMDARG_IGNOREPREFIXS},
|
||||
{CMDARG_PREFIXS_DEFAULT, {L"verysilent", L"veryquiet"}, CMDARG_POSTFIXS_DEFAULT, L"verysilent", GetRCStringSW (0), CMDARG_IGNOREPREFIXS},
|
||||
{CMDARG_PREFIXS_DEFAULT, {L"multiple", L"filelist"}, {L"="}, L"multiple", GetRCStringSW (0), CMDARG_IGNOREPREFIXS | CMDARG_ENABLEPARAMS}
|
||||
CMDARG_HELP,
|
||||
{CMDARG_PREFIXS_DEFAULT, {L"silent", L"quiet", L"passive"}, CMDARG_POSTFIXS_DEFAULT, L"silent", GetRCStringSW (IDS_CMDPARAM_SILENT), CMDARG_IGNOREPREFIXS},
|
||||
{CMDARG_PREFIXS_DEFAULT, {L"verysilent", L"veryquiet"}, CMDARG_POSTFIXS_DEFAULT, L"verysilent", GetRCStringSW (IDS_CMDPARAM_VERYSILENT), CMDARG_IGNOREPREFIXS},
|
||||
{CMDARG_PREFIXS_DEFAULT, {L"multiple", L"filelist"}, {L"="}, L"multiple", GetRCStringSW (IDS_CMDPARAM_MULTIPLE), CMDARG_IGNOREPREFIXS | CMDARG_ENABLEPARAMS}
|
||||
};
|
||||
bool IsFile (const std::wstring &path)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,248 @@
|
||||
#pragma once
|
||||
#include <WinNls.h>
|
||||
#include <string>
|
||||
#include "typestrans.h"
|
||||
|
||||
#undef GetLocaleInfo
|
||||
std::string GetLocaleInfoA (LCID code, LCTYPE type)
|
||||
{
|
||||
char buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
GetLocaleInfoA (code, type, buf, LOCALE_NAME_MAX_LENGTH);
|
||||
return buf;
|
||||
}
|
||||
std::wstring GetLocaleInfoW (LCID code, LCTYPE type)
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
GetLocaleInfoW (code, type, buf, LOCALE_NAME_MAX_LENGTH);
|
||||
return buf;
|
||||
}
|
||||
void GetLocaleInfo (LCID code, LCTYPE type, std::wstring &output)
|
||||
{
|
||||
output = GetLocaleInfoW (code, type);
|
||||
}
|
||||
void GetLocaleInfo (LCID code, LCTYPE type, std::string &output)
|
||||
{
|
||||
output = GetLocaleInfoA (code, type);
|
||||
}
|
||||
int GetLocaleInfoEx (std::wstring lpLocaleName, LCTYPE type, std::wstring &output)
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
int res = GetLocaleInfoEx (lpLocaleName.c_str (), type, buf, LOCALE_NAME_MAX_LENGTH);
|
||||
if (&output) output = std::wstring (buf);
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef SetLocaleInfo
|
||||
BOOL SetLocaleInfoA (LCID code, LCTYPE type, const std::string &lcData)
|
||||
{
|
||||
return SetLocaleInfoA (code, type, lcData.c_str ());
|
||||
}
|
||||
BOOL SetLocaleInfoW (LCID code, LCTYPE type, const std::wstring &lcData)
|
||||
{
|
||||
return SetLocaleInfoW (code, type, lcData.c_str ());
|
||||
}
|
||||
BOOL SetLocaleInfo (LCID code, LCTYPE type, const std::wstring &lcData)
|
||||
{
|
||||
return SetLocaleInfoW (code, type, lcData);
|
||||
}
|
||||
BOOL SetLocaleInfo (LCID code, LCTYPE type, const std::string &lcData)
|
||||
{
|
||||
return SetLocaleInfoA (code, type, lcData);
|
||||
}
|
||||
|
||||
std::string GetLocaleRestrictedCodeFromLcidA (LCID lcid)
|
||||
{
|
||||
return GetLocaleInfoA (lcid, 89);
|
||||
}
|
||||
std::wstring GetLocaleRestrictedCodeFromLcidW (LCID lcid)
|
||||
{
|
||||
return GetLocaleInfoW (lcid, 89);
|
||||
}
|
||||
void GetLocaleRestrictedCodeFromLcid (LCID lcid, std::string &ret)
|
||||
{
|
||||
ret = GetLocaleRestrictedCodeFromLcidA (lcid);
|
||||
}
|
||||
void GetLocaleRestrictedCodeFromLcid (LCID lcid, std::wstring &ret)
|
||||
{
|
||||
ret = GetLocaleRestrictedCodeFromLcidW (lcid);
|
||||
}
|
||||
|
||||
std::string GetLocaleElaboratedCodeFromLcidA (LCID lcid)
|
||||
{
|
||||
return GetLocaleInfoA (lcid, 90);
|
||||
}
|
||||
std::wstring GetLocaleElaboratedCodeFromLcidW (LCID lcid)
|
||||
{
|
||||
return GetLocaleInfoW (lcid, 90);
|
||||
}
|
||||
void GetLocaleElaboratedCodeFromLcid (LCID lcid, std::wstring &ret)
|
||||
{
|
||||
ret = GetLocaleElaboratedCodeFromLcidW (lcid);
|
||||
}
|
||||
void GetLocaleElaboratedCodeFromLcid (LCID lcid, std::string &ret)
|
||||
{
|
||||
ret = GetLocaleElaboratedCodeFromLcidA (lcid);
|
||||
}
|
||||
|
||||
LCID LocaleCodeToLcidW (const std::wstring &localeCode)
|
||||
{
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
|
||||
try
|
||||
{
|
||||
BYTE buf [LOCALE_NAME_MAX_LENGTH * sizeof (WCHAR)] = {0};
|
||||
int res = GetLocaleInfoEx (localeCode.c_str (), LOCALE_RETURN_NUMBER | LOCALE_ILANGUAGE, (LPWSTR)buf, LOCALE_NAME_MAX_LENGTH);
|
||||
LCID lcid = *((LCID *)buf);
|
||||
return lcid;
|
||||
}
|
||||
catch (const std::exception &e) {}
|
||||
return LocaleNameToLCID (localeCode.c_str (), 0);
|
||||
#else
|
||||
return LocaleNameToLCID (localeCode.c_str (), 0);
|
||||
#endif
|
||||
}
|
||||
LCID LocaleCodeToLcidA (const std::string &localeCode)
|
||||
{
|
||||
std::wstring lcWide = StringToWString (std::string (localeCode));
|
||||
return LocaleCodeToLcidW (lcWide.c_str ());
|
||||
}
|
||||
LCID LocaleCodeToLcid (const std::wstring &loccode)
|
||||
{
|
||||
return LocaleCodeToLcidW (loccode.c_str ());
|
||||
}
|
||||
LCID LocaleCodeToLcid (const std::string &loccode)
|
||||
{
|
||||
return LocaleCodeToLcidA (loccode.c_str ());
|
||||
}
|
||||
|
||||
std::string GetLocaleRestrictedCodeA (LPCSTR lc)
|
||||
{
|
||||
return GetLocaleInfoA (LocaleCodeToLcidA (lc), 89);
|
||||
}
|
||||
std::string GetLocaleRestrictedCodeA (const std::string &lc)
|
||||
{
|
||||
return GetLocaleInfoA (LocaleCodeToLcidA (lc.c_str ()), 89);
|
||||
}
|
||||
std::wstring GetLocaleRestrictedCodeW (LPCWSTR lc)
|
||||
{
|
||||
return GetLocaleInfoW (LocaleCodeToLcidW (lc), 89);
|
||||
}
|
||||
std::wstring GetLocaleRestrictedCodeW (const std::wstring &lc)
|
||||
{
|
||||
return GetLocaleInfoW (LocaleCodeToLcidW (lc.c_str ()), 89);
|
||||
}
|
||||
std::wstring GetLocaleRestrictedCode (const std::wstring &lc) { return GetLocaleRestrictedCodeW (lc); }
|
||||
std::string GetLocaleRestrictedCode (const std::string &lc) { return GetLocaleRestrictedCodeA (lc); }
|
||||
|
||||
std::string GetLocaleElaboratedCodeA (LPCSTR lc)
|
||||
{
|
||||
return GetLocaleInfoA (LocaleCodeToLcidA (lc), 90);
|
||||
}
|
||||
std::string GetLocaleElaboratedCodeA (const std::string &lc)
|
||||
{
|
||||
return GetLocaleInfoA (LocaleCodeToLcidA (lc.c_str ()), 90);
|
||||
}
|
||||
std::wstring GetLocaleElaboratedCodeW (LPCWSTR lc)
|
||||
{
|
||||
return GetLocaleInfoW (LocaleCodeToLcidW (lc), 90);
|
||||
}
|
||||
std::wstring GetLocaleElaboratedCodeW (const std::wstring &lc)
|
||||
{
|
||||
return GetLocaleInfoW (LocaleCodeToLcidW (lc.c_str ()), 90);
|
||||
}
|
||||
std::wstring GetLocaleElaboratedCode (const std::wstring &lc) { return GetLocaleElaboratedCodeW (lc); }
|
||||
std::string GetLocaleElaboratedCode (const std::string &lc) { return GetLocaleElaboratedCodeA (lc); }
|
||||
|
||||
std::string LcidToLocaleCodeA (LCID lcid, char divide = '-')
|
||||
{
|
||||
return GetLocaleRestrictedCodeFromLcidA (lcid) + divide + GetLocaleElaboratedCodeFromLcidA (lcid);
|
||||
}
|
||||
std::wstring LcidToLocaleCodeW (LCID lcid, WCHAR divide = L'-')
|
||||
{
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
|
||||
try
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
LCIDToLocaleName (lcid, buf, LOCALE_NAME_MAX_LENGTH, 0);
|
||||
return buf;
|
||||
}
|
||||
catch (const std::exception &e) {}
|
||||
return GetLocaleRestrictedCodeFromLcidW (lcid) + divide + GetLocaleElaboratedCodeFromLcidW (lcid);
|
||||
#else
|
||||
return GetLocaleRestrictedCodeFromLcidW (lcid) + divide + GetLocaleElaboratedCodeFromLcidW (lcid);
|
||||
#endif
|
||||
}
|
||||
std::wstring LcidToLocaleCode (LCID lcid, WCHAR divide = L'-') { return LcidToLocaleCodeW (lcid, divide); }
|
||||
std::string LcidToLocaleCode (LCID lcid, char divide = '-') { return LcidToLocaleCodeA (lcid, divide); }
|
||||
|
||||
std::wstring GetUserDefaultLocaleName ()
|
||||
{
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
|
||||
try
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
GetUserDefaultLocaleName (buf, LOCALE_NAME_MAX_LENGTH);
|
||||
return buf;
|
||||
}
|
||||
catch (const std::exception &e) {}
|
||||
return LcidToLocaleCodeW (GetUserDefaultLCID ());
|
||||
#else
|
||||
return LcidToLocaleCodeW (GetUserDefaultLCID ());
|
||||
#endif
|
||||
}
|
||||
std::wstring GetSystemDefaultLocaleName ()
|
||||
{
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
|
||||
try
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
GetSystemDefaultLocaleName (buf, LOCALE_NAME_MAX_LENGTH);
|
||||
return buf;
|
||||
}
|
||||
catch (const std::exception &e) {}
|
||||
return LcidToLocaleCodeW (GetSystemDefaultLCID ());
|
||||
#else
|
||||
return LcidToLocaleCodeW (GetSystemDefaultLCID ());
|
||||
#endif
|
||||
}
|
||||
|
||||
std::wstring GetComputerLocaleCodeW ()
|
||||
{
|
||||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
LCID lcid = GetThreadLocale ();
|
||||
std::wstring tmp = LcidToLocaleCodeW (lcid);
|
||||
if (lcid && tmp.length () > 1) return tmp;
|
||||
}
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
GetUserDefaultLocaleName (buf, LOCALE_NAME_MAX_LENGTH);
|
||||
if (lstrlenW (buf)) return buf;
|
||||
}
|
||||
{
|
||||
WCHAR buf [LOCALE_NAME_MAX_LENGTH] = {0};
|
||||
GetSystemDefaultLocaleName (buf, LOCALE_NAME_MAX_LENGTH);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e) {}
|
||||
LCID lcid = GetThreadLocale ();
|
||||
if (!lcid) lcid = GetUserDefaultLCID ();
|
||||
if (!lcid) lcid = GetSystemDefaultLCID ();
|
||||
return LcidToLocaleCodeW (lcid);
|
||||
}
|
||||
#else
|
||||
{
|
||||
LCID lcid = GetThreadLocale ();
|
||||
if (!lcid) lcid = GetUserDefaultLCID ();
|
||||
if (!lcid) lcid = GetSystemDefaultLCID ();
|
||||
return LcidToLocaleCodeW (lcid);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
bool LocaleNameCompare (const std::wstring &left, const std::wstring &right)
|
||||
{
|
||||
return std::wnstring::equals (left, right) || LocaleCodeToLcidW (left) == LocaleCodeToLcidW (right);
|
||||
}
|
||||
+818
-86
File diff suppressed because it is too large
Load Diff
+31
-2
@@ -38,7 +38,7 @@ std::map <std::string, unsigned> g_nameToId = {
|
||||
MAKENAMEIDMAP (IDS_LAUNCHWHENREADY),
|
||||
MAKENAMEIDMAP (IDS_SUCCESS_TITLE),
|
||||
MAKENAMEIDMAP (IDS_SUCCESS_MTITLE),
|
||||
MAKENAMEIDMAP (IDS_FAILED_TITLE),
|
||||
MAKENAMEIDMAP (IDS_FAILED_MTITLE),
|
||||
MAKENAMEIDMAP (IDS_FAILED_REASONNAME),
|
||||
MAKENAMEIDMAP (IDS_SUCCESS_LAUNCH),
|
||||
MAKENAMEIDMAP (IDS_COMMAND_CANCEL),
|
||||
@@ -48,6 +48,35 @@ std::map <std::string, unsigned> g_nameToId = {
|
||||
MAKENAMEIDMAP (IDS_DEFAULTWIDTH),
|
||||
MAKENAMEIDMAP (IDS_DEFAULTHEIGHT),
|
||||
MAKENAMEIDMAP (IDS_MINWIDTH),
|
||||
MAKENAMEIDMAP (IDS_MINHIEHGT)
|
||||
MAKENAMEIDMAP (IDS_MINHIEHGT),
|
||||
MAKENAMEIDMAP (IDS_SPLASH_MLOAD),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_IDNAME),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_IDPUBLISHER),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_IDVERSION),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_IDFAMILY),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_IDFULL),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_IDARCH),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_PROPFREAMWORK),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_PROPRESPKG),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_PROPYES),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_PROPNO),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_INFOSYS),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_INFOSYS_VALUE),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_INFOLANG),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_ID),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_PROP),
|
||||
MAKENAMEIDMAP (IDS_MOREINFO_INFO),
|
||||
MAKENAMEIDMAP (IDS_CMDPARAM_HELP),
|
||||
MAKENAMEIDMAP (IDS_CMDTIP_PRETEXT),
|
||||
MAKENAMEIDMAP (IDS_DEFAULTWIDTH),
|
||||
MAKENAMEIDMAP (IDS_DEFAULTHEIGHT),
|
||||
MAKENAMEIDMAP (IDS_MINWIDTH),
|
||||
MAKENAMEIDMAP (IDS_MINHIEHGT),
|
||||
MAKENAMEIDMAP (IDS_INSTALLING_MLOADCER),
|
||||
MAKENAMEIDMAP (IDS_FAILED_MSUCCESS),
|
||||
MAKENAMEIDMAP (IDS_FAILED_STITLE)
|
||||
};
|
||||
|
||||
#ifdef MAKENAMEIDMAP
|
||||
#undef MAKENAMEIDMAP
|
||||
#endif
|
||||
Binary file not shown.
@@ -47,16 +47,14 @@ System::Drawing::Color GetDwmThemeColor ()
|
||||
BOOL opaqueBlend = FALSE;
|
||||
// 调用 DwmGetColorizationColor 获取 Aero 颜色
|
||||
HRESULT hr = DwmGetColorizationColor (&color, &opaqueBlend);
|
||||
if (SUCCEEDED (hr)) {
|
||||
if (SUCCEEDED (hr))
|
||||
{
|
||||
BYTE r = (BYTE)((color & 0x00FF0000) >> 16);
|
||||
BYTE g = (BYTE)((color & 0x0000FF00) >> 8);
|
||||
BYTE b = (BYTE)(color & 0x000000FF);
|
||||
return System::Drawing::Color::FromArgb (r, g, b);
|
||||
}
|
||||
else {
|
||||
// 如果获取失败,返回默认颜色
|
||||
return System::Drawing::Color::FromArgb (0, 120, 215);
|
||||
}
|
||||
else return System::Drawing::Color::FromArgb (0, 120, 215); // 如果获取失败,返回默认颜色
|
||||
}
|
||||
String ^ColorToHtml (System::Drawing::Color color)
|
||||
{
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdbool>
|
||||
#include <cstring>
|
||||
#include <cstdint>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <cstdint>
|
||||
#endif
|
||||
unsigned _wtou (const wchar_t *str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user