From 47c19f7007a24ccf7e4be993255e36baff65b4ca Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sat, 13 Dec 2014 22:20:52 +0000 Subject: SendMessage(GetDlgItem -> SendDlgItemMessage 2 git-svn-id: http://svn.miranda-ng.org/main/trunk@11384 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_dialogs.cpp | 10 +++++----- protocols/Yahoo/src/options.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols') diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp index 83c4178b63..bf31e03846 100644 --- a/protocols/Steam/src/steam_dialogs.cpp +++ b/protocols/Steam/src/steam_dialogs.cpp @@ -276,7 +276,7 @@ LRESULT CALLBACK CSteamProto::BlockListOptionsSubProc(HWND hwnd, UINT msg, WPARA ListView_DeleteItem(hwnd, lvi.iItem); - int nItem = SendMessage(::GetDlgItem(GetParent(hwnd), IDC_CONTACTS), CB_ADDSTRING, 0, (LPARAM)sid); + int nItem = ::SendDlgItemMessage(GetParent(hwnd), IDC_CONTACTS, CB_ADDSTRING, 0, (LPARAM)sid); SendDlgItemMessage(GetParent(hwnd), IDC_CONTACTS, CB_SETITEMDATA, nItem, hContact); }*/ } @@ -374,8 +374,8 @@ INT_PTR CALLBACK CSteamProto::BlockListOptionsProc(HWND hwndDlg, UINT msg, WPARA ppro->GetContact((char *)_T2A(sid), contact); if (!contacts.contains(contact)) { - nItem = ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_ADDSTRING, 0, (LPARAM)sid); - ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_SETITEMDATA, nItem, hContact); + nItem = ::SendDlgItemMessage(hwndDlg, IDC_CONTACTS, CB_ADDSTRING, 0, (LPARAM)sid); + ::SendDlgItemMessage(hwndDlg, IDC_CONTACTS, CB_SETITEMDATA, nItem, hContact); } } @@ -395,7 +395,7 @@ INT_PTR CALLBACK CSteamProto::BlockListOptionsProc(HWND hwndDlg, UINT msg, WPARA case IDC_BLOCK: { - int i = ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETCURSEL, 0, 0); + int i = ::SendDlgItemMessage(hwndDlg, IDC_CONTACTS, CB_GETCURSEL, 0, 0); MCONTACT hContact = (MCONTACT)::SendDlgItemMessage(hwndDlg, IDC_CONTACTS, CB_GETITEMDATA, i, 0); if (!hContact) @@ -441,7 +441,7 @@ INT_PTR CALLBACK CSteamProto::BlockListOptionsProc(HWND hwndDlg, UINT msg, WPARA lvi.iImage = 1; ListView_SetItem(::GetDlgItem(hwndDlg, IDC_LIST), &lvi); } - ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_DELETESTRING, i, 0); + ::SendDlgItemMessage(hwndDlg, IDC_CONTACTS, CB_DELETESTRING, i, 0); }*/ } break; diff --git a/protocols/Yahoo/src/options.cpp b/protocols/Yahoo/src/options.cpp index fecb7a631d..6055169b74 100644 --- a/protocols/Yahoo/src/options.cpp +++ b/protocols/Yahoo/src/options.cpp @@ -277,7 +277,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wP struct yahoo_buddy *b = (struct yahoo_buddy *) l->data; LOG(("[DlgProcYahooOptsIgnore] Buddy: %s", b->id )) - SendMessageA(GetDlgItem(hwndDlg,IDC_YIGN_LIST), LB_ADDSTRING, 0, (LPARAM)b->id); + SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_ADDSTRING, 0, (LPARAM)b->id); l = l->next; } LOG(("[DlgProcYahooOptsIgnore] End of Ignore List...")) @@ -316,7 +316,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wP break; } ppro->IgnoreBuddy(id, 0); - SendMessageA(GetDlgItem(hwndDlg,IDC_YIGN_LIST), LB_ADDSTRING, 0, (LPARAM)id); + SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_ADDSTRING, 0, (LPARAM)id); SetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, ""); } break; @@ -337,7 +337,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wP break; } - SendMessageA(GetDlgItem(hwndDlg,IDC_YIGN_LIST), LB_GETTEXT, i, (LPARAM)id); + SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_GETTEXT, i, (LPARAM)id); ppro->IgnoreBuddy(id, 1); SendDlgItemMessage(hwndDlg,IDC_YIGN_LIST, LB_DELETESTRING, i, 0); -- cgit v1.2.3