From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/XSoundNotify/src/Common.h | 4 ++-- plugins/XSoundNotify/src/dialog.cpp | 16 ++++++++-------- plugins/XSoundNotify/src/options.cpp | 12 ++++++------ plugins/XSoundNotify/src/xsn_main.cpp | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'plugins/XSoundNotify') diff --git a/plugins/XSoundNotify/src/Common.h b/plugins/XSoundNotify/src/Common.h index c71dd34a4a..106022b842 100644 --- a/plugins/XSoundNotify/src/Common.h +++ b/plugins/XSoundNotify/src/Common.h @@ -23,11 +23,11 @@ struct XSN_Data { - HANDLE hContact; + HCONTACT hContact; TCHAR path[MAX_PATH]; BYTE ignore; - __forceinline XSN_Data(HANDLE _aContact, TCHAR *_path, BYTE _ignore) : + __forceinline XSN_Data(HCONTACT _aContact, TCHAR *_path, BYTE _ignore) : hContact(_aContact) { _tcsncpy(path, _path, SIZEOF(path)); diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 84b5602a20..ec114a71b2 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -15,7 +15,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case WM_INITDIALOG: { TranslateDialogDefault(hwndDlg); - HANDLE hContact = (HANDLE)lParam; + HCONTACT hContact = (HCONTACT)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); WindowList_Add(hChangeSoundDlgList, hwndDlg, hContact); Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg"); @@ -77,7 +77,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP switch (LOWORD(wParam)) { case IDOK: { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p != NULL) { if (lstrcmpi(p->path, _T(""))) { @@ -116,7 +116,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP ofn.lpstrDefExt = _T(""); if (GetOpenFileName(&ofn)) { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(FileName)); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p == NULL) @@ -134,7 +134,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_TEST_PLAY: { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); isIgnoreSound = 0; if (p == NULL) { @@ -156,7 +156,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_RESET_SOUND: { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_TEST_PLAY), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_RESET_SOUND), FALSE); CheckDlgButton(hwndDlg, IDC_CONT_IGNORE_SOUND, BST_UNCHECKED); @@ -173,7 +173,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_IGNORE_SOUND: { - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p == NULL) { DBVARIANT dbv; @@ -195,7 +195,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP break; case WM_DESTROY: - HANDLE hContact = (HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); Utils_SaveWindowPosition(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg"); WindowList_Remove(hChangeSoundDlgList, hwndDlg); } @@ -204,7 +204,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) { - HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (HANDLE)wParam); + HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (HCONTACT)wParam); if (!hChangeSoundDlg) { hChangeSoundDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONTACTS), 0, DlgProcContactsOptions, (LPARAM)wParam); ShowWindow(hChangeSoundDlg, SW_SHOW); diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index 339bb93342..c7d98bc589 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -50,7 +50,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETCURSEL, 0, 0); PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETITEMDATA, cursel, 0); - for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { char* szUniqueId = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); if ((INT_PTR) szUniqueId != CALLSERVICE_NOTFOUND && szUniqueId != NULL) { DBVARIANT dbvuid = {0}; @@ -85,7 +85,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_COMBO_USERS: if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == LBN_SELCHANGE)) { int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0); - HANDLE hContact = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); + HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_CHOOSE_SOUND), TRUE); DBVARIANT dbv = {0}; if ( !db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) @@ -129,7 +129,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (GetOpenFileName(&ofn)) { SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(FileName)); int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0); - HANDLE hContact = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); + HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p == NULL) XSN_Users.insert( new XSN_Data(hContact, FileName, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0)); @@ -149,7 +149,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_BUTTON_TEST_PLAY: { int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0); - HANDLE hContact = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); + HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); isIgnoreSound = 0; if (p == NULL) { @@ -176,7 +176,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l CheckDlgButton(hwndDlg, IDC_OPT_IGNORE_SOUND, BST_UNCHECKED); SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, TranslateT("Not set")); int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0); - HANDLE hContact = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); + HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p != NULL) { XSN_Users.remove(p); @@ -191,7 +191,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_IGNORE_SOUND: { int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0); - HANDLE hContact = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); + HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p == NULL) { DBVARIANT dbv; diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 6f63acaa3b..a567a8d580 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -113,9 +113,9 @@ static int ProcessEvent(WPARAM wParam, LPARAM lParam) if (!isReceiveMessage(HANDLE(lParam))) return 0; - isIgnoreSound = db_get_b((HANDLE)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0); + isIgnoreSound = db_get_b((HCONTACT)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0); DBVARIANT dbv; - if ( !isIgnoreSound && !db_get_ts((HANDLE)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) { + if ( !isIgnoreSound && !db_get_ts((HCONTACT)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) { TCHAR PlaySoundPath[MAX_PATH] = {0}; PathToAbsoluteT(dbv.ptszVal, PlaySoundPath); SkinPlaySoundFile(PlaySoundPath); @@ -154,7 +154,7 @@ static int OnLoadInit(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (hContact) { char* szProto = GetContactProto(hContact); PROTOACCOUNT *pa = ProtoGetAccount(szProto); -- cgit v1.2.3