diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-14 05:46:09 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-14 05:46:09 +0000 |
commit | b0e15a2d768b04ad5a5bb1c591c6b043469baeb5 (patch) | |
tree | 380ae36ef460ec5e9fe17b9736d0aa3514f911af /plugins | |
parent | bc7df32e3b5a264c0eeb6a20b723cdab02cf7688 (diff) |
SendMessage(.... WM_SETTEXT...) -> SetWindowText(...)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11392 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 2 | ||||
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/text_operations.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 2 | ||||
-rw-r--r-- | plugins/MirOTR/MirOTR/src/dialogs.cpp | 8 | ||||
-rw-r--r-- | plugins/MyDetails/src/services.cpp | 6 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/notes.cpp | 6 | ||||
-rw-r--r-- | plugins/QuickContacts/src/quickcontacts.cpp | 4 | ||||
-rw-r--r-- | plugins/SMS/src/recvdlg.cpp | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/history.cpp | 2 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/msgbox.cpp | 2 | ||||
-rw-r--r-- | plugins/TranslitSwitcher/src/Layoutproc.cpp | 12 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_contact.cpp | 4 | ||||
-rw-r--r-- | plugins/YAMN/src/browser/mailbrowser.cpp | 6 |
13 files changed, 29 insertions, 29 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 064830e4f0..76b5bd3c9a 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1401,7 +1401,7 @@ void SetFontFromOptions(ITextFont *TextFont, int caps, Options::Fonts fontId) void HistoryWindow::SelectEventGroup(int sel)
{
- SendMessage(editWindow, WM_SETTEXT, 0, (LPARAM)_T(""));
+ SetWindowText(editWindow, _T(""));
currentGroup.clear();
selected = sel;
if (sel < 0 || sel >= (int)eventList.size())
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index e0748b3741..c5e7a2d6f6 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -523,7 +523,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) GetWindowText(hTextWnd, ptszTemp, MaxTextSize);
for (i = crTemp.cpMin; i < crTemp.cpMax; i++)
ptszTemp[i] = ptszOutText[i - crTemp.cpMin];
- SendMessage(hTextWnd, WM_SETTEXT, 0, (LPARAM)ptszTemp);
+ SetWindowText(hTextWnd, ptszTemp);
SendMessage(hTextWnd, EM_SETSEL, crSelection.cpMin, crSelection.cpMax);
mir_free(ptszTemp);
}
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index a03ec9a2d6..87ea56c2a6 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -229,7 +229,7 @@ void CluiProtocolStatusChanged(int, const char*) if (szStatus && pcli->hwndContactList) {
HWND hwndClistBtn = GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS);
if (IsWindow(hwndClistBtn)) {
- SendMessage(hwndClistBtn, WM_SETTEXT, 0, (LPARAM)szStatus);
+ SetWindowText(hwndClistBtn, szStatus);
if (!hIcon)
SendMessage(hwndClistBtn, BUTTONSETIMLICON, (WPARAM)hCListImages, (LPARAM)iIcon);
else
diff --git a/plugins/MirOTR/MirOTR/src/dialogs.cpp b/plugins/MirOTR/MirOTR/src/dialogs.cpp index e493869af3..2067ce64e4 100644 --- a/plugins/MirOTR/MirOTR/src/dialogs.cpp +++ b/plugins/MirOTR/MirOTR/src/dialogs.cpp @@ -36,7 +36,7 @@ INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TCHAR title[512], *proto = mir_a2t(contact_get_proto((MCONTACT)context->app_data));
const TCHAR *name =contact_get_nameT((MCONTACT)context->app_data);
mir_sntprintf(title, SIZEOF(title), TranslateT(LANG_SMP_PROGRESS_TITLE), name, proto);
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)title);
+ SetWindowText(hwndDlg, title);
mir_sntprintf(title, SIZEOF(title), TranslateT(LANG_SMP_PROGRESS_DESC), name, proto);
mir_free(proto);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEADPRO, title);
@@ -171,7 +171,7 @@ INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TCHAR buff[512], *proto = mir_a2t(contact_get_proto((MCONTACT)context->app_data));
mir_sntprintf(buff, SIZEOF(buff), TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT((MCONTACT)context->app_data), proto);
mir_free(proto);
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)buff);
+ SetWindowText(hwndDlg, buff);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, buff);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)context);
@@ -318,7 +318,7 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TCHAR title[512], *proto = mir_a2t(contact_get_proto((MCONTACT)context->app_data));
mir_sntprintf(title, SIZEOF(title), TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT((MCONTACT)context->app_data), proto);
mir_free(proto);
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)title);
+ SetWindowText(hwndDlg, title);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, title);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
@@ -617,7 +617,7 @@ INT_PTR CALLBACK DlgProcVerifyContext(HWND hwndDlg, UINT msg, WPARAM wParam, LPA EndDialog(hwndDlg, IDCANCEL);
return FALSE;
}
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)_T(LANG_OTR_FPVERIFY_TITLE));
+ SetWindowText(hwndDlg, _T(LANG_OTR_FPVERIFY_TITLE));
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, _T(LANG_OTR_FPVERIFY_TITLE));
TranslateDialogDefault( hwndDlg );
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp index a8ea0b9e70..c5a1798889 100644 --- a/plugins/MyDetails/src/services.cpp +++ b/plugins/MyDetails/src/services.cpp @@ -72,7 +72,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam TCHAR tmp[128];
mir_sntprintf(tmp, SIZEOF(tmp), TranslateT("Set my nickname for %s"), proto->description);
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)tmp);
+ SetWindowText(hwndDlg, tmp);
HICON hIcon = (HICON)CallProtoService(proto->name, PS_LOADICON, PLI_PROTOCOL, 0);
if (hIcon != NULL) {
@@ -341,7 +341,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w TCHAR title[256];
mir_sntprintf(title, SIZEOF(title), TranslateT("Set my status message for %s"), proto->description);
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)title);
+ SetWindowText(hwndDlg, title);
SetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, proto->GetStatusMsg());
}
@@ -351,7 +351,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w TCHAR title[256];
mir_sntprintf(title, SIZEOF(title), TranslateT("Set my status message for %s"),
CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, data->status, GSMDF_TCHAR));
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)title);
+ SetWindowText(hwndDlg, title);
SetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, protocols->GetDefaultStatusMsg(data->status));
}
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 0cdca7e1aa..1f8ec9d354 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1149,7 +1149,7 @@ static void SetNoteTextControl(STICKYNOTE *SN) SendMessage(SN->REHwnd, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&CF); if (SN->data) // TODO: use EM_STREAMIN - SendMessage(SN->REHwnd, WM_SETTEXT, 0, (LPARAM)(SN->data)); + SetWindowText(SN->REHwnd, SN->data); } @@ -1569,7 +1569,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l } // clear text first to force a reformatting w.r.t scrollbar - SendMessage(H, WM_SETTEXT, 0, (LPARAM)""); + SetWindowText(H, ""); SendMessage(H, WM_SETFONT, (WPARAM)(SN->pCustomFont ? SN->pCustomFont->hFont : hBodyFont), FALSE); SetNoteTextControl(SN); RedrawWindow(SN->SNHwnd, NULL, NULL, RDW_INVALIDATE|RDW_FRAME|RDW_UPDATENOW); @@ -1606,7 +1606,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l SN->pCustomFont = NULL; // clear text first to force a reformatting w.r.t scrollbar - SendMessage(H, WM_SETTEXT, 0, (LPARAM)""); + SetWindowText(H, ""); SendMessage(H, WM_SETFONT, (WPARAM)hBodyFont, FALSE); SetNoteTextControl(SN); RedrawWindow(SN->SNHwnd, NULL, NULL, RDW_INVALIDATE|RDW_FRAME|RDW_UPDATENOW); diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index f06157b8e5..2ae6d2011b 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -499,8 +499,8 @@ int CheckText(HWND hdlg, TCHAR *sztext, BOOL only_enable = FALSE) {
if (lstreq(sztext, GetListName(contacts[loop]), len) == 0)
{
- SendMessage(hdlg, WM_SETTEXT, 0, (LPARAM) GetListName(contacts[loop]));
- SendMessage(hdlg, EM_SETSEL, (WPARAM) len, (LPARAM) -1);
+ SetWindowText(hdlg, GetListName(contacts[loop]));
+ SendMessage(hdlg, EM_SETSEL, (WPARAM) len, (LPARAM)-1);
EnableButtons(hwndMain, contacts[loop]->hcontact);
return 0;
}
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp index d2aba654f3..5a02b133bf 100644 --- a/plugins/SMS/src/recvdlg.cpp +++ b/plugins/SMS/src/recvdlg.cpp @@ -223,7 +223,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,size mir_sntprintf(wszTitle,SIZEOF(wszTitle),_T("%s - %s"),lpwszContactDisplayName,lpwszTitlepart);
MultiByteToWideChar(CP_UTF8,0,lpszMessage,dwMessageSize,lpwszMessage,(dwMessageSize+MAX_PATH));
- SendMessageW(prswdWindowData->hWnd,WM_SETTEXT,NULL,(LPARAM)wszTitle);
+ SetWindowText(prswdWindowData->hWnd, wszTitle);
SetDlgItemText(prswdWindowData->hWnd,IDC_NAME,lpwszContactDisplayName);
SetDlgItemText(prswdWindowData->hWnd,IDC_NUMBER,wszPhoneLocal);
SetDlgItemText(prswdWindowData->hWnd,IDC_MESSAGE,lpwszMessage);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index ef9965434a..18010ebab2 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -172,7 +172,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA mir_sntprintf(sztemp, SIZEOF(sztemp), _T("%s: %s"),
CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR),
TranslateT("last seen history"));
- SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)sztemp);
+ SetWindowText(hwndDlg, sztemp);
SendMessage(hwndDlg, WM_SETICON, (WPARAM) ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
SendMessage(hwndDlg, WM_SETICON, (WPARAM) ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 4b265fa354..ca7ef4f2b0 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -440,7 +440,7 @@ VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control) break; case IDM_DELETE: - SendMessage(edit_control, WM_SETTEXT, 0, (LPARAM)""); + SetWindowText(edit_control, _T("")); SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_EDIT1, EN_CHANGE), (LPARAM)edit_control); break; diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index 835b1c8063..0fd8c18a3d 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -495,7 +495,7 @@ void SwitchLayout(bool lastword) if (somethingIsSelected)
SendMessage(hwnd2, EM_REPLACESEL, false, (LPARAM)sel);
else
- SendMessage(hwnd2, WM_SETTEXT, 0, (LPARAM)sel);
+ SetWindowText(hwnd2, sel);
SendMessage(hwnd2, EM_SETSEL, (WPARAM)dwStart, (LPARAM)dwEnd);
}
@@ -560,7 +560,7 @@ void TranslitLayout(bool lastword) _tcsncat(NewText, sel, start);
_tcscat(NewText, boo);
_tcsncat(NewText, sel + end, slen - end);
- SendMessage(hwnd2, WM_SETTEXT, 0, (LPARAM)NewText);
+ SetWindowText(hwnd2, NewText);
mir_free(NewText);
}
@@ -628,7 +628,7 @@ void InvertCase(bool lastword) _tcsncat(NewText, sel, start);
_tcscat(NewText, boo);
_tcsncat(NewText, sel + end, slen - end);
- SendMessage(hwnd2, WM_SETTEXT, 0, (LPARAM)NewText);
+ SetWindowText(hwnd2, NewText);
mir_free(NewText);
}
@@ -707,18 +707,18 @@ int OnButtonPressed(WPARAM, LPARAM lParam) ptrT tszSymbol(db_get_tsa(NULL, "TranslitSwitcher", "ResendSymbol"));
if (tszSymbol == NULL) {
- SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)sel);
+ SetWindowText(hEdit, sel);
SendMessage(hEdit, EM_SETSEL, 0, (LPARAM)slen);
SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
}
else if (_tcsncmp(sel, tszSymbol, _tcslen(tszSymbol)) == 0) {
- SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)sel);
+ SetWindowText(hEdit, sel);
SendMessage(hEdit, EM_SETSEL, 0, (LPARAM)slen);
SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
}
else {
CMString tszFinal(FORMAT, _T("%s %s"), tszSymbol, sel);
- SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM)tszFinal.GetString());
+ SetWindowText(hEdit, tszFinal.GetString());
SendMessage(hEdit, EM_SETSEL, 0, tszFinal.GetLength());
SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
}
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 5be6d0aec0..14825a6820 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -578,11 +578,11 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L {
HICON hIcon = Skin_GetIcon(ICO_BTN_ADD);
SendMessage(cbex->hBtnAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SendMessage(cbex->hBtnAdd, WM_SETTEXT, NULL, (LPARAM)(hIcon ? _T("") : _T("+")));
+ SetWindowText(cbex->hBtnAdd, (hIcon ? _T("") : _T("+")));
hIcon = Skin_GetIcon(ICO_BTN_DELETE);
SendMessage(cbex->hBtnDel, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SendMessage(cbex->hBtnDel, WM_SETTEXT, NULL, (LPARAM)(hIcon ? _T("") : _T("-")));
+ SetWindowText(cbex->hBtnDel, (hIcon ? _T("") : _T("-")));
if (cbex->pItems && cbex->numItems > 0) {
for (int i = 0; i < cbex->numItems; i++)
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index 874e3e0dcd..09e51d0d12 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -413,7 +413,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags) mir_snprintf(TitleStrA, len, Translate(MAILBROWSERTITLE), ActualAccount->Name, MN.Real.DisplayUC + MN.Virtual.DisplayUC, MN.Real.Display + MN.Virtual.Display); MultiByteToWideChar(CP_ACP,MB_USEGLYPHCHARS,TitleStrA,-1,TitleStrW,(int)strlen(TitleStrA)+1); - SendMessageW(hDlg,WM_SETTEXT,0,(LPARAM)TitleStrW); + SetWindowTextW(hDlg, TitleStrW); delete[] TitleStrA; delete[] TitleStrW; } @@ -1455,7 +1455,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM } } if (!bodyDecoded)ConvertStringToUnicode(localBody?localBody:body,MailParam->mail->MailData->CP,&bodyDecoded); - SendMessageW(hEdit,WM_SETTEXT,0,(LPARAM)bodyDecoded); + SetWindowTextW(hEdit, bodyDecoded); delete[] bodyDecoded; if (localBody) delete[] localBody; SetFocus(hEdit); @@ -1489,7 +1489,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM _tcsncpy_s(title, size, L"none", _TRUNCATE); if (Subj) delete[] Subj; if (From) delete[] From; - SendMessageW(hDlg,WM_SETTEXT,0,(LPARAM)title); + SetWindowTextW(hDlg, title); delete[] title; // turn on redrawing SendMessage(hListView, WM_SETREDRAW, 1, 0); |