From a75ce08f5ea46237b73e5052a956829c0e272678 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Jun 2015 17:03:45 +0000 Subject: minus MS_UTILS_SAVEWINDOWPOSITION & MS_UTILS_RESTOREWINDOWPOSITION git-svn-id: http://svn.miranda-ng.org/main/trunk@14238 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/RecentContacts/src/RecentContacts.cpp | 36 ++++++++------------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'plugins/RecentContacts/src') diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index dc8ac0b113..1e8a7ef15f 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -291,20 +291,12 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM wp.flags = 0; SetWindowPlacement(hDlg, &wp); - } else { - restorePos = true; } + else restorePos = true; } - if (restorePos) { - SAVEWINDOWPOS pos; - pos.hContact = NULL; - pos.hwnd = hDlg; - pos.szModule = dbLastUC_ModuleName; - pos.szNamePrefix = dbLastUC_WindowPosPrefix; - - CallService(MS_UTILS_RESTOREWINDOWPOSITION, 0, (LPARAM)&pos); - } + if (restorePos) + Utils_RestoreWindowPosition(hDlg, NULL, dbLastUC_ModuleName, dbLastUC_WindowPosPrefix); SendMessage(hDlg, WM_SIZE, 0, 0); WindowList_Add(hWindowList, hDlg, NULL); @@ -385,20 +377,14 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM break; case WM_DESTROY: - { - // Save current window position. - SAVEWINDOWPOS pos; - pos.hContact = NULL; - pos.hwnd = hDlg; - pos.szModule = dbLastUC_ModuleName; - pos.szNamePrefix = dbLastUC_WindowPosPrefix; - CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, (LPARAM)&pos); - delete DlgDat->Contacts; - delete DlgDat; - // Remove entry from Window list - WindowList_Remove(hWindowList, hDlg); - break; - } + Utils_SaveWindowPosition(hDlg, NULL, dbLastUC_ModuleName, dbLastUC_WindowPosPrefix); + + delete DlgDat->Contacts; + delete DlgDat; + + // Remove entry from Window list + WindowList_Remove(hWindowList, hDlg); + break; } return FALSE; } -- cgit v1.2.3