浏览代码

SysColorWindow + SysColorBtnFace + SysColorWindowText counters

Source commit: bfebf9b8f6dc6746e2abf085514ad39e9784107d
Martin Prikryl 10 年之前
父节点
当前提交
1bec209e30
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      source/windows/WinMain.cpp

+ 14 - 0
source/windows/WinMain.cpp

@@ -312,6 +312,16 @@ void __fastcall RecordWrapperVersions(UnicodeString ConsoleVersion, UnicodeStrin
   }
   }
 }
 }
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
+static UnicodeString ColorToRGBStr(TColor Color)
+{
+  int RGB = ColorToRGB(Color);
+  int R = GetRValue(RGB);
+  int G = GetGValue(RGB);
+  int B = GetBValue(RGB);
+  UnicodeString Result = FORMAT(L"%.2x%.2x%.2x", (R, G, B));
+  return Result;
+}
+//---------------------------------------------------------------------------
 void __fastcall UpdateStaticUsage()
 void __fastcall UpdateStaticUsage()
 {
 {
   Configuration->Usage->Inc(L"Runs");
   Configuration->Usage->Inc(L"Runs");
@@ -398,6 +408,10 @@ void __fastcall UpdateStaticUsage()
   Configuration->Usage->Set(L"ThemeDefaultFontSize", Application->DefaultFont->Size);
   Configuration->Usage->Set(L"ThemeDefaultFontSize", Application->DefaultFont->Size);
   Configuration->Usage->Set(L"ThemeIconFontSize", Screen->IconFont->Size);
   Configuration->Usage->Set(L"ThemeIconFontSize", Screen->IconFont->Size);
 
 
+  Configuration->Usage->Set(L"SysColorWindow", ColorToRGBStr(clWindow));
+  Configuration->Usage->Set(L"SysColorBtnFace", ColorToRGBStr(clBtnFace));
+  Configuration->Usage->Set(L"SysColorWindowText", ColorToRGBStr(clWindowText));
+
   UnicodeString ProgramsFolder;
   UnicodeString ProgramsFolder;
   ::SpecialFolderLocation(CSIDL_PROGRAM_FILES, ProgramsFolder);
   ::SpecialFolderLocation(CSIDL_PROGRAM_FILES, ProgramsFolder);
   ProgramsFolder = IncludeTrailingBackslash(ExpandFileName(ProgramsFolder));
   ProgramsFolder = IncludeTrailingBackslash(ExpandFileName(ProgramsFolder));