Load all default settings. Called when no valid .DAT file exists
| 207 | |
| 208 | // Load all default settings. Called when no valid .DAT file exists |
| 209 | void CColorCopApp::LoadDefaultSettings() { |
| 210 | const COLORREF seed = kDefaultSeedColor; |
| 211 | |
| 212 | // extract RGB components from the seed color in order to set the initial color values |
| 213 | dlg.m_Reddec = static_cast<int>(seed & 0xFF); |
| 214 | dlg.m_Greendec = static_cast<int>((seed >> 8) & 0xFF); |
| 215 | dlg.m_Bluedec = static_cast<int>((seed >> 16) & 0xFF); |
| 216 | |
| 217 | dlg.m_Appflags = AlwaysOnTop | AutoCopytoClip | ModeHTML | EasyMove | |
| 218 | Sampling1 | ExpandedDialog | MultipleInstances | |
| 219 | MAGWHILEEYEDROP | SpaceRGB; |
| 220 | |
| 221 | // Window defaults |
| 222 | dlg.WinLocX = kDefaultWinLocX; |
| 223 | dlg.WinLocY = kDefaultWinLocY; |
| 224 | dlg.m_iSamplingOffset = kDefaultSamplingOffset; |
| 225 | |
| 226 | // Custom colors |
| 227 | for (int i = 0; i < kCustomColorCount; ++i) |
| 228 | dlg.CustColorBank[i] = kDefaultCustomColor; |
| 229 | |
| 230 | // History colors |
| 231 | for (int i = 0; i < kHistoryCount; ++i) |
| 232 | dlg.ColorHistory[i] = kDefaultColorHistory[i]; |
| 233 | } |
| 234 | |
| 235 | void CColorCopApp::CloseApplication() { |
| 236 | CString settingsFolder = GetSettingsFolder(); |
nothing calls this directly
no outgoing calls
no test coverage detected