riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX.

This commit is contained in:
Francois Gouget 2008-02-06 04:07:40 +01:00 committed by Alexandre Julliard
parent 8ad3a1f49e
commit 1552f22acf
3 changed files with 21 additions and 21 deletions

View File

@ -2426,7 +2426,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
ex.flags = GT_USECRLF;
ex.codepage = unicode ? 1200 : CP_ACP;
ex.lpDefaultChar = NULL;
ex.lpUsedDefaultChar = NULL;
ex.lpUsedDefChar = NULL;
rc = RichEditWndProc_common(hWnd, EM_GETTEXTEX, (WPARAM)&ex, unicode ? (LPARAM)bufferW : (LPARAM)bufferA, unicode);
if (unicode)
@ -2480,7 +2480,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
buffer = heap_alloc((crlfmul*nCount + 1) * sizeof(WCHAR));
buflen = ME_GetTextW(editor, buffer, nStart, nCount, ex->flags & GT_USECRLF);
rc = WideCharToMultiByte(ex->codepage, flags, buffer, -1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefaultChar);
rc = WideCharToMultiByte(ex->codepage, flags, buffer, -1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefChar);
if (rc) rc--; /* do not count 0 terminator */
heap_free(buffer);

View File

@ -1134,7 +1134,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1);
@ -1150,7 +1150,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem2);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@ -1167,7 +1167,7 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
memset(buf, 0, MAX_BUF_LEN);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
ok(lstrcmpW(buf, TestItem2) == 0,
@ -1182,7 +1182,7 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.flags = GT_USECRLF; /* <-- asking for CR -> CRLF conversion */
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
memset(buf, 0, MAX_BUF_LEN);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
ok(lstrcmpW(buf, TestItem1) == 0,
@ -1195,7 +1195,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@ -1208,7 +1208,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3alt);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@ -1221,7 +1221,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem4);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
@ -1829,7 +1829,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1") == 0,
"EM_GETTEXTEX results not what was set by EM_REPLACESEL\n");
@ -1844,7 +1844,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1873,7 +1873,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1902,7 +1902,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1921,7 +1921,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1940,7 +1940,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r \r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1959,7 +1959,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1978,7 +1978,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -1997,7 +1997,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\rX\r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -2015,7 +2015,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
@ -2034,7 +2034,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r\r\r\r ") == 0,
"EM_GETTEXTEX returned incorrect string\n");

View File

@ -531,7 +531,7 @@ typedef struct _gettextex {
DWORD flags;
UINT codepage;
LPCSTR lpDefaultChar;
LPBOOL lpUsedDefaultChar;
LPBOOL lpUsedDefChar;
} GETTEXTEX;
#define SF_TEXT 0x00000001