| 27 | } |
| 28 | |
| 29 | COLORREF IniFile::ReadColor(PCWSTR section, PCWSTR name, COLORREF defaultValue) { |
| 30 | auto text = ReadString(section, name); |
| 31 | if (text.IsEmpty()) |
| 32 | return defaultValue; |
| 33 | |
| 34 | if (text.Left(2) == L"0x") |
| 35 | return ParseHexColor(text.Mid(2)); |
| 36 | |
| 37 | if (text.Find(L',')) |
| 38 | return ParseDecColor(text); |
| 39 | |
| 40 | return ParseHexColor(text); |
| 41 | } |
| 42 | |
| 43 | COLORREF IniFile::ParseHexColor(const CString& hex) { |
| 44 | std::wstringstream ss; |
no test coverage detected