summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-14 04:23:01 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-14 04:23:01 +0000
commit850259c4eab1a77d973af51cd3bd62fbbd09f591 (patch)
tree7c3cf2435324cef4517210217689540e15fe8419
parent7e97bbad5f31058886766c569303a0da648cbe92 (diff)
SendMessage(... WM_GETTEXT ...) -> GetWindowText(...)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/BASS_interface/src/Main.cpp2
-rw-r--r--plugins/ChangeKeyboardLayout/src/options.cpp2
-rw-r--r--plugins/ChangeKeyboardLayout/src/text_operations.cpp6
-rw-r--r--plugins/DbEditorPP/src/addeditsettingsdlg.cpp2
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp2
-rw-r--r--plugins/IEHistory/src/dlgHandlers.cpp2
-rw-r--r--plugins/NotesAndReminders/src/notes.cpp4
-rw-r--r--plugins/NotesAndReminders/src/options.cpp10
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp10
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp8
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp4
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp4
-rw-r--r--plugins/TranslitSwitcher/src/Layoutproc.cpp2
-rw-r--r--plugins/Variables/src/help.cpp4
-rw-r--r--protocols/AimOscar/src/ui.cpp4
16 files changed, 34 insertions, 34 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index 542e2366f6..e44b9b54fd 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -207,7 +207,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
if (hBass != NULL) {
SYSTEMTIME systime = {0};
- SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, WM_GETTEXT, SIZEOF(tmp), (LPARAM)tmp);
+ GetDlgItemText(hwndDlg, IDC_OUTDEVICE, tmp, SIZEOF(tmp));
db_set_ts(NULL, ModuleName, OPT_OUTDEVICE, tmp);
Volume = (DWORD)SendDlgItemMessage(hwndDlg, IDC_VOLUME, TBM_GETPOS, 0, 0);
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp
index 4406b93e63..900e679243 100644
--- a/plugins/ChangeKeyboardLayout/src/options.cpp
+++ b/plugins/ChangeKeyboardLayout/src/options.cpp
@@ -202,7 +202,7 @@ INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LP
WriteMainOptions();
ptszFormLay = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- SendDlgItemMessage(hWnd, IDC_EDIT_SET, WM_GETTEXT, (WPARAM) MaxTextSize, (LPARAM)ptszFormLay);
+ GetDlgItemText(hWnd, IDC_EDIT_SET, ptszFormLay, MaxTextSize);
i = SendDlgItemMessage(hWnd, IDC_COMBO_LANG, CB_GETCURSEL, 0, 0);
ptszMemLay = ptszLayStrings[i];
if (_tcscmp(ptszMemLay, ptszFormLay) != 0) {
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
index 75e44f15d4..e0748b3741 100644
--- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp
+++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
@@ -300,7 +300,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
if (WindowType == WTYPE_Edit) {
ptszTemp = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
ptszInText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- iRes = SendMessage(hTextWnd, WM_GETTEXT, (WPARAM)MaxTextSize, (LPARAM)ptszTemp);
+ iRes = GetWindowText(hTextWnd, ptszTemp, MaxTextSize);
if (!IsBadStringPtr(ptszInText, MaxTextSize) && (iRes > 0)) {
_tcsncpy(ptszInText, &ptszTemp[crSelection.cpMin], crSelection.cpMax - crSelection.cpMin);
ptszInText[crSelection.cpMax - crSelection.cpMin] = 0;
@@ -337,7 +337,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
}
if (WindowType == WTYPE_Edit) {
ptszInText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- iRes = SendMessage(hTextWnd, WM_GETTEXT, (WPARAM)MaxTextSize, (LPARAM)ptszInText);
+ iRes = GetWindowText(hTextWnd, ptszInText, MaxTextSize);
if (!IsBadStringPtr(ptszInText, MaxTextSize) && (iRes > 0)) {
crTemp.cpMin = 0;
@@ -520,7 +520,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
}
else {
ptszTemp = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
- SendMessage(hTextWnd, WM_GETTEXT, (WPARAM)MaxTextSize, (LPARAM)ptszTemp);
+ 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);
diff --git a/plugins/DbEditorPP/src/addeditsettingsdlg.cpp b/plugins/DbEditorPP/src/addeditsettingsdlg.cpp
index adc64891a9..015523d8d8 100644
--- a/plugins/DbEditorPP/src/addeditsettingsdlg.cpp
+++ b/plugins/DbEditorPP/src/addeditsettingsdlg.cpp
@@ -344,7 +344,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
if (valueLength)
{
if (dbsetting->dbv.type == DBVT_UTF8)
- SendDlgItemMessageW(hwnd, valueID, WM_GETTEXT, valueLength+2, (LPARAM)value);
+ GetDlgItemTextW(hwnd, valueID, (LPWSTR)value, (valueLength + 2));
else
GetWindowText(GetDlgItem(hwnd, valueID), value, valueLength+1);
}
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index f2deece63b..5019c165c3 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -284,7 +284,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook(
HWND hFileName = GetDlgItem(hWndFileDlg, edt1);
char pszFileName[MAX_PATH];
- SendMessage(hFileName, WM_GETTEXT, SIZEOF(pszFileName), (LPARAM)pszFileName);
+ GetWindowText(hFileName, pszFileName, SIZEOF(pszFileName));
if (strcmp(pstShare->pszSrvPath, szSelection) &&
strcmp(pszFileName, pszShareDirStr)) {
diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp
index 1a8aa0f653..794f17fe88 100644
--- a/plugins/IEHistory/src/dlgHandlers.cpp
+++ b/plugins/IEHistory/src/dlgHandlers.cpp
@@ -647,7 +647,7 @@ INT_PTR CALLBACK SearchDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
if (type == SEARCH_TEXT) { //text search
TCHAR text[2048]; //TODO buffer overrun
- SendDlgItemMessage(hWnd, IDC_SEARCH_TEXT, WM_GETTEXT, SIZEOF(text), (LPARAM)text);
+ GetDlgItemText(hWnd, IDC_SEARCH_TEXT, text, SIZEOF(text));
searchResult = SearchHistory(data->contact, data->hLastFoundEvent, text, direction, type);
}
else { //time search
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp
index f73cb4a51e..0cdca7e1aa 100644
--- a/plugins/NotesAndReminders/src/notes.cpp
+++ b/plugins/NotesAndReminders/src/notes.cpp
@@ -853,9 +853,9 @@ static void JustSaveNotesEx(STICKYNOTE *pModified)
if (SzT) // TODO: change to support unicode and rtf, use EM_STREAMOUT
{
if (SzT > MAX_NOTE_LEN) SzT = MAX_NOTE_LEN; // we want to be far below the 64k limit
- tData = (char*)malloc(SzT+1);
+ tData = (char*)malloc(SzT + 1);
if (tData)
- SendMessage(pNote->REHwnd, WM_GETTEXT, SzT+1, (LPARAM)tData);
+ GetWindowText(pNote->REHwnd, tData, SzT + 1);
}
if (pNote == pModified)
diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp
index 0fd7503e6c..1a5adc0dc1 100644
--- a/plugins/NotesAndReminders/src/options.cpp
+++ b/plugins/NotesAndReminders/src/options.cpp
@@ -410,8 +410,8 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar
SzT = (WORD)SendDlgItemMessage(hdlg,IDC_EDIT_EMAILSMS,WM_GETTEXTLENGTH,0,0);
if (SzT != 0)
{
- g_RemindSMS = (char*)realloc(g_RemindSMS,SzT+1);
- SendDlgItemMessage(hdlg,IDC_EDIT_EMAILSMS ,WM_GETTEXT,SzT+1,(LPARAM)g_RemindSMS);
+ g_RemindSMS = (char*)realloc(g_RemindSMS, SzT + 1);
+ GetDlgItemText(hdlg, IDC_EDIT_EMAILSMS, g_RemindSMS, SzT + 1);
}
P = g_RemindSMS;
db_set_blob(0,MODULENAME,"RemindEmail",P,SzT);
@@ -419,8 +419,8 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar
SzT = (WORD)SendDlgItemMessage(hdlg,IDC_EDIT_ALTBROWSER,WM_GETTEXTLENGTH,0,0);
if (SzT != 0)
{
- g_lpszAltBrowser = (TCHAR*)mir_realloc(g_lpszAltBrowser,SzT+1);
- SendDlgItemMessage(hdlg,IDC_EDIT_ALTBROWSER,WM_GETTEXT,SzT+1,(LPARAM)g_lpszAltBrowser);
+ g_lpszAltBrowser = (TCHAR*)mir_realloc(g_lpszAltBrowser, SzT + 1);
+ GetDlgItemText(hdlg, IDC_EDIT_ALTBROWSER, g_lpszAltBrowser, SzT + 1);
TrimString(g_lpszAltBrowser);
if (!*g_lpszAltBrowser)
{
@@ -476,7 +476,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar
ofn.lpstrInitialDir = _T(".");
ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_ENABLESIZING | OFN_DONTADDTORECENT;
- SendDlgItemMessage(hdlg,IDC_EDIT_ALTBROWSER,WM_GETTEXT,(WPARAM)ofn.nMaxFile,(LPARAM)s);
+ GetDlgItemText(hdlg, IDC_EDIT_ALTBROWSER, s, ofn.nMaxFile);
if ( GetOpenFileName(&ofn) )
{
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index 49d767ab1a..5b9fd20897 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -1829,8 +1829,8 @@ INT_PTR CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LP
if (SzT)
{
if (SzT > MAX_REMINDER_LEN) SzT = MAX_REMINDER_LEN;
- ReminderText = (char*)malloc(SzT+1);
- SendDlgItemMessage(Dialog, IDC_REMDATA, WM_GETTEXT, SzT+1, (LPARAM)ReminderText);
+ ReminderText = (char*)malloc(SzT + 1);
+ GetDlgItemText(Dialog, IDC_REMDATA, ReminderText, SzT + 1);
}
if (pReminder->Reminder)
free(pReminder->Reminder);
@@ -1867,7 +1867,7 @@ INT_PTR CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LP
{
if (SzT > MAX_REMINDER_LEN) SzT = MAX_REMINDER_LEN;
ReminderText = (char*)malloc(SzT+1);
- SendDlgItemMessage(Dialog, IDC_REMDATA, WM_GETTEXT, SzT+1, (LPARAM)ReminderText);
+ GetDlgItemText(Dialog, IDC_REMDATA, ReminderText, SzT + 1);
}
SetFocus(NewNote(0, 0, -1, -1, ReminderText, 0, TRUE, TRUE, 0)->REHwnd);
@@ -2164,8 +2164,8 @@ INT_PTR CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARA
if (SzT)
{
if (SzT > MAX_REMINDER_LEN) SzT = MAX_REMINDER_LEN;
- ReminderText = (char*)malloc(SzT+1);
- SendDlgItemMessage(Dialog,IDC_REMINDER,WM_GETTEXT,SzT+1,(LPARAM)ReminderText);
+ ReminderText = (char*)malloc(SzT + 1);
+ GetDlgItemText(Dialog, IDC_REMINDER, ReminderText, SzT + 1);
}
if (NewReminderVisible != 2)
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index cea3480ceb..3763451ef6 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -908,7 +908,7 @@ LRESULT CALLBACK ReplyEditWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
TCHAR msg[2048];
LPTSTR bufW = NULL;
- SendMessage(hwnd, WM_GETTEXT, SIZEOF(msg), (LPARAM)msg);
+ GetWindowText(hwnd, msg, SIZEOF(msg));
if (wcslen(msg) == 0){
DestroyWindow(hwnd);
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index a54e2dc9a0..f06157b8e5 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -565,7 +565,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
int ret = SendMessage(hdlg,EM_GETSEL,(WPARAM)&start,(LPARAM)&end);
- SendMessage(hdlg,WM_GETTEXT,(WPARAM)SIZEOF(sztext),(LPARAM)sztext);
+ GetWindowText(hdlg, sztext, SIZEOF(sztext));
BOOL at_end = (mir_tstrlen(sztext) == (int)end);
@@ -585,7 +585,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
}
SendMessage(hdlg,EM_REPLACESEL,0,(LPARAM)sztext);
- SendMessage(hdlg,WM_GETTEXT,(WPARAM)SIZEOF(sztext),(LPARAM)sztext);
+ GetWindowText(hdlg, sztext, SIZEOF(sztext));
}
CheckText(hdlg, sztext, !at_end);
@@ -611,7 +611,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
}
else if (wparam == VK_DELETE)
{
- SendMessage(hdlg,WM_GETTEXT,(WPARAM)SIZEOF(sztext),(LPARAM)sztext);
+ GetWindowText(hdlg, sztext, SIZEOF(sztext));
CheckText(hdlg, sztext, TRUE);
}
@@ -958,7 +958,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
if (SendMessage(hEdit, EM_GETSEL, 0, 0) != -1)
SendMessage(hEdit, EM_REPLACESEL, 0, (LPARAM)_T(""));
- SendMessage(hEdit, WM_GETTEXT, (WPARAM)SIZEOF(sztext), (LPARAM)sztext);
+ GetWindowText(hEdit, sztext, SIZEOF(sztext));
// Fill combo
BOOL all = IsDlgButtonChecked(hwndDlg, IDC_SHOW_ALL_CONTACTS);
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
index 86d5b765fa..f97af44c44 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp
@@ -119,8 +119,8 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (settings[last]->msg == NULL)
settings[last]->msg = ( char* )malloc(len+1);
else
- settings[last]->msg = ( char* )realloc(settings[last]->msg, len+1);
- SendDlgItemMessageA(hwndDlg, IDC_STATUSMSG, WM_GETTEXT, (LPARAM)(len+1), (WPARAM)settings[last]->msg);
+ settings[last]->msg = (char*)realloc(settings[last]->msg, len+1);
+ GetDlgItemTextA(hwndDlg, IDC_STATUSMSG, settings[last]->msg, (len+1));
}
if (i != -1) {
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index 70f198e853..ddd6ccd3c0 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -737,7 +737,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
if (IsDlgButtonChecked(hwndDlg, IDC_CUSTOMMSG)) {
len = SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXTLENGTH, 0, 0);
ps->szMsg = (TCHAR*)calloc(sizeof(TCHAR), len+1);
- SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXT, (WPARAM)len+1, (LPARAM)ps->szMsg);
+ GetDlgItemText(hwndDlg, IDC_STATUSMSG, ps->szMsg, (len + 1));
}
SendMessage(hwndDlg, UM_SETSTATUSMSG, 0, 0);
}
@@ -756,7 +756,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP
}
int len = SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXTLENGTH, 0, 0);
ps->szMsg = (TCHAR*)calloc(sizeof(TCHAR), len+1);
- SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXT, (WPARAM)len+1, (LPARAM)ps->szMsg);
+ GetDlgItemText(hwndDlg, IDC_STATUSMSG, ps->szMsg, (len + 1));
}
break;
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp
index 30cdbba865..835b1c8063 100644
--- a/plugins/TranslitSwitcher/src/Layoutproc.cpp
+++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp
@@ -390,7 +390,7 @@ void SwitchLayout(bool lastword)
TCHAR *selected = (TCHAR *)CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&event);
mir_tstrncpy(buf, selected, SIZEOF(buf));
}
- else SendMessage(hwnd2, WM_GETTEXT, SIZEOF(buf), (LPARAM)buf); // gimme, gimme, gimme...
+ else GetWindowText(hwnd2, buf, SIZEOF(buf)); // gimme, gimme, gimme...
size_t slen = _tcslen(buf);
if (slen != 0) {
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 53c313b153..89986aedb5 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -68,7 +68,7 @@ static INT_PTR CALLBACK extratextDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPA
case VARM_GETEXTRATEXT:
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT,
- SendDlgItemMessage(hwndDlg, IDC_EXTRATEXT, WM_GETTEXT, wParam, lParam));
+ GetDlgItemText(hwndDlg, IDC_EXTRATEXT, (LPWSTR)lParam, wParam));
return TRUE;
case WM_SIZE:
@@ -747,7 +747,7 @@ static INT_PTR CALLBACK inputDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM
case VARM_GETINPUTTEXT:
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT,
- SendDlgItemMessage(hwndDlg, IDC_TESTSTRING, WM_GETTEXT, wParam, lParam));
+ GetDlgItemText(hwndDlg, IDC_TESTSTRING, (LPWSTR)lParam, wParam));
return TRUE;
case WM_TIMER:
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp
index 4116e5998f..cc7c1f693a 100644
--- a/protocols/AimOscar/src/ui.cpp
+++ b/protocols/AimOscar/src/ui.cpp
@@ -1034,13 +1034,13 @@ static INT_PTR CALLBACK privacy_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (LOWORD(wParam) == IDC_ALLOWADD)
{
char nick[80];
- SendDlgItemMessageA(hwndDlg, IDC_ALLOWEDIT, WM_GETTEXT, SIZEOF(nick), (LPARAM)nick);
+ GetDlgItemTextA(hwndDlg, IDC_ALLOWEDIT, nick, SIZEOF(nick));
SendDlgItemMessageA(hwndDlg, IDC_ALLOWLIST, LB_ADDSTRING, 0, (LPARAM)trim_str(nick));
}
else if (LOWORD(wParam) == IDC_BLOCKADD)
{
char nick[80];
- SendDlgItemMessageA(hwndDlg, IDC_BLOCKEDIT, WM_GETTEXT, SIZEOF(nick), (LPARAM)nick);
+ GetDlgItemTextA(hwndDlg, IDC_BLOCKEDIT, nick, SIZEOF(nick));
SendDlgItemMessageA(hwndDlg, IDC_BLOCKLIST, LB_ADDSTRING, 0, (LPARAM)trim_str(nick));
}
else if (LOWORD(wParam) == IDC_ALLOWREMOVE)