@@ -32,13 +32,11 @@ END_MESSAGE_MAP()
3232// CColorCopApp construction
3333
3434
35- CColorCopApp::CColorCopApp()
36- {
35+ CColorCopApp::CColorCopApp() {
3736 m_hMutex = nullptr ;
3837}
3938
40- CColorCopApp::~CColorCopApp ()
41- {
39+ CColorCopApp::~CColorCopApp () {
4240 if (m_hMutex != nullptr )
4341 {
4442 CloseHandle (m_hMutex);
@@ -53,8 +51,7 @@ CColorCopApp theApp;
5351// ///////////////////////////////////////////////////////////////////////////
5452// CColorCopApp initialization
5553
56- BOOL CColorCopApp::InitInstance ()
57- {
54+ BOOL CColorCopApp::InitInstance () {
5855 // multiple instances are not allowed?
5956 if (!(dlg.m_Appflags & MultipleInstances))
6057 {
@@ -82,14 +79,11 @@ BOOL CColorCopApp::InitInstance()
8279}
8380
8481// uses a Mutex to figure out if there is an instance of color cop running
85- bool CColorCopApp::InstanceRunning ()
86- {
82+ bool CColorCopApp::InstanceRunning () {
8783 m_hMutex = CreateMutex (NULL , true , _T (" ColorCop_Mutex" ));
8884
89- if (m_hMutex)
90- {
91- if (GetLastError () == ERROR_ALREADY_EXISTS)
92- {
85+ if (m_hMutex) {
86+ if (GetLastError () == ERROR_ALREADY_EXISTS) {
9387 CloseHandle (m_hMutex); // Close the duplicate handle
9488 return true ;
9589 }
@@ -99,8 +93,7 @@ bool CColorCopApp::InstanceRunning()
9993 return false ;
10094}
10195
102- BOOL CColorCopApp::GetShellFolderPath (char * pShellFolder, char * pShellPath)
103- {
96+ BOOL CColorCopApp::GetShellFolderPath (char * pShellFolder, char * pShellPath) {
10497 // pShellFolder can be one of the following
10598 // AppData, Cache, Cookies, Desktop, Favorites, Fonts, History, NetHood,
10699 // Personal, Printhood, Programs, Recent, SendTo, Start Menu, Startup,
@@ -127,8 +120,7 @@ BOOL CColorCopApp::GetShellFolderPath(char* pShellFolder, char* pShellPath)
127120 }
128121}
129122
130- CString CColorCopApp::GetTempFolder ()
131- {
123+ CString CColorCopApp::GetTempFolder () {
132124 CString strTmpPath;
133125
134126 GetShellFolderPath (" AppData" , strTmpPath.GetBuffer (MAX_PATH));
@@ -137,17 +129,15 @@ CString CColorCopApp::GetTempFolder()
137129 return strTmpPath;
138130}
139131
140- void CColorCopApp::ClipOrCenterWindowToMonitor (HWND hwnd, UINT flags)
141- {
132+ void CColorCopApp::ClipOrCenterWindowToMonitor (HWND hwnd, UINT flags) {
142133 RECT rc;
143134 GetWindowRect (hwnd, &rc);
144135 SetWindowPos (hwnd, NULL , rc.left , rc.top , 0 , 0 , SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
145136 dlg.WinLocX = rc.left ;
146137 dlg.WinLocY = rc.top ;
147138}
148139
149- BOOL CColorCopApp::InitApplication ()
150- {
140+ BOOL CColorCopApp::InitApplication () {
151141 CString strInitFile = GetTempFolder ();
152142
153143 strInitFile += INI_FILE_DIR;
@@ -233,8 +223,7 @@ void CColorCopApp::CloseApplication() {
233223 return ;
234224}
235225
236- void CColorCopApp::Serialize (CArchive& ar)
237- {
226+ void CColorCopApp::Serialize (CArchive& ar) {
238227 if (ar.IsStoring ()) {
239228 // storing code
240229 try {
0 commit comments