summaryrefslogtreecommitdiff
path: root/plugins/ChangeKeyboardLayout
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 /plugins/ChangeKeyboardLayout
parent7e97bbad5f31058886766c569303a0da648cbe92 (diff)
SendMessage(... WM_GETTEXT ...) -> GetWindowText(...)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ChangeKeyboardLayout')
-rw-r--r--plugins/ChangeKeyboardLayout/src/options.cpp2
-rw-r--r--plugins/ChangeKeyboardLayout/src/text_operations.cpp6
2 files changed, 4 insertions, 4 deletions
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);