From bc7df32e3b5a264c0eeb6a20b723cdab02cf7688 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sun, 14 Dec 2014 05:13:25 +0000 Subject: SetWindowText(GetDlgItem(...)) -> SetDlgItemText(...) git-svn-id: http://svn.miranda-ng.org/main/trunk@11391 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/src/commandmonitor.cpp | 4 ++-- protocols/IRCG/src/input.cpp | 6 +++--- protocols/IRCG/src/ircproto.cpp | 4 ++-- protocols/IRCG/src/options.cpp | 6 +++--- protocols/IRCG/src/services.cpp | 6 +++--- protocols/IRCG/src/windows.cpp | 8 ++++---- protocols/JabberG/src/jabber_adhoc.cpp | 2 +- protocols/JabberG/src/jabber_console.cpp | 2 +- protocols/JabberG/src/jabber_privacy.cpp | 2 +- protocols/SkypeClassic/src/skypeopt.cpp | 16 ++++++++-------- 10 files changed, 28 insertions(+), 28 deletions(-) (limited to 'protocols') diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 8d32bd2949..6de7c3984b 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -1801,8 +1801,8 @@ static void __stdcall sttShowNickWnd(void* param) ppro->m_nickDlg->Show(); } SetEvent(ppro->m_evWndCreate); - SetWindowText(GetDlgItem(ppro->m_nickDlg->GetHwnd(), IDC_CAPTION), TranslateT("Change nickname")); - SetWindowText(GetDlgItem(ppro->m_nickDlg->GetHwnd(), IDC_TEXT), pmsg->parameters.getCount() > 2 ? pmsg->parameters[2].c_str() : _T("")); + SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_CAPTION, TranslateT("Change nickname")); + SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_TEXT, pmsg->parameters.getCount() > 2 ? pmsg->parameters[2].c_str() : _T("")); ppro->m_nickDlg->m_Enick.SetText(pmsg->parameters[1].c_str()); ppro->m_nickDlg->m_Enick.SendMsg(CB_SETEDITSEL, 0, MAKELPARAM(0, -1)); delete pmsg; diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index 9c66bffb8e..23ee8d4b55 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -777,12 +777,12 @@ static void __stdcall DoInputRequestAliasApcStub(void* _par) SetDlgItemText(question_hWnd, IDC_CAPTION, TranslateT("Input command")); if (infotext) - SetWindowText(GetDlgItem(question_hWnd, IDC_TEXT), infotext); + SetDlgItemText(question_hWnd, IDC_TEXT, infotext); else - SetWindowText(GetDlgItem(question_hWnd, IDC_TEXT), TranslateT("Please enter the reply")); + SetDlgItemText(question_hWnd, IDC_TEXT, TranslateT("Please enter the reply")); if (defaulttext) - SetWindowText(GetDlgItem(question_hWnd, IDC_EDIT), defaulttext); + SetDlgItemText(question_hWnd, IDC_EDIT, defaulttext); SetDlgItemText(question_hWnd, IDC_HIDDENEDIT, command.c_str()); dlg->Activate(); diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index a050bcba34..9dfd53c061 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -847,8 +847,8 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) dlg->Show(); HWND hwnd = dlg->GetHwnd(); SetWindowTextA(hwnd, "Miranda IRC"); - SetWindowText(GetDlgItem(hwnd, IDC_TEXT), TranslateT("Please choose an IRC-network to go online. This network will be the default.")); - SetWindowText(GetDlgItem(hwnd, IDC_CAPTION), TranslateT("Default network")); + SetDlgItemText(hwnd, IDC_TEXT, TranslateT("Please choose an IRC-network to go online. This network will be the default.")); + SetDlgItemText(hwnd, IDC_CAPTION, TranslateT("Default network")); WindowSetIcon(hwnd, IDI_MAIN); ShowWindow(hwnd, SW_SHOW); SetActiveWindow(hwnd); diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index f07846f49f..8633977dd1 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -1226,7 +1226,7 @@ void CAddIgnoreDlg::OnInitDialog() { if (szOldMask[0] == 0) { if (m_proto->IsConnected()) - SetWindowText(GetDlgItem(m_hwnd, IDC_NETWORK), m_proto->m_info.sNetwork.c_str()); + SetDlgItemText(m_hwnd, IDC_NETWORK, m_proto->m_info.sNetwork.c_str()); CheckDlgButton(m_hwnd, IDC_Q, BST_CHECKED); CheckDlgButton(m_hwnd, IDC_N, BST_CHECKED); CheckDlgButton(m_hwnd, IDC_I, BST_CHECKED); @@ -1538,8 +1538,8 @@ void CIgnorePrefsDlg::OnEdit(CCtrlButton*) if (_tcschr(szFlags, 'm')) CheckDlgButton(hWnd, IDC_M, BST_CHECKED); } - SetWindowText(GetDlgItem(hWnd, IDC_MASK), szMask); - SetWindowText(GetDlgItem(hWnd, IDC_NETWORK), szNetwork); + SetDlgItemText(hWnd, IDC_MASK, szMask); + SetDlgItemText(hWnd, IDC_NETWORK, szNetwork); m_add.Disable(); m_edit.Disable(); m_del.Disable(); diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index af4c916629..2fb8ea9c0a 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -352,7 +352,7 @@ INT_PTR __cdecl CIrcProto::OnJoinMenuCommand(WPARAM, LPARAM) } SetDlgItemText(m_joinDlg->GetHwnd(), IDC_CAPTION, TranslateT("Join channel")); - SetWindowText(GetDlgItem(m_joinDlg->GetHwnd(), IDC_TEXT), TranslateT("Please enter a channel to join")); + SetDlgItemText(m_joinDlg->GetHwnd(), IDC_TEXT, TranslateT("Please enter a channel to join")); SendDlgItemMessage(m_joinDlg->GetHwnd(), IDC_ENICK, EM_SETSEL, 0, MAKELPARAM(0, -1)); ShowWindow(m_joinDlg->GetHwnd(), SW_SHOW); SetActiveWindow(m_joinDlg->GetHwnd()); @@ -398,7 +398,7 @@ INT_PTR __cdecl CIrcProto::OnChangeNickMenuCommand(WPARAM, LPARAM) } SetDlgItemText(m_nickDlg->GetHwnd(), IDC_CAPTION, TranslateT("Change nickname")); - SetWindowText(GetDlgItem(m_nickDlg->GetHwnd(), IDC_TEXT), TranslateT("Please enter a unique nickname")); + SetDlgItemText(m_nickDlg->GetHwnd(), IDC_TEXT, TranslateT("Please enter a unique nickname")); m_nickDlg->m_Enick.SetText(m_info.sNick.c_str()); m_nickDlg->m_Enick.SendMsg(CB_SETEDITSEL, 0, MAKELPARAM(0, -1)); ShowWindow(m_nickDlg->GetHwnd(), SW_SHOW); @@ -579,7 +579,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam, LPARAM lParam) HWND question_hWnd = dlg->GetHwnd(); HWND hEditCtrl = GetDlgItem(question_hWnd, IDC_EDIT); SetDlgItemText(question_hWnd, IDC_CAPTION, TranslateT("Identify nick")); - SetWindowText(GetDlgItem(question_hWnd, IDC_TEXT), TranslateT("Please enter your password")); + SetDlgItemText(question_hWnd, IDC_TEXT, TranslateT("Please enter your password")); SetDlgItemText(question_hWnd, IDC_HIDDENEDIT, _T("/nickserv IDENTIFY %question=\"%s\",\"%s\"")); SetWindowLongPtr(GetDlgItem(question_hWnd, IDC_EDIT), GWL_STYLE, (LONG)GetWindowLongPtr(GetDlgItem(question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD); diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index d2e5219fb4..4c4ffb2a13 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -965,7 +965,7 @@ void CManagerDlg::OnAdd(CCtrlButton*) dlg->Show(); HWND addban_hWnd = dlg->GetHwnd(); SetDlgItemText(addban_hWnd, IDC_CAPTION, temp); - SetWindowText(GetDlgItem(addban_hWnd, IDC_TEXT), TranslateT("Please enter the hostmask (nick!user@host)")); + SetDlgItemText(addban_hWnd, IDC_TEXT, TranslateT("Please enter the hostmask (nick!user@host)")); TCHAR temp2[450]; TCHAR window[256]; @@ -1003,8 +1003,8 @@ void CManagerDlg::OnEdit(CCtrlButton*) dlg->Show(); HWND addban_hWnd = dlg->GetHwnd(); SetDlgItemText(addban_hWnd, IDC_CAPTION, temp); - SetWindowText(GetDlgItem(addban_hWnd, IDC_TEXT), TranslateT("Please enter the hostmask (nick!user@host)")); - SetWindowText(GetDlgItem(addban_hWnd, IDC_EDIT), user.c_str()); + SetDlgItemText(addban_hWnd, IDC_TEXT, TranslateT("Please enter the hostmask (nick!user@host)")); + SetDlgItemText(addban_hWnd, IDC_EDIT, user.c_str()); m_add.Disable(); m_edit.Disable(); @@ -1275,7 +1275,7 @@ void CManagerDlg::CloseQuestion() void CManagerDlg::InitManager(int mode, const TCHAR* window) { - SetWindowText(GetDlgItem(m_hwnd, IDC_CAPTION), window); + SetDlgItemText(m_hwnd, IDC_CAPTION, window); CHANNELINFO *wi = (CHANNELINFO *)m_proto->DoEvent(GC_EVENT_GETITEMDATA, window, NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0); if (wi) { diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 5590c80f51..397676d12f 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -266,7 +266,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA if (!status || _tcscmp(status, _T("executing"))) { ShowDlgItem(hwndDlg, IDC_SUBMIT, SW_HIDE); - SetWindowText(GetDlgItem(hwndDlg, IDCANCEL), TranslateT("Done")); + SetDlgItemText(hwndDlg, IDCANCEL, TranslateT("Done")); } } else if (!mir_tstrcmp(type, _T("error"))) { diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 08336c73fe..7da3ff31b9 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -354,7 +354,7 @@ void CJabberDlgConsole::OnInitDialog() mir_tstrncpy(m_proto->m_filterInfo.pattern, tszPattern, SIZEOF(m_proto->m_filterInfo.pattern)); sttJabberConsoleRebuildStrings(m_proto, GetDlgItem(m_hwnd, IDC_CB_FILTER)); - SetWindowText(GetDlgItem(m_hwnd, IDC_CB_FILTER), m_proto->m_filterInfo.pattern); + SetDlgItemText(m_hwnd, IDC_CB_FILTER, m_proto->m_filterInfo.pattern); struct { diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 5724a4c0a7..b574a33309 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -1633,7 +1633,7 @@ void CJabberDlgPrivacyLists::btnAddJid_OnClick(CCtrlButton *) int len = GetWindowTextLength(GetDlgItem(m_hwnd, IDC_NEWJID))+1; TCHAR *buf = (TCHAR *)_alloca(sizeof(TCHAR) * len); GetDlgItemText(m_hwnd, IDC_NEWJID, buf, len); - SetWindowText(GetDlgItem(m_hwnd, IDC_NEWJID), _T("")); + SetDlgItemText(m_hwnd, IDC_NEWJID, _T("")); CListAddContact(GetDlgItem(m_hwnd, IDC_CLIST), buf); } diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp index 74957b8907..e63d96234f 100644 --- a/protocols/SkypeClassic/src/skypeopt.cpp +++ b/protocols/SkypeClassic/src/skypeopt.cpp @@ -559,18 +559,18 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L SendDlgItemMessage(hwndDlg, IDC_COMMANDLINE, EM_SETLIMITTEXT, MAX_PATH-1, 0L); if(!db_get_s(NULL,SKYPE_PROTONAME,"CommandLine",&dbv)) { - SetWindowTextA(GetDlgItem(hwndDlg, IDC_COMMANDLINE), dbv.pszVal); + SetDlgItemTextA(hwndDlg, IDC_COMMANDLINE, dbv.pszVal); db_free(&dbv); } SendDlgItemMessage(hwndDlg, IDC_DATAPATH, EM_SETLIMITTEXT, MAX_PATH-1, 0L); if(!db_get_s(NULL,SKYPE_PROTONAME,"datapath",&dbv)) { - SetWindowTextA(GetDlgItem(hwndDlg, IDC_DATAPATH), dbv.pszVal); + SetDlgItemTextA(hwndDlg, IDC_DATAPATH, dbv.pszVal); db_free(&dbv); } - for(i=0; i < sizeof(skypeLaunchControls)/sizeof(skypeLaunchControls[0]); i++) + for(i=0; i < SIZEOF(skypeLaunchControls); i++) EnableWindow(GetDlgItem(hwndDlg, skypeLaunchControls[i]), startSkype); EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), startSkype && IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); @@ -582,14 +582,14 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L // LoginUserName if(!db_get_ts(NULL,SKYPE_PROTONAME,"LoginUserName",&dbv)) { - SetWindowText(GetDlgItem(hwndDlg, IDC_USERNAME), dbv.ptszVal); + SetDlgItemText(hwndDlg, IDC_USERNAME, dbv.ptszVal); db_free(&dbv); } // LoginPassword if(!db_get_ts(NULL,SKYPE_PROTONAME,"LoginPassword",&dbv)) { - SetWindowText(GetDlgItem(hwndDlg, IDC_PASSWORD), dbv.ptszVal); + SetDlgItemText(hwndDlg, IDC_PASSWORD, dbv.ptszVal); db_free(&dbv); } @@ -699,7 +699,7 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L } if(gofnResult) - SetWindowTextA(GetDlgItem(hwndDlg, IDC_COMMANDLINE), szFileName); + SetDlgItemTextA(hwndDlg, IDC_COMMANDLINE, szFileName); break; } @@ -935,8 +935,8 @@ void DoAutoDetect(HWND dlg) { if (acc = ezxml_get(f1, "Lib", 0, "Account", 0, "Default", -1)) { - if (GetDlgItemTextA(dlg, IDC_USERNAME, tmpUser, sizeof(tmpUser))) - SetWindowTextA(GetDlgItem(dlg, IDC_USERNAME), acc->txt); + if (GetDlgItemTextA(dlg, IDC_USERNAME, tmpUser, SIZEOF(tmpUser))) + SetDlgItemTextA(dlg, IDC_USERNAME, acc->txt); /* Can't find this stuff in current Skype verions?? sprintf (fileName, "%s\\%s\\config.xml", basePath, acc->txt); if ((acc = ezxml_get(f1, "UI", 0, "Messages", 0, "OpenWindowInCompactMode", -1)) && *acc->txt!='0') -- cgit v1.2.3