42#define ID_RICHEDITTESTDBUTTON 0x123
46#define ok_w3(format, szString1, szString2, szString3) \
47 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
48 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
49 WideCharToMultiByte(CP_ACP, 0, szString3, -1, string3, MAX_PATH, NULL, NULL); \
50 ok(!lstrcmpW(szString3, szString1) || !lstrcmpW(szString3, szString2), \
51 format, string1, string2, string3);
56#if defined(__i386__) && !defined(__MINGW32__) && (!defined(_MSC_VER) || !defined(__clang__))
62#define ITextServices_OnTxPropertyBitsChange(This,a,b) (This)->lpVtbl->OnTxPropertyBitsChange(This,a,b)
76 IRichEditOle_Release( richole );
137 while (*szChars !=
'\0') {
140 ok(
ret == 0,
"WM_CHAR('%c') ret=%d\n", *szChars,
ret);
152 ok(
result,
"GetKeyboardState failed.\n");
154 key_state[
vk] |= 0x80;
156 ok(
result,
"SetKeyboardState failed.\n");
166 ok(
result,
"GetKeyboardState failed.\n");
168 key_state[
vk] &= ~0x80;
170 ok(
result,
"SetKeyboardState failed.\n");
174static const char haystack[] =
"WINEWine wineWine wine WineWine";
189 {0, -1,
"foo", 0, -1},
219 {20, 5,
"Wine", 0, 13},
238 {-20, 20,
"Wine",
FR_DOWN, -1},
239 {-20, 20,
"Wine",
FR_DOWN, -1},
240 {-15, -20,
"Wine",
FR_DOWN, -1},
241 {1<<12, 1<<13,
"Wine",
FR_DOWN, -1},
255 {0, -1,
"wineWine wine", 0, -1},
274 memset(&ftw, 0,
sizeof(ftw));
280 ok(findloc ==
f->expected_loc,
281 "EM_FINDTEXT(%s,%d,%u) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n",
282 name,
id, unicode,
f->needle,
f->start,
f->end,
f->flags, findloc,
f->expected_loc);
285 ok(findloc ==
f->expected_loc,
286 "EM_FINDTEXTW(%s,%d,%u) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n",
287 name,
id, unicode,
f->needle,
f->start,
f->end,
f->flags, findloc,
f->expected_loc);
292 memset(&fta, 0,
sizeof(fta));
298 ok(findloc ==
f->expected_loc,
299 "EM_FINDTEXT(%s,%d,%u) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n",
300 name,
id, unicode,
f->needle,
f->start,
f->end,
f->flags, findloc,
f->expected_loc);
305 int id,
BOOL unicode)
308 int expected_end_loc;
312 memset(&ftw, 0,
sizeof(ftw));
317 ok(findloc ==
f->expected_loc,
318 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
319 name,
id,
f->needle,
f->start,
f->end,
f->flags, findloc);
321 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
323 expected_end_loc = ((
f->expected_loc == -1) ? -1
324 :
f->expected_loc +
strlen(
f->needle));
326 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n",
331 memset(&fta, 0,
sizeof(fta));
336 ok(findloc ==
f->expected_loc,
337 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
338 name,
id,
f->needle,
f->start,
f->end,
f->flags, findloc);
340 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
342 expected_end_loc = ((
f->expected_loc == -1) ? -1
343 :
f->expected_loc +
strlen(
f->needle));
345 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n",
408 {0, 10,
"foo bar\r"},
423 static const int nBuf = 1024;
424 char dest[1024], origdest[1024];
425 const char text[] =
"foo bar\n"
431 memset(origdest, 0xBB, nBuf);
443 ok(nCopied == expected_nCopied,
"%d: %d!=%d\n",
i, nCopied,
446 if (
gl[
i].buffer_len == 0)
449 else if (
gl[
i].buffer_len == 1)
451 !
strncmp(
dest+2, origdest+2, nBuf-2),
"buffer_len=1\n");
455 char expectedbuf[1024];
456 char resultbuf[1024];
459 for (
j = 0;
j < 32;
j++)
461 expectedbuf[0] =
'\0';
462 for (
j = 0;
j < expected_bytes_written;
j++)
464 for (;
j <
gl[
i].buffer_len;
j++)
467 sprintf(expectedbuf+
strlen(expectedbuf),
"%02x", origdest[
j] & 0xFF);
477 "%d: expected_bytes_written=%d\n" "expected=0x%s\n" "but got= 0x%s\n",
478 i, expected_bytes_written, expectedbuf, resultbuf);
482 nBuf -
gl[
i].buffer_len),
483 "%d: expected_bytes_written=%d\n" "expected=0x%s\n" "but got= 0x%s\n",
484 i, expected_bytes_written, expectedbuf, resultbuf);
499 int offset_test[10][2] = {
516 for (
i = 0;
i < 10;
i++) {
518 ok(
result == offset_test[
i][1],
"Length of line at offset %d is %ld, expected %d\n",
519 offset_test[
i][0],
result, offset_test[
i][1]);
524 skip(
"Skip multibyte character tests on non-Japanese platform\n");
531 int offset_test1[3][2] = {
539 ok(
result == offset_test1[
i][1],
"Length of line at offset %d is %ld, expected %d\n",
540 offset_test1[
i][0],
result, offset_test1[
i][1]);
551 ok(
p.x != -1 &&
p.y != -1,
"p.x:%d p.y:%d\n",
p.x,
p.y);
558 cr.
cpMax = charindex;
559 cr.
cpMin = charindex;
571 const char text[] =
"aa\n"
572 "this is a long line of text that should be longer than the "
599 ok(prevY != curY,
"%d == %d\n", prevY, curY);
607 ok(prevY != curY,
"%d == %d\n", prevY, curY);
614 ok(prevY == curY,
"%d != %d\n", prevY, curY);
621 ok(prevY == curY,
"%d != %d\n", prevY, curY);
637 static const char text[] =
"aa\n"
638 "this is a long line of text that should be longer than the "
649 (sig.
lsUsb[3] & 0x08000000) != 0);
652 for (
i = 0;
i < 50;
i++)
671 for (
i = 0;
i < 50;
i++)
708 for (
i = 0;
i < 50;
i++)
713 "EM_POSFROMCHAR reports y=%hd, expected %d\n",
742 "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n",
750 ok(
pt.x > 1,
"pt.x = %d\n",
pt.x);
754 ok(
pt.x > xpos,
"pt.x = %d\n",
pt.x);
755 xpos = (
rtl ?
pt.x + 7 :
pt.x);
758 ok(
pt.x == xpos,
"pt.x = %d\n",
pt.x);
762 ok(
pt.x == 1,
"pt.x = %d\n",
pt.x);
766 (
LPARAM)
"{\\rtf1\\pard\\fi-200\\li-200\\f1 TestSomeText\\par}");
768 ok(
pt.x == 1,
"pt.x = %d\n",
pt.x);
772 ok(
fmt.dxStartIndent == -400,
"got %d\n",
fmt.dxStartIndent);
773 ok(
fmt.dxOffset == 200,
"got %d\n",
fmt.dxOffset);
787 int tested_effects[] = {
802 DWORD expect_effects;
806 (sig.
lsUsb[3] & 0x08000000) != 0);
825 memset(&cf2, 0,
sizeof(cf2));
827 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
830 memset(&cf2, 0,
sizeof(cf2));
832 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
835 memset(&cf2, 0,
sizeof(cf2));
837 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
840 memset(&cf2, 0,
sizeof(cf2));
842 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
845 memset(&cf2, 0,
sizeof(cf2));
847 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
850 memset(&cf2, 0,
sizeof(cf2));
853 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
855 ok(rc ==
FALSE,
"Should not be able to undo here.\n");
859 memset(&cf2, 0,
sizeof(cf2));
862 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
864 ok(rc ==
FALSE,
"Should not be able to undo here.\n");
868 memset(&cf2, 0,
sizeof(cf2));
871 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
873 ok(rc ==
FALSE,
"Should not be able to undo here.\n");
877 memset(&cf2, 0,
sizeof(cf2));
880 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
886 memset(&cf2, 0,
sizeof(cf2));
889 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
891 ok(rc ==
TRUE,
"Should not be able to undo here.\n");
906 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
908 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
912 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
915 skip(
"RTL language found\n");
920 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
922 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
924 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
928 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
930 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
932 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
935 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
937 ok(rc == -1,
"Text not marked as modified, expected modified! (%d)\n", rc);
942 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
944 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
946 ok(rc == -1,
"Text not marked as modified, expected modified! (%d)\n", rc);
951 for (
i = 0; tested_effects[
i];
i++)
972 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
973 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
974 ok((cf2.dwEffects & tested_effects[
i]) == 0,
975 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n",
i, cf2.dwEffects, tested_effects[
i]);
979 cf2.dwMask = tested_effects[
i];
982 cf2.dwEffects = tested_effects[
i];
993 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
994 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
995 ok((cf2.dwEffects & tested_effects[
i]) == tested_effects[
i],
996 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n",
i, cf2.dwEffects, tested_effects[
i]);
1005 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
1006 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
1007 ok((cf2.dwEffects & tested_effects[
i]) == 0,
1008 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n",
i, cf2.dwEffects, tested_effects[
i]);
1017 (cf2.dwMask & tested_effects[
i]) == 0),
1018 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n",
i, cf2.dwMask, tested_effects[
i]);
1023 for (
i = 0; tested_effects[
i];
i++)
1039 cf2.dwMask = tested_effects[
i];
1042 cf2.dwEffects = tested_effects[
i];
1053 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
1054 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
1055 ok((cf2.dwEffects & tested_effects[
i]) == 0,
1056 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n",
i, cf2.dwEffects, tested_effects[
i]);
1065 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
1066 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
1067 ok((cf2.dwEffects & tested_effects[
i]) == tested_effects[
i],
1068 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n",
i, cf2.dwEffects, tested_effects[
i]);
1077 (cf2.dwMask & tested_effects[
i]) == 0),
1078 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n",
i, cf2.dwMask, tested_effects[
i]);
1079 ok((cf2.dwEffects & tested_effects[
i]) == tested_effects[
i],
1080 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x set\n",
i, cf2.dwEffects, tested_effects[
i]);
1106 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1176 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1211 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1213 "%d, cf2.dwEffects == 0x%08x not expecting effect 0x%08x\n",
i, cf2.
dwEffects,
CFE_BOLD);
1248 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1253 memset(&cf2, 0,
sizeof(cf2));
1254 cf2.
cbSize =
sizeof(cf2);
1258 memset(&cf2, 0,
sizeof(cf2));
1259 cf2.
cbSize =
sizeof(cf2);
1263 memset(&cf2, 0,
sizeof(cf2));
1264 cf2.
cbSize =
sizeof(cf2);
1268 memset(&cf2, 0,
sizeof(cf2));
1269 cf2.
cbSize =
sizeof(cf2);
1274 memset(&cfW, 0,
sizeof(cfW));
1275 cfW.
cbSize =
sizeof(cfW);
1279 memset(&cfW, 0,
sizeof(cfW));
1280 cfW.
cbSize =
sizeof(cfW);
1284 memset(&cfW, 0,
sizeof(cfW));
1285 cfW.
cbSize =
sizeof(cfW);
1289 memset(&cfW, 0,
sizeof(cfW));
1290 cfW.
cbSize =
sizeof(cfW);
1308 "got %08x\n", cf2.
dwMask);
1320 "got %08x\n", cf2.
dwMask);
1332 "got %08x\n", cf2.
dwMask);
1344 "got %08x\n", cf2.
dwMask);
1357 "got %08x\n", cf2.
dwMask);
1369 "got %08x\n", cf2.
dwMask);
1403 "EM_SETTEXTMODE: using mutually exclusive mode flags - returned: %x\n", rc);
1413 "EM_SETTEXTMODE: changed text mode in control containing text - returned: %x\n", rc);
1430 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
1435 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1438 ok(rc == -1,
"Text not marked as modified, expected modified! (%d)\n", rc);
1453 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1460 ok(rc == 0,
"EM_SETTEXTMODE: unable to switch to plain text mode with empty control: returned: %d\n", rc);
1487 "two formats found in plain text mode - cf2.dwEffects: %x cf2test.dwEffects: %x\n",
1496 ok(rc != 0,
"EM_SETTEXTMODE: changed from plain text to rich text with text in control - returned: %d\n", rc);
1503 ok(rc == 0,
"EM_SETTEXTMODE: unable to change to rich text with empty control - returned: %d\n", rc);
1529 "expected different formats - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n",
1546 ok(
ret != 0,
"expected non-zero got %d\n",
ret);
1554 ret &= ~PFM_TABLEROWDELIMITER;
1555 fmt.dwMask &= ~PFM_TABLEROWDELIMITER;
1557 ok(
ret == expectedMask,
"expected %x got %x\n", expectedMask,
ret);
1558 ok(
fmt.dwMask == expectedMask,
"expected %x got %x\n", expectedMask,
fmt.dwMask);
1561 ok(
fmt.wNumbering == 0,
"got %d\n",
fmt.wNumbering );
1562 ok(
fmt.wNumberingStart == 0,
"got %d\n",
fmt.wNumberingStart );
1563 ok(
fmt.wNumberingStyle == 0,
"got %04x\n",
fmt.wNumberingStyle );
1564 ok(
fmt.wNumberingTab == 0,
"got %d\n",
fmt.wNumberingTab );
1599 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
1602 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
1605 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1621 "two selections' formats differ - cf2.dwMask: %x, cf2test.dwMask %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n",
1646 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1674 "Copied text retained formatting - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n",
1682 static const char text[] =
"Hello. My name is RichEdit!";
1683 static const char text2[] =
"Hello. My name is RichEdit!\r";
1684 static const char text2_after[] =
"Hello. My name is RichEdit!\r\n";
1696 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1701 "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n",
1714 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1723 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1728 "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n",
1736 "WM_GETTEXT returned %d, expected 0 or %d\n",
result,
lstrlenA(text2) - 1);
1741 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1749 const char * text1 =
"foo bar\r\nfoo bar";
1750 const char * text2 =
"foo bar\rfoo bar";
1751 const char *
expect =
"bar\rfoo";
1816 skip(
"Skip multibyte character tests on non-Japanese platform\n");
1833 const char * text1 =
"foo bar\r\nfoo bar";
1834 const char * text2 =
"foo bar\rfoo bar";
1835 const char *
expect =
"bar\rfoo";
1855 skip(
"Skip multibyte character tests on non-Japanese platform\n");
1872 static const char text[] =
"Hello. My name is RichEdit!";
1883 ok(hwndRichEdit !=
NULL,
"class: %s, error: %d\n",
1893 ok(hwndRichEdit !=
NULL,
"class: %s, error: %d\n",
1899 "Incorrect initial options %x\n",
options);
1909 "EM_SETOPTIONS: Text not changed! s1:%s s2:%s\n",
text,
buffer);
1918 "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n",
text,
buffer);
1923 ok(dwStyle &
ES_READONLY,
"Readonly style not set by EM_SETOPTIONS\n");
1931 "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n",
text,
buffer);
1937 "Options set by SetWindowLong (%x -> %x)\n", oldOptions,
options);
1945 text_format.
cbSize =
sizeof(text_format);
1958 ok(link_present,
"URL Case: CFE_LINK not set for [%s].\n",
url);
1962 ok(!link_present,
"Non-URL Case: CFE_LINK set for [%s].\n",
url);
1979 {
"winehq.org",
FALSE},
1980 {
"http://www.winehq.org",
TRUE},
1981 {
"http//winehq.org",
FALSE},
1982 {
"ww.winehq.org",
FALSE},
1983 {
"www.winehq.org",
TRUE},
1984 {
"ftp://192.168.1.1",
TRUE},
1985 {
"ftp//192.168.1.1",
FALSE},
1986 {
"mailto:your@email.com",
TRUE},
1987 {
"prospero:prosperoserver",
TRUE},
1988 {
"telnet:test",
TRUE},
1989 {
"news:newserver",
TRUE},
1990 {
"wais:waisserver",
TRUE}
1998 const char * templates_delim[] = {
1999 "This is some text with X on it",
2000 "This is some text with (X) on it",
2001 "This is some text with X\r on it",
2002 "This is some text with ---X--- on it",
2003 "This is some text with \"X\" on it",
2004 "This is some text with 'X' on it",
2005 "This is some text with 'X' on it",
2006 "This is some text with :X: on it",
2008 "This text ends with X",
2010 "This is some text with X) on it",
2011 "This is some text with X--- on it",
2012 "This is some text with X\" on it",
2013 "This is some text with X' on it",
2014 "This is some text with X: on it",
2016 "This is some text with (X on it",
2017 "This is some text with \rX on it",
2018 "This is some text with ---X on it",
2019 "This is some text with \"X on it",
2020 "This is some text with 'X on it",
2021 "This is some text with :X on it",
2024 const char * templates_non_delim[] = {
2025 "This is some text with |X| on it",
2026 "This is some text with *X* on it",
2027 "This is some text with /X/ on it",
2028 "This is some text with +X+ on it",
2029 "This is some text with %X% on it",
2030 "This is some text with #X# on it",
2031 "This is some text with @X@ on it",
2032 "This is some text with \\X\\ on it",
2033 "This is some text with |X on it",
2034 "This is some text with *X on it",
2035 "This is some text with /X on it",
2036 "This is some text with +X on it",
2037 "This is some text with %X on it",
2038 "This is some text with #X on it",
2039 "This is some text with @X on it",
2040 "This is some text with \\X on it",
2041 "This is some text with _X on it",
2046 const char * templates_xten_delim[] = {
2047 "This is some text with X| on it",
2048 "This is some text with X* on it",
2049 "This is some text with X/ on it",
2050 "This is some text with X+ on it",
2051 "This is some text with X% on it",
2052 "This is some text with X# on it",
2053 "This is some text with X@ on it",
2054 "This is some text with X\\ on it",
2055 "This is some text with X_ on it",
2063 const char * templates_neutral_delim[] = {
2064 "This is some text with X-Y on it",
2065 "This is some text with X--Y on it",
2066 "This is some text with X!Y on it",
2067 "This is some text with X[Y on it",
2068 "This is some text with X]Y on it",
2069 "This is some text with X{Y on it",
2070 "This is some text with X}Y on it",
2071 "This is some text with X(Y on it",
2072 "This is some text with X)Y on it",
2073 "This is some text with X\"Y on it",
2074 "This is some text with X;Y on it",
2075 "This is some text with X:Y on it",
2076 "This is some text with X'Y on it",
2077 "This is some text with X?Y on it",
2078 "This is some text with X<Y on it",
2079 "This is some text with X>Y on it",
2080 "This is some text with X.Y on it",
2081 "This is some text with X,Y on it",
2089 ok(urlRet==0,
"Good wParam: urlRet is: %d\n", urlRet);
2091 ok(urlRet==0,
"Good wParam2: urlRet is: %d\n", urlRet);
2096 ok(urlRet==
E_INVALIDARG,
"Bad wParam2: urlRet is: %d\n", urlRet);
2120 at_pos =
strchr(templates_delim[
j],
'X');
2121 at_offset = at_pos - templates_delim[
j];
2123 buffer[at_offset] =
'\0';
2134 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2136 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2138 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2143 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2145 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2150 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2152 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2154 if (
buffer[end_offset] !=
'\0')
2157 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2158 if (
buffer[end_offset +1] !=
'\0')
2161 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2171 at_pos =
strchr(templates_non_delim[
j],
'X');
2172 at_offset = at_pos - templates_non_delim[
j];
2174 buffer[at_offset] =
'\0';
2185 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2187 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2189 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2192 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2194 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2195 if (
buffer[end_offset] !=
'\0')
2198 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2199 if (
buffer[end_offset +1] !=
'\0')
2202 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2212 at_pos =
strchr(templates_xten_delim[
j],
'X');
2213 at_offset = at_pos - templates_xten_delim[
j];
2215 buffer[at_offset] =
'\0';
2226 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2228 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2230 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2235 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2237 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2239 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2244 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2246 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2248 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2250 if (
buffer[end_offset +1] !=
'\0')
2253 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset + 2,
buffer);
2254 if (
buffer[end_offset +2] !=
'\0')
2257 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3,
buffer);
2263 char * at_pos, * end_pos;
2267 if (!urls[
i].is_url)
continue;
2269 at_pos =
strchr(templates_neutral_delim[
j],
'X');
2270 at_offset = at_pos - templates_neutral_delim[
j];
2272 buffer[at_offset] =
'\0';
2277 end_offset = end_pos -
buffer;
2285 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2287 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2289 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2292 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2294 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2296 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2304 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2306 "CFE_LINK set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2308 "CFE_LINK set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2312 hwndRichEdit =
NULL;
2317 for (
i = 0;
i < 2;
i++) {
2321 for (
j = 0;
j < 3;
j++) {
2327 at_pos =
strchr(templates_delim[
j],
'X');
2328 at_offset = at_pos - templates_delim[
j];
2333 for (
u = 0; templates_delim[
j][
u];
u++) {
2334 if (templates_delim[
j][
u] ==
'\r') {
2336 }
else if (templates_delim[
j][
u] !=
'X') {
2339 for (
v = 0; urls[
i].text[
v];
v++) {
2349 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2351 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2353 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2358 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2360 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2365 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2367 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2369 if (
buffer[end_offset] !=
'\0')
2372 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2373 if (
buffer[end_offset +1] !=
'\0')
2376 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2388 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2390 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2392 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2395 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2398 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset+1,
buffer);
2399 ok(
buffer[end_offset],
"buffer \"%s\" ended prematurely. Is it missing a newline character?\n",
buffer);
2400 if (
buffer[end_offset] != 0 &&
buffer[end_offset+1] !=
'\0')
2403 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset+1, end_offset +2,
buffer);
2404 if (
buffer[end_offset +2] !=
'\0')
2407 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3,
buffer);
2418 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2420 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2422 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2427 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2429 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2434 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2436 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2438 if (
buffer[end_offset] !=
'\0')
2441 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2442 if (
buffer[end_offset +1] !=
'\0')
2445 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2450 hwndRichEdit =
NULL;
2455 for (
i = 0;
i < 2;
i++) {
2478 at_pos =
strchr(templates_delim[
j],
'X');
2479 at_offset = at_pos - templates_delim[
j];
2481 buffer[at_offset] =
'\0';
2492 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2494 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2496 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2501 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2503 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2508 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2510 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2512 if (
buffer[end_offset] !=
'\0')
2515 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2516 if (
buffer[end_offset +1] !=
'\0')
2519 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2530 at_pos =
strchr(templates_delim[
j],
'X');
2531 at_offset = at_pos - templates_delim[
j];
2546 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2548 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2550 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2555 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2557 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2562 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2564 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2566 if (
buffer[end_offset] !=
'\0')
2569 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2570 if (
buffer[end_offset +1] !=
'\0')
2573 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2584 at_pos =
strchr(templates_delim[
j],
'X');
2585 at_offset = at_pos - templates_delim[
j];
2605 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2607 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2609 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2614 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2616 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2621 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2623 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2625 if (
buffer[end_offset] !=
'\0')
2628 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2629 if (
buffer[end_offset +1] !=
'\0')
2632 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2638 hwndRichEdit =
NULL;
2643 for (
i = 0;
i < 2;
i++) {
2652 at_pos =
strchr(templates_delim[
j],
'X');
2653 at_offset = at_pos - templates_delim[
j];
2665 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2667 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2669 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2674 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2676 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2681 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2683 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2685 if (
buffer[end_offset] !=
'\0')
2688 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2689 if (
buffer[end_offset +1] !=
'\0')
2692 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2703 at_pos =
strchr(templates_delim[
j],
'X');
2704 at_offset = at_pos - templates_delim[
j];
2721 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2723 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2725 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2730 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2732 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2737 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2739 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2741 if (
buffer[end_offset] !=
'\0')
2744 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2745 if (
buffer[end_offset +1] !=
'\0')
2748 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2754 hwndRichEdit =
NULL;
2766 int y_before, y_after;
2771 for (
i = 0;
i < 4;
i++) {
2776 ok(
expr ==
r,
"EM_SCROLL improper return value returned (i == %d). "
2777 "Got 0x%08x, expected 0x%08x\n",
i,
r,
expr);
2778 ok(y_after == 0,
"EM_SCROLL improper scroll. scrolled to line %d, not 1 "
2779 "(i == %d)\n", y_after,
i);
2787 for (
i = 0;
i < 2;
i++) {
2792 "a LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE "
2793 "LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE "
2794 "LONG LINE \nb\nc\nd\ne");
2795 for (
j = 0;
j < 12;
j++)
2805 ok(((
r & 0xffffff00) == 0x00010000) &&
2806 ((
r & 0x000000ff) != 0x00000000),
2807 "EM_SCROLL page down didn't scroll by a small positive number of "
2808 "lines (r == 0x%08x)\n",
r);
2809 ok(y_after > y_before,
"EM_SCROLL page down not functioning "
2810 "(line %d scrolled to line %d\n", y_before, y_after);
2816 ok(((
r & 0xffffff00) == 0x0001ff00),
2817 "EM_SCROLL page up didn't scroll by a small negative number of lines "
2818 "(r == 0x%08x)\n",
r);
2819 ok(y_after < y_before,
"EM_SCROLL page up not functioning (line "
2820 "%d scrolled to line %d\n", y_before, y_after);
2828 ok(
r == 0x00010001,
"EM_SCROLL line down didn't scroll by one line "
2829 "(r == 0x%08x)\n",
r);
2830 ok(y_after -1 == y_before,
"EM_SCROLL line down didn't go down by "
2831 "1 line (%d scrolled to %d)\n", y_before, y_after);
2839 ok(
r == 0x0001ffff,
"EM_SCROLL line up didn't scroll by one line "
2840 "(r == 0x%08x)\n",
r);
2841 ok(y_after +1 == y_before,
"EM_SCROLL line up didn't go up by 1 "
2842 "line (%d scrolled to %d)\n", y_before, y_after);
2852 "EM_SCROLL line up returned indicating movement (0x%08x)\n",
r);
2853 ok(y_before == y_after,
2854 "EM_SCROLL line up beyond top worked (%d)\n", y_after);
2864 "EM_SCROLL page up returned indicating movement (0x%08x)\n",
r);
2865 ok(y_before == y_after,
2866 "EM_SCROLL page up beyond top worked (%d)\n", y_after);
2868 for (
j = 0;
j < 12;
j++)
2876 "EM_SCROLL page down returned indicating movement (0x%08x)\n",
r);
2877 ok(y_before == y_after,
2878 "EM_SCROLL page down beyond bottom worked (%d -> %d)\n",
2886 "EM_SCROLL line down returned indicating movement (0x%08x)\n",
r);
2887 ok(y_before == y_after,
2888 "EM_SCROLL line down beyond bottom worked (%d -> %d)\n",
2929 const char *
text=
"a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n";
2945 memset(&si, 0,
sizeof(si));
2950 "Vertical scrollbar is visible, should be invisible.\n");
2952 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
2956 memset(&si, 0,
sizeof(si));
2961 "Vertical scrollbar is visible, should be invisible.\n");
2963 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
2967 memset(&si, 0,
sizeof(si));
2972 "Vertical scrollbar is invisible, should be visible.\n");
2974 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2980 memset(&si, 0,
sizeof(si));
2985 "Vertical scrollbar is visible, should be invisible.\n");
2987 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2992 memset(&si, 0,
sizeof(si));
2997 "Vertical scrollbar is visible, should be invisible.\n");
2999 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3003 memset(&si, 0,
sizeof(si));
3008 "Vertical scrollbar is visible, should be invisible.\n");
3010 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3014 memset(&si, 0,
sizeof(si));
3019 "Vertical scrollbar is visible, should be invisible.\n");
3021 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3025 memset(&si, 0,
sizeof(si));
3030 "Vertical scrollbar is visible, should be invisible.\n");
3032 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3041 memset(&si, 0,
sizeof(si));
3046 "Vertical scrollbar is invisible, should be visible.\n");
3048 "reported page/range is %d (%d..%d) expected 0 (0..1)\n",
3052 memset(&si, 0,
sizeof(si));
3057 "Vertical scrollbar is invisible, should be visible.\n");
3059 "reported page/range is %d (%d..%d) expected 0 (0..1)\n",
3063 memset(&si, 0,
sizeof(si));
3068 "Vertical scrollbar is invisible, should be visible.\n");
3070 "reported page/range is %d (%d..%d)\n",
3075 memset(&si, 0,
sizeof(si));
3080 "Vertical scrollbar is invisible, should be visible.\n");
3082 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3087 memset(&si, 0,
sizeof(si));
3092 "Vertical scrollbar is invisible, should be visible.\n");
3094 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3098 memset(&si, 0,
sizeof(si));
3103 "Vertical scrollbar is invisible, should be visible.\n");
3105 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3109 memset(&si, 0,
sizeof(si));
3114 "Vertical scrollbar is invisible, should be visible.\n");
3116 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3120 memset(&si, 0,
sizeof(si));
3125 "Vertical scrollbar is invisible, should be visible.\n");
3127 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3137 memset(&si, 0,
sizeof(si));
3142 "Vertical scrollbar is invisible, should be visible.\n");
3144 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3149 memset(&si, 0,
sizeof(si));
3154 "Vertical scrollbar is invisible, should be visible.\n");
3156 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3161 memset(&si, 0,
sizeof(si));
3166 "Vertical scrollbar is invisible, should be visible.\n");
3168 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3173 memset(&si, 0,
sizeof(si));
3178 "Vertical scrollbar is invisible, should be visible.\n");
3180 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3185 memset(&si, 0,
sizeof(si));
3190 "Vertical scrollbar is invisible, should be visible.\n");
3192 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3197 memset(&si, 0,
sizeof(si));
3202 "Vertical scrollbar is visible, should be invisible.\n");
3204 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3212 memset(&si, 0,
sizeof(si));
3217 "Vertical scrollbar is visible, should be invisible.\n");
3219 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3223 memset(&si, 0,
sizeof(si));
3228 "Vertical scrollbar is visible, should be invisible.\n");
3230 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3234 memset(&si, 0,
sizeof(si));
3239 "Vertical scrollbar is visible, should be invisible.\n");
3241 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3245 memset(&si, 0,
sizeof(si));
3250 "Vertical scrollbar is visible, should be invisible.\n");
3252 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3256 memset(&si, 0,
sizeof(si));
3261 "Vertical scrollbar is invisible, should be visible.\n");
3263 "reported page/range is %d (%d..%d)\n",
3268 memset(&si, 0,
sizeof(si));
3273 "Vertical scrollbar is visible, should be invisible.\n");
3275 "reported page/range is %d (%d..%d)\n",
3279 memset(&si, 0,
sizeof(si));
3284 "Vertical scrollbar is visible, should be invisible.\n");
3286 "reported page/range is %d (%d..%d)\n",
3292 memset(&si, 0,
sizeof(si));
3297 "Vertical scrollbar is invisible, should be visible.\n");
3299 "reported page/range is %d (%d..%d)\n",
3303 memset(&si, 0,
sizeof(si));
3308 "Vertical scrollbar is visible, should be invisible.\n");
3310 "reported page/range is %d (%d..%d)\n",
3315 memset(&si, 0,
sizeof(si));
3320 "Vertical scrollbar is invisible, should be visible.\n");
3322 "reported page/range is %d (%d..%d)\n",
3326 memset(&si, 0,
sizeof(si));
3331 "Vertical scrollbar is visible, should be invisible.\n");
3333 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3337 memset(&si, 0,
sizeof(si));
3342 "Vertical scrollbar is invisible, should be visible.\n");
3344 "reported page/range is %d (%d..%d)\n",
3353#define ENABLE_WS_VSCROLL(hwnd) \
3354 SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_VSCROLL)
3355#define DISABLE_WS_VSCROLL(hwnd) \
3356 SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_VSCROLL)
3360 memset(&si, 0,
sizeof(si));
3365 "Vertical scrollbar is invisible, should be visible.\n");
3367 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3372 memset(&si, 0,
sizeof(si));
3377 "Vertical scrollbar is invisible, should be visible.\n");
3379 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3384 memset(&si, 0,
sizeof(si));
3389 "Vertical scrollbar is invisible, should be visible.\n");
3391 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3396 memset(&si, 0,
sizeof(si));
3401 "Vertical scrollbar is invisible, should be visible.\n");
3403 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3408 memset(&si, 0,
sizeof(si));
3413 "Vertical scrollbar is invisible, should be visible.\n");
3415 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3420 memset(&si, 0,
sizeof(si));
3425 "Vertical scrollbar is visible, should be invisible.\n");
3427 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3435 memset(&si, 0,
sizeof(si));
3440 "Vertical scrollbar is visible, should be invisible.\n");
3442 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3446 memset(&si, 0,
sizeof(si));
3451 "Vertical scrollbar is visible, should be invisible.\n");
3453 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3457 memset(&si, 0,
sizeof(si));
3462 "Vertical scrollbar is visible, should be invisible.\n");
3464 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3468 memset(&si, 0,
sizeof(si));
3473 "Vertical scrollbar is visible, should be invisible.\n");
3475 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3479 memset(&si, 0,
sizeof(si));
3484 "Vertical scrollbar is invisible, should be visible.\n");
3486 "reported page/range is %d (%d..%d)\n",
3491 memset(&si, 0,
sizeof(si));
3496 "Vertical scrollbar is visible, should be invisible.\n");
3498 "reported page/range is %d (%d..%d)\n",
3502 memset(&si, 0,
sizeof(si));
3507 "Vertical scrollbar is visible, should be invisible.\n");
3509 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3513 memset(&si, 0,
sizeof(si));
3518 "Vertical scrollbar is invisible, should be visible.\n");
3520 "reported page/range is %d (%d..%d)\n",
3524 memset(&si, 0,
sizeof(si));
3529 "Vertical scrollbar is visible, should be invisible.\n");
3531 "reported page/range is %d (%d..%d)\n",
3537 memset(&si, 0,
sizeof(si));
3542 "Vertical scrollbar is invisible, should be visible.\n");
3544 "reported page/range is %d (%d..%d)\n",
3548 memset(&si, 0,
sizeof(si));
3553 "Vertical scrollbar is visible, should be invisible.\n");
3555 "reported page/range is %d (%d..%d)\n",
3560 memset(&si, 0,
sizeof(si));
3565 "Vertical scrollbar is invisible, should be visible.\n");
3567 "reported page/range is %d (%d..%d)\n",
3589 "WM_SIZE/scrollbar mutual recursion detected, expected none!\n");
3596 "WM_SIZE/scrollbar mutual recursion detected, expected none!\n");
3630 for (
i=0;
i<101;
i++)
3632 for (
i=0;
i<100;
i++)
3635 "EM_SETUNDOLIMIT allowed more than a hundred undo's by default.\n");
3643 "EM_SETUNDOLIMIT allowed undo with UNDOLIMIT set to 0\n");
3653 "EM_SETUNDOLIMIT didn't allow the first undo with UNDOLIMIT set to 2\n");
3656 "EM_SETUNDOLIMIT didn't allow a second undo with UNDOLIMIT set to 2\n");
3659 "EM_SETUNDOLIMIT allowed a third undo with UNDOLIMIT set to 2\n");
3665 "EM_SETUNDOLIMIT returned %d when set to -1, instead of 100\n",
result);
3680 "EM_GETPASSWORDCHAR returned %c by default, instead of NULL\n",
result);
3686 "EM_GETPASSWORDCHAR returned %c (%d) when set to 'x', instead of x (120)\n",
result,
result);
3692 "EM_GETPASSWORDCHAR returned %c (%d) when set to 'x', instead of x (120)\n",
result,
result);
3703 char**
str = (
char**)dwCookie;
3716 const char * TestItem1 =
"TestSomeText";
3717 const char * TestItem2 =
"TestSomeText\r";
3718 const char * TestItem2_after =
"TestSomeText\r\n";
3719 const char * TestItem3 =
"TestSomeText\rSomeMoreText\r";
3720 const char * TestItem3_after =
"TestSomeText\r\nSomeMoreText\r\n";
3721 const char * TestItem4 =
"TestSomeText\n\nTestSomeText";
3722 const char * TestItem4_after =
"TestSomeText\r\n\r\nTestSomeText";
3723 const char * TestItem5 =
"TestSomeText\r\r\nTestSomeText";
3724 const char * TestItem5_after =
"TestSomeText TestSomeText";
3725 const char * TestItem6 =
"TestSomeText\r\r\n\rTestSomeText";
3726 const char * TestItem6_after =
"TestSomeText \r\nTestSomeText";
3727 const char * TestItem7 =
"TestSomeText\r\n\r\r\n\rTestSomeText";
3728 const char * TestItem7_after =
"TestSomeText\r\n \r\nTestSomeText";
3730 const char rtftextA[] =
"{\\rtf sometext}";
3731 const char urtftextA[] =
"{\\urtf sometext}";
3732 const WCHAR rtftextW[] = {
'{',
'\\',
'r',
't',
'f',
' ',
's',
'o',
'm',
'e',
't',
'e',
'x',
't',
'}',0};
3733 const WCHAR urtftextW[] = {
'{',
'\\',
'u',
'r',
't',
'f',
' ',
's',
'o',
'm',
'e',
't',
'e',
'x',
't',
'}',0};
3734 const WCHAR sometextW[] = {
's',
'o',
'm',
'e',
't',
'e',
'x',
't',0};
3736 char buf[1024] = {0};
3737 WCHAR bufW[1024] = {0};
3746#define TEST_SETTEXT(a, b) \
3747 result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)a); \
3748 ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
3749 result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buf); \
3750 ok (result == lstrlenA(buf), \
3751 "WM_GETTEXT returned %ld instead of expected %u\n", \
3752 result, lstrlenA(buf)); \
3753 result = strcmp(b, buf); \
3755 "WM_SETTEXT round trip: strcmp = %ld, text=\"%s\"\n", result, buf);
3774#define TEST_SETTEXTW(a, b) \
3775 result = SendMessageW(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)a); \
3776 ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
3777 result = SendMessageW(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)bufW); \
3778 ok (result == lstrlenW(bufW), \
3779 "WM_GETTEXT returned %ld instead of expected %u\n", \
3780 result, lstrlenW(bufW)); \
3781 result = lstrcmpW(b, bufW); \
3782 ok(result == 0, "WM_SETTEXT round trip: strcmp = %ld\n", result);
3798 ok(
result == 1,
"WM_SETTEXT returned %ld, expected 12\n",
result);
3800 ok(
result == 5,
"WM_GETTEXT returned %ld, expected 5\n",
result);
3801 ok(!
strcmp(
buf,
"line1"),
"WM_GETTEXT returned incorrect string '%s'\n",
buf);
3803 ok(
result == 1,
"WM_SETTEXT returned %ld, expected 1\n",
result);
3805 ok(
result == 3,
"WM_GETTEXT returned %ld, expected 3\n",
result);
3806 ok(!
strcmp(
buf,
"ABC"),
"WM_GETTEXT returned incorrect string '%s'\n",
buf);
3817 char**
str = (
char**)dwCookie;
3818 ok(*pcb ==
cb || *pcb == 0,
"cb %d, *pcb %d\n",
cb, *pcb);
3830 const char *
p =
buf;
3846 char buf[1024] = {0};
3850 const char * TestItem1 =
"TestSomeText";
3851 const char * TestItem2 =
"TestSomeText\r";
3852 const char * TestItem3 =
"TestSomeText\r\n";
3862 ok(
r == 12,
"streamed text length is %d, expecting 12\n",
r);
3864 "streamed text different, got %s\n",
buf);
3893 ok(
r == 14,
"streamed text length is %d, expecting 14\n",
r);
3895 "streamed text different from, got %s\n",
buf);
3922 ok(
r == 14,
"streamed text length is %d, expecting 14\n",
r);
3924 "streamed text different, got %s\n",
buf);
3934 ok(
r == 14,
"streamed text length is %d, expecting 14\n",
r);
3936 "streamed text different, got %s\n",
buf);
3947 char buf[1024] = {0};
3952 const char * TestItem =
"TestSomeText";
3967 ok(fontTbl !=
NULL,
"missing \\fonttbl section\n");
3972 while(*fontTbl && brackCount)
3976 else if(*fontTbl ==
'}')
3981 ok(brackCount == 0,
"missing closing bracket in \\fonttbl block\n");
3986 ok(*fontTbl ==
'}',
"spurious character '%02x' before \\fonttbl closing bracket\n", *fontTbl);
3990 ok(*fontTbl == 0x0d && *(fontTbl+1) == 0x0a,
"missing crlf after \\fonttbl block\n");
4020 int sel_start, sel_end;
4023 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
4025 'T',
'e',
'x',
't', 0};
4026 WCHAR TestItem1alt[] = {
'T',
'T',
'e',
's',
4032 WCHAR TestItem1altn[] = {
'T',
'T',
'e',
's',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't',
4033 '\r',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't',0};
4034 WCHAR TestItem2[] = {
'T',
'e',
's',
't',
4038 const char * TestItem2_after =
"TestSomeText\r\n";
4039 WCHAR TestItem3[] = {
'T',
'e',
's',
't',
4042 '\r',
'\n',
'\r',
'\n', 0};
4043 WCHAR TestItem3alt[] = {
'T',
'e',
's',
't',
4047 WCHAR TestItem3_after[] = {
'T',
'e',
's',
't',
4051 WCHAR TestItem4[] = {
'T',
'e',
's',
't',
4054 '\r',
'\r',
'\n',
'\r',
4056 WCHAR TestItem4_after[] = {
'T',
'e',
's',
't',
4060#define MAX_BUF_LEN 1024
4088 ok (
parent != 0,
"Failed to create parent window\n");
4099 (
LPARAM)
"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}");
4106 ok(sel_start == 18,
"Selection start incorrectly at %d\n", sel_start);
4107 ok(sel_end == 18,
"Selection end incorrectly at %d\n", sel_end);
4116 (
LPARAM)
"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}");
4121 ok(si.
nPos != 0,
"Position is incorrectly at %d\n", si.
nPos);
4123 ok(sel_start == 18,
"Selection start incorrectly at %d\n", sel_start);
4124 ok(sel_end == 18,
"Selection end incorrectly at %d\n", sel_end);
4131 (
LPARAM)
"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}");
4132 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4136 ok(si.
nPos == 0,
"Position is incorrectly at %d\n", si.
nPos);
4138 ok(sel_start == 0,
"Selection start incorrectly at %d\n", sel_start);
4139 ok(sel_end == 0,
"Selection end incorrectly at %d\n", sel_end);
4150 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4153 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4166 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4169 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4173 ok(
strcmp((
const char *)
buf, TestItem2_after) == 0,
4174 "WM_GETTEXT did *not* see \\r converted to \\r\\n pairs.\n");
4185 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4200 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4212 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4215 "EM_SETTEXTEX did not convert properly\n");
4226 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4229 "EM_SETTEXTEX did not convert properly\n");
4240 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4243 "EM_SETTEXTEX did not convert properly\n");
4250 "EM_SETTEXTEX returned %d, instead of 1\n",
result);
4251 ok(!
buf[0],
"EM_SETTEXTEX with NULL lParam should clear rich edit.\n");
4256 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4265 "EM_SETTEXTEX with NULL lParam to replace selection"
4266 " with no text should return 0. Got %i\n",
4272 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4283 "EM_SETTEXTEX with NULL lParam to replace selection"
4284 " with no text should return 0. Got %i\n",
4287 "EM_SETTEXTEX to replace selection with more text failed: %i.\n",
4299 trace(
"EM_STREAMOUT produced:\n%s\n", (
char *)
buf);
4311 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4314 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4330 ok(
lstrcmpA(bufACP,
"not unicode") == 0,
"'%s' != 'not unicode'\n", bufACP);
4341 trace(
"EM_STREAMOUT produced:\n%s\n", (
char *)
buf);
4359 ok_w3(
"Expected \"%s\" or \"%s\", got \"%s\"\n", TestItem1alt, TestItem1altn,
buf);
4387 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX when"
4388 " using ST_SELECTION and non-Unicode\n");
4400 ok(!
strcmp(bufACP,
"richtext"),
"expected 'richtext' but got '%s'\n", bufACP);
4411 ok(!
strcmp(bufACP,
"morerichtext"),
"expected 'morerichtext' but got '%s'\n", bufACP);
4418 ok(
result == 15,
"EM_SETTEXTEX: Test UTF8 with BOM returned %d, expected 15\n",
result);
4420 ok(
result == 0,
"EM_SETTEXTEX: Test UTF8 with BOM set wrong text: Result: %s\n", bufACP);
4426 ok(
result == 15,
"EM_SETTEXTEX: Test UTF8 with BOM returned %d, expected 15\n",
result);
4428 ok(
result == 0,
"EM_SETTEXTEX: Test UTF8 with BOM set wrong text: Result: %s\n", bufACP);
4432 skip(
"Skip multibyte character tests on non-Japanese platform\n");
4441 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4443 "EM_SETTEXTEX: Test multibyte character set wrong text: Result: %s\n", bufACP);
4446 setText.codepage =
CP_ACP;
4448 ok(
result == 1,
"EM_SETTEXTEX incorrectly returned %d, expected 1\n",
result);
4450 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4452 "EM_SETTEXTEX: Test multibyte character set wrong text: Result: %s\n", bufACP);
4456 setText.codepage =
CP_ACP;
4460 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4462 "EM_SETTEXTEX: Test multibyte character set wrong text: Result: %s\n", bufACP);
4472 ok(
result == 1,
"EM_SETTEXTEX incorrectly returned %d, expected 1\n",
result);
4474 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4475 ok(!
strcmp(bufACP,
"line1"),
"EM_SETTEXTEX: Test single-line text: Result: %s\n", bufACP);
4495 "EM_LIMITTEXT: set to 100, returned: %d, expected: 100\n",
ret);
4501 "EM_LIMITTEXT: set to 0, returned: %d, expected: 65536\n",
ret);
4507 "EM_LIMITTEXT: set to -1, returned: %d, expected: -1\n",
ret);
4513 "EM_LIMITTEXT: set to -2, returned: %d, expected: -2\n",
ret);
4521 int i, selBegin, selEnd, len1, len2;
4523 char text[1024 + 1];
4529 ok(32767 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 32767,
i);
4535 ok(textlimit ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit,
i);
4541 ok(textlimit ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit,
i);
4546 ok(65536 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 65536,
i);
4548 textlimit =
sizeof(
text)-1;
4557 len1 = selEnd - selBegin;
4564 len2 = selEnd - selBegin;
4567 "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n",
4575 len1 = selEnd - selBegin;
4578 "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n",
4586 len2 = selEnd - selBegin;
4589 "EM_EXLIMITTEXT: No Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n",
4595 text[textlimit] = 0;
4607 text[textlimit] = 0;
4612 ok(10 ==
i,
"expected 10 chars\n");
4614 ok(10 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10,
i);
4618 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4621 ok(10 ==
i,
"expected 10 chars, got %i\n",
i);
4623 ok(10 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10,
i);
4628 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4631 ok(10 ==
i,
"expected 10 chars, got %i\n",
i);
4633 ok(10 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10,
i);
4640 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4642 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4645 ok(1 ==
i,
"expected 1 chars, got %i instead\n",
i);
4656 ok(32767 ==
i,
"expected: %d, actual: %d\n", 32767,
i);
4660 ok(50000 ==
i,
"expected: %d, actual: %d\n", 50000,
i);
4686 returnedCF2A.
cbSize =
sizeof(returnedCF2A);
4694 "EM_GETCHARFORMAT: Returned wrong font on test 1. Sent: %s, Returned: %s\n",
4701 "EM_GETCHARFORMAT: Returned wrong font on test 2. Sent: %s, Returned: %s\n",
4708 "EM_GETCHARFORMAT: Returned wrong font on test 3. Sent: %s, Returned: %s\n",
4713 ZeroMemory(&returnedCF2A,
sizeof(returnedCF2A));
4714 ZeroMemory(&sentLogFont,
sizeof(sentLogFont));
4715 returnedCF2A.
cbSize =
sizeof(returnedCF2A);
4721 "EM_GETCHARFORMAT: Returned wrong font on test 4. Sent: NULL, Returned: %s. Expected \"System\".\n",returnedCF2A.
szFaceName);
4732 const char**
str = (
const char**)dwCookie;
4752 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
4754 'T',
'e',
'x',
't', 0};
4755 WCHAR TestItem2[] = {
'T',
'e',
's',
't',
4757 'O',
't',
'h',
'e',
'r',
4758 'T',
'e',
'x',
't', 0};
4759 const char* streamText =
"hello world";
4775 "EM_GETMODIFY returned non-zero, instead of zero on create\n");
4781 "EM_GETMODIFY returned zero, instead of non-zero on EM_SETMODIFY\n");
4787 "EM_GETMODIFY returned non-zero, instead of zero on EM_SETMODIFY\n");
4794 "EM_GETMODIFY returned non-zero, instead of zero on setting font\n");
4801 "EM_GETMODIFY returned zero, instead of non-zero on setting text\n");
4807 "EM_GETMODIFY returned zero, instead of non-zero on undo after setting text\n");
4815 "EM_GETMODIFY returned non-zero, instead of zero when setting text while not keeping undo stack\n");
4822 "EM_GETMODIFY returned non-zero for WM_SETTEXT\n");
4829 "EM_GETMODIFY returned non-zero, instead of zero for WM_CLEAR\n");
4838 "EM_GETMODIFY returned zero, instead of non-zero when replacing text\n");
4847 "EM_GETMODIFY returned zero, instead of non-zero when pasting identical text\n");
4857 "EM_GETMODIFY returned zero, instead of non-zero when pasting different text\n");
4865 "EM_GETMODIFY returned zero, instead of non-zero for WM_CHAR\n");
4873 "EM_GETMODIFY returned zero, instead of non-zero for backspace\n");
4883 ok(
result == 1,
"EM_SETCHARFORMAT returned %ld instead of 1\n",
result);
4886 "EM_GETMODIFY returned zero, instead of non-zero for EM_SETCHARFORMAT\n");
4897 "EM_GETMODIFY returned zero, instead of non-zero for EM_SETPARAFORMAT\n");
4907 "EM_GETMODIFY returned zero, instead of non-zero for EM_STREAM\n");
4923 {5, 10, 10, 5, 10 },
4924 {15, 17, 17, 15, 17 },
4926 {0, 100, 18, 0, 18 },
4928 {-1, 1, 17, 17, 17 },
4936 {-1, -1, 17, 17, 17 },
4937 {-4, -5, 17, 17, 17 },
4939 {0, -1, 18, 0, 18 },
4940 {17, -5, 18, 17, 18 },
4941 {18, -3, 17, 17, 17 },
4943 {15, 19, 18, 15, 18 },
4944 {19, 15, 18, 15, 18 },
4946 {17, 18, 18, 17, 18 },
4947 {17, 50, 18, 17, 18 },
4984 skip(
"Skip multibyte character tests on non-Japanese platform\n");
4998 ok(!
strcmp(bufA,
"ef\x8e\xf0g"),
"EM_GETSELTEXT return incorrect string\n");
5000 ok(cr.
cpMin == 4,
"Selection start incorrectly: %d expected 4\n", cr.
cpMin);
5001 ok(cr.
cpMax == 8,
"Selection end incorrectly: %d expected 8\n", cr.
cpMax);
5024 char buffA[32] = {0};
5041 ok(buffA[0] == 0,
"selection text %s\n", buffA);
5044 skip(
"Skip multibyte character tests on non-Japanese platform\n");
5047 int sel_start, sel_end;
5056 ok(!
strcmp(buffA,
"ef\x8e\xf0g"),
"EM_GETSELTEXT return incorrect string\n");
5058 ok(sel_start == 4,
"Selection start incorrectly: %d expected 4\n", sel_start);
5059 ok(sel_end == 8,
"Selection end incorrectly: %d expected 8\n", sel_end);
5072 CHAR rtfstream[] =
"{\\rtf1 TestSomeText}";
5073 CHAR urtfstream[] =
"{\\urtf1 TestSomeText}";
5083 ok(0 ==
r,
"EM_REPLACESEL returned %d, expected 0\n",
r);
5086 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5092 trace(
"Testing EM_REPLACESEL behavior with redraw=%d\n",
redraw);
5098 ok(9 ==
r,
"EM_REPLACESEL returned %d, expected 9\n",
r);
5101 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5109 "EM_GETTEXTEX results not what was set by EM_REPLACESEL\n");
5113 ok(
r == 1,
"EM_GETLINECOUNT returned %d, expected 1\n",
r);
5117 ok(10 ==
r,
"EM_REPLACESEL returned %d, expected 10\n",
r);
5120 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5128 "EM_GETTEXTEX returned incorrect string\n");
5132 ok(
r == 2,
"EM_GETLINECOUNT returned %d, expected 2\n",
r);
5136 ok(
r == 11,
"EM_REPLACESEL returned %d, expected 11\n",
r);
5140 ok(
r == 2,
"EM_GETLINECOUNT returned %d, expected 2\n",
r);
5143 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5144 ok(cr.
cpMin == 10,
"EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.
cpMin);
5145 ok(cr.
cpMax == 10,
"EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.
cpMax);
5149 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5157 "EM_GETTEXTEX returned incorrect string\n");
5160 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5161 ok(cr.
cpMin == 10,
"EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.
cpMin);
5162 ok(cr.
cpMax == 10,
"EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.
cpMax);
5172 ok(2 ==
r,
"EM_REPLACESEL returned %d, expected 4\n",
r);
5174 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5175 ok(cr.
cpMin == 2,
"EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.
cpMin);
5176 ok(cr.
cpMax == 2,
"EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.
cpMax);
5186 "EM_GETTEXTEX returned incorrect string\n");
5190 ok(
r == 3,
"EM_GETLINECOUNT returned %d, expected 3\n",
r);
5194 ok(
r == 3,
"EM_REPLACESEL returned %d, expected 3\n",
r);
5196 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5197 ok(cr.
cpMin == 1,
"EM_EXGETSEL returned cpMin=%d, expected 1\n", cr.
cpMin);
5198 ok(cr.
cpMax == 1,
"EM_EXGETSEL returned cpMax=%d, expected 1\n", cr.
cpMax);
5208 "EM_GETTEXTEX returned incorrect string\n");
5212 ok(
r == 1,
"EM_GETLINECOUNT returned %d, expected 1\n",
r);
5216 ok(
r == 9,
"EM_REPLACESEL returned %d, expected 9\n",
r);
5218 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5219 ok(cr.
cpMin == 7,
"EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.
cpMin);
5220 ok(cr.
cpMax == 7,
"EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.
cpMax);
5230 "EM_GETTEXTEX returned incorrect string\n");
5234 ok(
r == 7,
"EM_GETLINECOUNT returned %d, expected 7\n",
r);
5238 ok(
r == 5,
"EM_REPLACESEL returned %d, expected 5\n",
r);
5240 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5241 ok(cr.
cpMin == 2,
"EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.
cpMin);
5242 ok(cr.
cpMax == 2,
"EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.
cpMax);
5252 "EM_GETTEXTEX returned incorrect string\n");
5256 ok(
r == 2,
"EM_GETLINECOUNT returned %d, expected 2\n",
r);
5260 ok(
r == 5,
"EM_REPLACESEL returned %d, expected 5\n",
r);
5262 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5263 ok(cr.
cpMin == 3,
"EM_EXGETSEL returned cpMin=%d, expected 3\n", cr.
cpMin);
5264 ok(cr.
cpMax == 3,
"EM_EXGETSEL returned cpMax=%d, expected 3\n", cr.
cpMax);
5274 "EM_GETTEXTEX returned incorrect string\n");
5278 ok(
r == 3,
"EM_GETLINECOUNT returned %d, expected 3\n",
r);
5282 ok(
r == 6,
"EM_REPLACESEL returned %d, expected 6\n",
r);
5284 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5285 ok(cr.
cpMin == 5,
"EM_EXGETSEL returned cpMin=%d, expected 5\n", cr.
cpMin);
5286 ok(cr.
cpMax == 5,
"EM_EXGETSEL returned cpMax=%d, expected 5\n", cr.
cpMax);
5296 "EM_GETTEXTEX returned incorrect string\n");
5300 ok(
r == 5,
"EM_GETLINECOUNT returned %d, expected 5\n",
r);
5304 ok(2 ==
r,
"EM_REPLACESEL returned %d, expected 2\n",
r);
5306 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5307 ok(cr.
cpMin == 2,
"EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.
cpMin);
5308 ok(cr.
cpMax == 2,
"EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.
cpMax);
5318 "EM_GETTEXTEX returned incorrect string\n");
5322 ok(
r == 3,
"EM_GETLINECOUNT returned %d, expected 3\n",
r);
5326 ok(
r == 9,
"EM_REPLACESEL returned %d, expected 9\n",
r);
5328 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5329 ok(cr.
cpMin == 7,
"EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.
cpMin);
5330 ok(cr.
cpMax == 7,
"EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.
cpMax);
5340 "EM_GETTEXTEX returned incorrect string\n");
5344 ok(
r == 7,
"EM_GETLINECOUNT returned %d, expected 7\n",
r);
5348 skip(
"Skip multibyte character tests on non-Japanese platform\n");
5353 todo_wine ok(
r == 5,
"EM_REPLACESEL returned %d, expected 5\n",
r);
5355 ok(
r == 0,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5356 ok(cr.cpMin == 4,
"EM_EXGETSEL returned cpMin=%d, expected 4\n", cr.cpMin);
5357 ok(cr.cpMax == 4,
"EM_EXGETSEL returned cpMax=%d, expected 4\n", cr.cpMax);
5359 ok(!
strcmp(
buffer,
"abc\x8e\xf0"),
"WM_GETTEXT returned incorrect string\n");
5360 ok(
r == 5,
"WM_GETTEXT returned %d, expected 5\n",
r);
5364 todo_wine ok(
r == 4,
"EM_REPLACESEL returned %d, expected 4\n",
r);
5366 ok(
r == 0,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5367 todo_wine ok(cr.cpMin == 4,
"EM_EXGETSEL returned cpMin=%d, expected 4\n", cr.cpMin);
5368 todo_wine ok(cr.cpMax == 4,
"EM_EXGETSEL returned cpMax=%d, expected 4\n", cr.cpMax);
5371 todo_wine ok(
r == 5,
"WM_GETTEXT returned %d, expected 5\n",
r);
5376 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5378 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5386 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5388 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5397 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5399 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5408 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5410 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5426 ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5428 ok(
r == 5,
"WM_GETTEXT returned %d, expected 5\n",
r);
5453 const char* text1 =
"testing paste\r";
5454 const char* text1_step1 =
"testing paste\r\ntesting paste\r\n";
5455 const char* text1_after =
"testing paste\r\n";
5456 const char* text2 =
"testing paste\r\rtesting paste";
5457 const char* text2_after =
"testing paste\r\n\r\ntesting paste";
5458 const char* text3 =
"testing paste\r\npaste\r\ntesting paste";
5471 "test paste: strcmp = %i, text='%s'\n",
result,
buffer);
5478 "test paste: strcmp = %i, text='%s'\n",
result,
buffer);
5489 "test paste: strcmp = %i\n",
result);
5495 "test paste: strcmp = %i\n",
result);
5501 "test paste: strcmp = %i\n",
result);
5511 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5525 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5539 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5554 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5560 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5568 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5575 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5590 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5598 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5610 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5616 int r,
i, tpp_x, tpp_y;
5620 BOOL skip_non_english;
5621 static const struct {
5626 {
"WINE wine", 0, 0},
5627 {
"WINE wineWine", 0, 0},
5628 {
"WINE\r\nwine\r\nwine", 5, 10},
5629 {
"WINE\r\nWINEwine\r\nWINEwine", 5, 14},
5630 {
"WINE\r\n\r\nwine\r\nwine", 5, 6}
5634 if (skip_non_english)
5635 skip(
"Skipping some tests on non-English platform\n");
5688 ok(
r ==
len,
"Expected %d, got %d\n",
len,
r);
5698 if (! skip_non_english)
5699 ok(fr.rc.bottom == (stringsize.
cy * tpp_y),
"Expected bottom to be %d, got %d\n", (stringsize.
cy * tpp_y), fr.rc.bottom);
5703 ok(
r == fmtstrings[
i].
first,
"Expected %d, got %d\n", fmtstrings[
i].
first,
r);
5706 ok(
r <
len,
"Expected < %d, got %d\n",
len,
r);
5711 if (fmtstrings[
i].second)
5713 ok(
r == fmtstrings[
i].second,
"Expected %d, got %d\n", fmtstrings[
i].second,
r);
5715 else if (! skip_non_english)
5716 ok (
r <
len,
"Expected < %d, got %d\n",
len,
r);
5722 ok(
r ==
len,
"Expected %d, got %d\n",
len,
r);
5735 const char text[] = {
't',
'e',
's',
't'};
5746 *pcb =
sizeof(
text);
5761 const char**
str = (
const char**)dwCookie;
5782 static const char first[] =
"\xef\xbb\xbf\xc3\x96\xc3";
5783 *pcb =
sizeof(
first) - 1;
5785 }
else if(*phase == 1){
5786 static const char second[] =
"\x8f\xc3\x8b";
5787 *pcb =
sizeof(second) - 1;
5788 memcpy(pbBuff, second, *pcb);
5803 static const char first[] =
"{\\rtf1\\ansi{Th\0is";
5804 *written =
sizeof(
first);
5807 else if (*phase == 1)
5809 static const char second[] =
" is a test}}";
5810 *written =
sizeof(second);
5840 str->buffer += *pcb;
5841 str->length -= *pcb;
5852 char buffer[1024] = {0}, tmp[16];
5856 const char * streamText0 =
"{\\rtf1\\fi100\\li200\\rtlpar\\qr TestSomeText}";
5857 const char * streamText0a =
"{\\rtf1\\fi100\\li200\\rtlpar\\qr TestSomeText\\par}";
5858 const char * streamText0b =
"{\\rtf1 TestSomeText\\par\\par}";
5861 const char * streamText1 =
5862 "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n"
5863 "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n"
5867 const char * streamText2 =
5868 "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;"
5869 "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255"
5870 "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 "
5871 "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 "
5872 "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 "
5873 "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 "
5874 "\\tx11448 \\tx11872 \\tx12296 \\tx12720 \\tx13144 \\cf2 RichEdit1\\line }";
5876 const char * streamText3 =
"RichEdit1";
5878 const char * streamTextUTF8BOM =
"\xef\xbb\xbfTestUTF8WithBOM";
5880 const char * streamText4 =
5881 "This text just needs to be long enough to cause run to be split onto "
5882 "two separate lines and make sure the null terminating character is "
5883 "handled properly.\0";
5885 const WCHAR UTF8Split_exp[4] = {0xd6, 0xcf, 0xcb, 0};
5887 int length4 =
strlen(streamText4) + 1;
5890 (
char *)streamText4,
5893 const WCHAR streamText5[] = {
'T',
'e',
's',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't' };
5896 sizeof(streamText5),
5897 (
char *)streamText5,
5909 "EM_STREAMIN: Test 0 returned %ld, expected 12\n",
result);
5912 "EM_STREAMIN: Test 0 set wrong text: Result: %s\n",
buffer);
5913 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0 set error %d, expected %d\n",
es.dwError, 0);
5919 fmt.cbSize =
sizeof(
fmt);
5921 ok(
fmt.dxStartIndent == 0,
"got %d\n",
fmt.dxStartIndent);
5922 ok(
fmt.dxOffset == 0,
"got %d\n",
fmt.dxOffset);
5936 "EM_STREAMIN: Test 0-a returned %ld, expected 12\n",
result);
5939 "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",
buffer);
5940 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0-a set error %d, expected %d\n",
es.dwError, 0);
5946 fmt.cbSize =
sizeof(
fmt);
5948 ok(
fmt.dxStartIndent == 300,
"got %d\n",
fmt.dxStartIndent);
5949 ok(
fmt.dxOffset == -100,
"got %d\n",
fmt.dxOffset);
5962 "EM_STREAMIN: Test 0-b returned %ld, expected 14\n",
result);
5965 "EM_STREAMIN: Test 0-b set wrong text: Result: %s\n",
buffer);
5966 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0-b set error %d, expected %d\n",
es.dwError, 0);
5978 "EM_STREAMIN: Test 0-a returned %ld, expected 12\n",
result);
5981 "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",
buffer);
5982 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0-a set error %d, expected %d\n",
es.dwError, 0);
5999 "EM_STREAMIN: Test SFF_SELECTION 0-a returned %ld, expected 14\n",
result);
6002 "EM_STREAMIN: Test SFF_SELECTION 0-a set wrong text: Result: %s\n",
buffer);
6003 ok(
es.dwError == 0,
"EM_STREAMIN: Test SFF_SELECTION 0-a set error %d, expected %d\n",
es.dwError, 0);
6013 "EM_STREAMIN: Test 1 returned %ld, expected 12\n",
result);
6016 "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",
buffer);
6017 ok(
es.dwError == 0,
"EM_STREAMIN: Test 1 set error %d, expected %d\n",
es.dwError, 0);
6026 "EM_STREAMIN: Test 2 returned %ld, expected 0\n",
result);
6027 ok(!
buffer[0],
"EM_STREAMIN: Test 2 set wrong text: Result: %s\n",
buffer);
6028 ok(
es.dwError == -16,
"EM_STREAMIN: Test 2 set error %d, expected %d\n",
es.dwError, -16);
6037 "EM_STREAMIN: Test 3 returned %ld, expected 0\n",
result);
6038 ok(!
buffer[0],
"EM_STREAMIN: Test 3 set wrong text: Result: %s\n",
buffer);
6039 ok(
es.dwError == -16,
"EM_STREAMIN: Test 3 set error %d, expected %d\n",
es.dwError, -16);
6049 "EM_STREAMIN: Test UTF8WithBOM returned %ld, expected 15\n",
result);
6052 "EM_STREAMIN: Test UTF8WithBOM set wrong text: Result: %s\n",
buffer);
6053 ok(
es.dwError == 0,
"EM_STREAMIN: Test UTF8WithBOM set error %d, expected %d\n",
es.dwError, 0);
6066 "EM_STREAMIN: Test UTF8Split returned %ld\n",
result);
6069 "EM_STREAMIN: Test UTF8Split set wrong text: Result: %s\n",
buffer);
6070 ok(
es.dwError == 0,
"EM_STREAMIN: Test UTF8Split set error %d, expected %d\n",
es.dwError, 0);
6076 ok(
result == length4,
"got %ld, expected %d\n",
result, length4);
6080 "EM_STREAMIN: Test 4 returned %ld, expected %d\n",
result, length4);
6081 ok(
es.dwError == 0,
"EM_STREAMIN: Test 4 set error %d, expected %d\n",
es.dwError, 0);
6087 ok(
result ==
sizeof(streamText5),
"got %ld, expected %u\n",
result, (
UINT)
sizeof(streamText5));
6091 "EM_STREAMIN: Test 5 returned %ld, expected %d\n",
result, length5);
6092 ok(
es.dwError == 0,
"EM_STREAMIN: Test 5 set error %d, expected %d\n",
es.dwError, 0);
6098 ptr =
"line1\r\nline2";
6106 "EM_STREAMIN: Unexpected text '%s'\n",
buffer);
6139 const char randomtext[] =
"Some text";
6152 "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",
buffer);
6156 "EM_STREAMIN without SFF_SELECTION wrongly allows undo\n");
6167 "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",
buffer);
6171 "EM_STREAMIN with SFF_SELECTION but no selection set "
6172 "should create an undo\n");
6183 "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",
buffer);
6187 "EM_STREAMIN with SFF_SELECTION and selection set "
6188 "should create an undo\n");
6201 static const WCHAR tW[] = {
't',0};
6202 static const WCHAR teW[] = {
't',
'e',0};
6203 static const WCHAR textW[] = {
't',
'e',
's',
't',0};
6204 static const char textA[] =
"test";
6208 int em_settextex_supported,
ret;
6210#define set_textA(hwnd, wm_set_text, txt) \
6212 SETTEXTEX stex = { ST_DEFAULT, CP_ACP }; \
6213 WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \
6214 assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \
6215 ret = SendMessageA(hwnd, wm_set_text, wparam, (LPARAM)txt); \
6216 ok(ret, "SendMessageA(%02x) error %u\n", wm_set_text, GetLastError()); \
6218#define expect_textA(hwnd, wm_get_text, txt) \
6220 GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \
6221 WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \
6222 assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \
6223 memset(bufA, 0xAA, sizeof(bufA)); \
6224 ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \
6225 ok(ret, "SendMessageA(%02x) error %u\n", wm_get_text, GetLastError()); \
6226 ret = lstrcmpA(bufA, txt); \
6227 ok(!ret, "%02x: strings do not match: expected %s got %s\n", wm_get_text, txt, bufA); \
6230#define set_textW(hwnd, wm_set_text, txt) \
6232 SETTEXTEX stex = { ST_DEFAULT, 1200 }; \
6233 WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \
6234 assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \
6235 ret = SendMessageW(hwnd, wm_set_text, wparam, (LPARAM)txt); \
6236 ok(ret, "SendMessageW(%02x) error %u\n", wm_set_text, GetLastError()); \
6238#define expect_textW(hwnd, wm_get_text, txt) \
6240 GETTEXTEX gtex = { 64, GT_DEFAULT, 1200, NULL, NULL }; \
6241 WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \
6242 assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \
6243 memset(bufW, 0xAA, sizeof(bufW)); \
6244 ret = SendMessageW(hwnd, wm_get_text, wparam, (LPARAM)bufW); \
6245 ok(ret, "SendMessageW(%02x) error %u\n", wm_get_text, GetLastError()); \
6246 ret = lstrcmpW(bufW, txt); \
6247 ok(!ret, "%02x: strings do not match: expected[0] %x got[0] %x\n", wm_get_text, txt[0], bufW[0]); \
6249#define expect_empty(hwnd, wm_get_text) \
6251 GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \
6252 WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \
6253 assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \
6254 memset(bufA, 0xAA, sizeof(bufA)); \
6255 ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \
6256 ok(!ret, "empty richedit should return 0, got %d\n", ret); \
6257 ok(!*bufA, "empty richedit should return empty string, got %s\n", bufA); \
6261 0, 0, 200, 60, 0, 0, 0, 0);
6265 ok(
ret,
"RichEdit20W should be unicode under NT\n");
6269 trace(
"EM_SETTEXTEX is %ssupported on this platform\n",
6270 em_settextex_supported ?
"" :
"NOT ");
6276 ok(!
ret,
"SendMessageA(WM_CHAR) should return 0, got %d\n",
ret);
6282 ok(!
ret,
"SendMessageA(WM_CHAR) should return 0, got %d\n",
ret);
6296 if (em_settextex_supported)
6310 if (em_settextex_supported)
6321 0, 0, 200, 60, 0, 0, 0, 0);
6325 ok(!
ret,
"RichEdit20A should NOT be unicode\n");
6332 if (em_settextex_supported)
6346 if (em_settextex_supported)
6361 const char * char_list =
"abc\rabc\r";
6362 const char * expected_content_single =
"abcabc";
6363 const char * expected_content_multi =
"abc\r\nabc\r\n";
6369 0, 0, 200, 60, 0, 0, 0, 0);
6374 while (*
p !=
'\0') {
6377 ok(
ret == 0,
"WM_CHAR('%c') ret=%d\n", *
p,
ret);
6384 ok(
ret == 0,
"WM_GETTEXT recovered incorrect string!\n");
6390 0, 0, 200, 60, 0, 0, 0, 0);
6394 while (*
p !=
'\0') {
6397 ok(
ret == 0,
"WM_CHAR('%c') ret=%d\n", *
p,
ret);
6404 ok(
ret == 0,
"WM_GETTEXT recovered incorrect string!\n");
6414 const char * base_string =
"base string";
6416 const char * test_string_after =
"a";
6417 const char * test_string_2 =
"a\rtest\rstring";
6422 0, 0, 200, 60, 0, 0, 0, 0);
6461 ok(
ret == 0,
"WM_GETTEXT recovered incorrect string!\n");
6467 0, 0, 200, 60, 0, 0, 0, 0);
6523 "GTL_DEFAULT gave %i, expected %i\n",
ret,
lstrlenA(test_string_2));
6529 "GTL_NUMCHARS gave %i, expected %i\n",
ret,
lstrlenA(test_string_2));
6535 "GTL_NUMBYTES gave %i, expected %i\n",
ret,
lstrlenA(test_string_2)*2);
6541 "GTL_PRECISE gave %i, expected %i\n",
ret,
lstrlenA(test_string_2)*2);
6547 "GTL_NUMCHAR | GTL_PRECISE gave %i, expected %i\n",
ret,
lstrlenA(test_string_2));
6553 "GTL_NUMCHARS | GTL_NUMBYTES gave %i, expected %i\n",
ret,
E_INVALIDARG);
6580 const char text[] =
"foo bar\n";
6598 ok (
parent != 0,
"Failed to create parent window\n");
6607 ok(
ret == eventMask,
"failed to set event mask\n");
6613 ok(
ret ==
TRUE,
"failed to set text\n");
6674 int sel_start, sel_end;
6691 ok (
parent != 0,
"Failed to create parent window\n");
6743 ok(sel_start == 1 && sel_end == 1,
6744 "selections is incorrectly at (%d,%d)\n", sel_start, sel_end);
6749 ok(sel_start == 1 && sel_end == 1,
6750 "selections is incorrectly at (%d,%d)\n", sel_start, sel_end);
6756 ok(sel_start == 1 && sel_end == 1,
6757 "selections is incorrectly at (%d,%d)\n", sel_start, sel_end);
6764#define CURSOR_CLIENT_X 5
6765#define CURSOR_CLIENT_Y 5
6804 memset(&junk_enlink, 0x23,
sizeof(junk_enlink));
6828 "%s test %i: Expected lParam 0x%lx got 0x%lx\n",
6836 "%s test %i: Expected enlink to remain unmodified\n",
desc,
i);
6845 POINT orig_cursor_pos;
6856 link_notify_tests[] =
6926 ok(
parent != 0,
"Failed to create parent window\n");
6929 ok(
hwnd != 0,
"Failed to create edit window\n");
6957 link_notify_tests[
i].notifies);
6973 0, 0, 200, 60, 0, 0, 0, 0);
6980 ok (
result ==
FALSE,
"Undo operation successful with nothing to undo.\n");
6984 ok (
result ==
FALSE,
"Redo operation successful with nothing undone.\n");
6993 ok (
result ==
FALSE,
"Can redo before anything is undone.\n");
6995 ok (
result ==
TRUE,
"Cannot undo typed characters.\n");
6997 ok (
result ==
TRUE,
"EM_UNDO Failed to undo typed characters.\n");
7002 ok (
result == 0,
"expected '%s' but got '%s'\n",
"one two three",
buffer);
7005 ok (
result ==
TRUE,
"Cannot undo typed characters.\n");
7007 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7015 ok (
result ==
FALSE,
"Redo buffer should have been cleared by typing.\n");
7020 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7023 ok (
result == 0,
"expected '%s' but got '%s'\n",
"one two three",
buffer);
7031 ok (
result ==
FALSE,
"Redo buffer should have been cleared by typing.\n");
7036 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7051 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7056 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7059 ok (
result == 0,
"expected '%s' but got '%s'\n",
"abcd",
buffer);
7070 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7073 ok (
result == 0,
"expected '%s' but got '%s'\n",
"one two three",
buffer);
7075 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7124 int sel_start, sel_end;
7125 const WCHAR textW[] = {
'o',
'n',
'e',
' ',
't',
'w',
'o',
'X',
't',
'h',
'r',
'e',
'e',0};
7138 ok(sel_start == sel_end,
"Selection should be empty\n");
7139 ok(sel_start == 4,
"Cursor is at %d instead of %d\n", sel_start, 4);
7144 ok(sel_start == sel_end,
"Selection should be empty\n");
7145 ok(sel_start == 9,
"Cursor is at %d instead of %d\n", sel_start, 9);
7150 ok(sel_start == sel_end,
"Selection should be empty\n");
7151 ok(sel_start == 4,
"Cursor is at %d instead of %d\n", sel_start, 4);
7156 ok(sel_start == sel_end,
"Selection should be empty\n");
7157 ok(sel_start == 0,
"Cursor is at %d instead of %d\n", sel_start, 0);
7164 ok(sel_start == sel_end,
"Selection should be empty\n");
7165 ok(sel_start == 9,
"Cursor is at %d instead of %d\n", sel_start, 9);
7172 ok(sel_start == sel_end,
"Selection should be empty\n");
7173 ok(sel_start == 9,
"Cursor is at %d instead of %d\n", sel_start, 9);
7183 ok(sel_start == sel_end,
"Selection should be empty\n");
7184 ok(sel_start == 8,
"Cursor is at %d instead of %d\n", sel_start, 8);
7203 ok(sel_start == sel_end,
"Selection should be empty\n");
7204 ok(sel_start == 8,
"Cursor is at %d instead of %d\n", sel_start, 8);
7221 (
LPARAM)
"one two three four five six seven\reight");
7226 ok(
result == 34,
"expected character index of 34 but got %d\n",
result);
7266 const char *
text =
"Must be long enough to test line wrapping";
7276 ok(
res,
"WM_SETTEXT failed.\n");
7278 ok(
pos,
"pos=%d indicating no word wrap when it is expected.\n",
pos);
7280 ok(
lines > 1,
"Line was expected to wrap (lines=%d).\n",
lines);
7284 ok(
pos,
"pos=%d indicating no word wrap when it is expected.\n",
pos);
7292 ok(
res,
"WM_SETTEXT failed.\n");
7294 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7296 ok(
lines == 1,
"Line wasn't expected to wrap (lines=%d).\n",
lines);
7300 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7307 ok(
res,
"WM_SETTEXT failed.\n");
7309 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7313 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7321 ok(
res,
"WM_SETTEXT failed.\n");
7323 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7327 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7331 ok(
res,
"EM_SETTARGETDEVICE failed (returned %d).\n",
res);
7333 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7336 ok(
res,
"EM_SETTARGETDEVICE failed (returned %d).\n",
res);
7338 ok(
pos,
"pos=%d indicating no word wrap when it is expected.\n",
pos);
7347 ok(
res,
"EM_REPLACESEL failed.\n");
7349 ok(
lines == 1,
"Line wasn't expected to wrap (lines=%d).\n",
lines);
7352 ok(
lines > 1,
"Line was expected to wrap (lines=%d).\n",
lines);
7371 ok(
ret == 1,
"EM_GETSCROLLPOS returned %d instead of 1\n",
ret);
7372 ok(
pt.y != 0,
"Didn't scroll down after replacing text.\n");
7380 ok(
ret == 1,
"EM_GETSCROLLPOS returned %d instead of 1\n",
ret);
7381 ok(
pt.y == 0,
"y scroll position is %d after clearing text.\n",
pt.y);
7437 for (
n = -3;
n <= 3;
n++)
7608 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7626 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7637 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7648 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7659 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7673 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7684 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7697 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7708 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7724 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7735 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7748 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7759 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7769 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7780 int numerator, denominator;
7790 ok(numerator == 0,
"Numerator should be initialized to 0 (got %d).\n", numerator);
7791 ok(denominator == 0,
"Denominator should be initialized to 0 (got %d).\n", denominator);
7798 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7802 ok(numerator == 110,
"incorrect numerator is %d\n", numerator);
7803 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7813 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7817 ok(numerator == 500,
"incorrect numerator is %d\n", numerator);
7818 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7827 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7831 ok(numerator == 491,
"incorrect numerator is %d\n", numerator);
7832 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7841 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7845 ok(numerator == 10,
"incorrect numerator is %d\n", numerator);
7846 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7855 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7859 ok(numerator == 19,
"incorrect numerator is %d\n", numerator);
7860 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7870 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7874 ok(numerator == 394,
"incorrect numerator is %d\n", numerator);
7875 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7880 ok(
ret ==
TRUE,
"EM_SETZOOM rejected valid values (%d).\n",
ret);
7883 ok(
ret ==
TRUE,
"EM_SETZOOM rejected valid values (%d).\n",
ret);
7886 ok(
ret ==
FALSE,
"EM_SETZOOM accepted invalid values (%d).\n",
ret);
7889 ok(numerator == 127,
"incorrect numerator is %d\n", numerator);
7890 ok(denominator == 2,
"incorrect denominator is %d\n", denominator);
7894 ok(
ret ==
FALSE,
"EM_SETZOOM accepted invalid values (%d).\n",
ret);
7898 ok(
ret ==
FALSE,
"EM_SETZOOM accepted invalid values (%d).\n",
ret);
7905 ok(numerator == 127,
"incorrect numerator is %d\n", numerator);
7906 ok(denominator == 2,
"incorrect denominator is %d\n", denominator);
7923#define test_dm_messages(wmclose, wmgetdefid, wmnextdlgctl) \
7924 ok(dm_messages.wm_close == wmclose, "expected %d WM_CLOSE message, " \
7925 "got %d\n", wmclose, dm_messages.wm_close); \
7926 ok(dm_messages.wm_getdefid == wmgetdefid, "expected %d WM_GETDIFID message, " \
7927 "got %d\n", wmgetdefid, dm_messages.wm_getdefid);\
7928 ok(dm_messages.wm_nextdlgctl == wmnextdlgctl, "expected %d WM_NEXTDLGCTL message, " \
7929 "got %d\n", wmnextdlgctl, dm_messages.wm_nextdlgctl)
7951 HWND hwRichEdit, hwParent, hwButton;
7976 ok(0 ==
r,
"expected 0, got %d\n",
r);
7978 ok(2 == lcount,
"expected 2, got %d\n", lcount);
7981 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
7984 ok(0 ==
r,
"expected 0, got %d\n",
r);
7986 ok(3 == lcount,
"expected 3, got %d\n", lcount);
7989 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
7991 ok(0 ==
r,
"expected 0, got %d\n",
r);
7993 ok(3 == lcount,
"expected 3, got %d\n", lcount);
8002 ok(0 ==
r,
"expected 0, got %d\n",
r);
8004 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8007 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
8010 ok(0 ==
r,
"expected 0, got %d\n",
r);
8012 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8024 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
8028 ok(0 ==
r,
"expected 0, got %d\n",
r);
8033 ok(0 ==
r,
"expected 0, got %d\n",
r);
8044 ok(0 ==
r,
"expected 0, got %d\n",
r);
8048 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8052 ok(0 ==
r,
"expected 0, got %d\n",
r);
8057 ok(0 ==
r,
"expected 0, got %d\n",
r);
8062 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
8067 ok(0 ==
r,
"expected 0, got %d\n",
r);
8071 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8075 ok(0 ==
r,
"expected 0, got %d\n",
r);
8080 ok(0 ==
r,
"expected 0, got %d\n",
r);
8089 ok(0 ==
r,
"expected 0, got %d\n",
r);
8093 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8104 ok(0 ==
r,
"expected 0, got %d\n",
r);
8108 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8112 ok(0 ==
r,
"expected 0, got %d\n",
r);
8117 ok(0 ==
r,
"expected 0, got %d\n",
r);
8122 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
8127 ok(0 ==
r,
"expected 0, got %d\n",
r);
8131 ok(3 == lcount,
"expected 3, got %d\n", lcount);
8135 ok(0 ==
r,
"expected 0, got %d\n",
r);
8140 ok(0 ==
r,
"expected 0, got %d\n",
r);
8149 ok(0 ==
r,
"expected 0, got %d\n",
r);
8153 ok(4 == lcount,
"expected 4, got %d\n", lcount);
8164 ok(0 ==
r,
"expected 0, got %d\n",
r);
8169 ok(0 ==
r,
"expected 0, got %d\n",
r);
8174 ok(0 ==
r,
"expected 0, got %d\n",
r);
8179 ok(0x8b ==
r,
"expected 0x8b, got 0x%x\n",
r);
8184 ok(0 ==
r,
"expected 0, got %d\n",
r);
8189 ok(0 ==
r,
"expected 0, got %d\n",
r);
8194 ok(0 ==
r,
"expected 0, got %d\n",
r);
8203 ok(0 ==
r,
"expected 0, got %d\n",
r);
8214 ok(0 ==
r,
"expected 0, got %d\n",
r);
8219 ok(0x8b ==
r,
"expected 0x8b, got 0x%x\n",
r);
8224 ok(0 ==
r,
"expected 0, got %d\n",
r);
8233 ok(0 ==
r,
"expected 0, got %d\n",
r);
8242 static const struct {
8245 } delimiter_tests[] = {
8272 wbuf[0] = delimiter_tests[
i].c;
8277 ok(
result == delimiter_tests[
i].isdelimiter,
8278 "wanted ISDELIMITER_W(0x%x) %d, got %d\n",
8279 delimiter_tests[
i].
c, delimiter_tests[
i].isdelimiter,
result);
8286 static const struct {
8289 } delimiter_tests[] = {
8305 buf[0] = delimiter_tests[
i].c;
8310 ok(
result == delimiter_tests[
i].isdelimiter,
8311 "wanted ISDELIMITER_A(0x%x) %d, got %d\n",
8312 delimiter_tests[
i].
c, delimiter_tests[
i].isdelimiter,
result);
8335 static const struct {
8336 const char *initialtext;
8338 const char *expectedwmtext;
8339 const char *expectedemtext;
8340 const char *expectedemtextcrlf;
8341 } testenteritems[] = {
8342 {
"aaabbb\r\n", 3,
"aaa\r\nbbb\r\n",
"aaa\rbbb\r",
"aaa\r\nbbb\r\n"},
8343 {
"aaabbb\r\n", 6,
"aaabbb\r\n\r\n",
"aaabbb\r\r",
"aaabbb\r\n\r\n"},
8344 {
"aa\rabbb\r\n", 7,
"aa\r\nabbb\r\n\r\n",
"aa\rabbb\r\r",
"aa\r\nabbb\r\n\r\n"},
8345 {
"aa\rabbb\r\n", 3,
"aa\r\n\r\nabbb\r\n",
"aa\r\rabbb\r",
"aa\r\n\r\nabbb\r\n"},
8346 {
"aa\rabbb\r\n", 2,
"aa\r\n\r\nabbb\r\n",
"aa\r\rabbb\r",
"aa\r\n\r\nabbb\r\n"}
8349 char expectedbuf[1024];
8350 char resultbuf[1024];
8353 char buf[1024] = {0};
8362 ok (
result == 1,
"[%d] WM_SETTEXT returned %ld instead of 1\n",
i,
result);
8371 expected = testenteritems[
i].expectedwmtext;
8378 "[%d] WM_GETTEXT unexpected '%s' expected '%s'\n",
8379 i, resultbuf, expectedbuf);
8386 expected = testenteritems[
i].expectedemtext;
8393 "[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n",
8394 i, resultbuf, expectedbuf);
8398 getText.codepage =
CP_ACP;
8401 expected = testenteritems[
i].expectedemtextcrlf;
8408 "[%d] EM_GETTEXTEX, GT_USECRLF unexpected '%s', expected '%s'\n",
8409 i, resultbuf, expectedbuf);
8417 ok (
result == 1,
"[%d] WM_SETTEXT returned %ld instead of 1\n",
i,
result);
8426 ok (
result == 0,
"[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n",
i, resultbuf, expectedbuf);
8429 ok (
result == 1,
"[%d] WM_SETTEXT returned %ld instead of 1\n",
i,
result);
8438 ok (
result == 0,
"[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n",
i, resultbuf, expectedbuf);
8445 static const WCHAR titleW[] = {
'l',
'i',
'n',
'e',
'1',
'\n',
'l',
'i',
'n',
'e',
'2',0};
8446 static const char title[] =
"line1\nline2";
8458 ok(
len == 5,
"GetWindowText returned %d\n",
len);
8462 ok(
res == 0,
"SendMessage(EM_GETSEL) returned %lx\n",
res);
8471 ok(
len == 12,
"GetWindowText returned %d\n",
len);
8475 ok(
res == 0,
"SendMessage(EM_GETSEL) returned %lx\n",
res);
8488 WORD def_align, new_align;
8494 def_align =
fmt.wAlignment;
8501 fmt.wAlignment = new_align;
8505 ok(
fmt.wAlignment == new_align,
"got %d expect %d\n",
fmt.wAlignment, new_align );
8511 ok(
fmt.wAlignment == def_align,
"got %d expect %d\n",
fmt.wAlignment, def_align );
8523 ok(
res == 1,
"EM_SETREADONLY\n");
8525 ok(dwStyle &
ES_READONLY,
"got wrong value: 0x%x\n", dwStyle);
8528 ok(
res == 1,
"EM_SETREADONLY\n");
8530 ok(!(dwStyle &
ES_READONLY),
"got wrong value: 0x%x\n", dwStyle);
8540#define TEST_EM_SETFONTSIZE(hwnd,size,expected_size,expected_res,expected_undo) \
8541 _test_font_size(__LINE__,hwnd,size,expected_size,expected_res,expected_undo)
8549 cf.cbSize =
sizeof(
cf);
8555 ok_(__FILE__,
line)(
res == expected_res,
"EM_SETFONTSIZE unexpected return value: %lx.\n",
res);
8556 ok_(__FILE__,
line)(
twips2points(
cf.yHeight) == expected_size,
"got wrong font size: %d, expected: %d\n",
8558 ok_(__FILE__,
line)(isundo == expected_undo,
"get wrong undo mark: %d, expected: %d.\n",
8559 isundo, expected_undo);
8569 tmp_cf.
cbSize =
sizeof(tmp_cf);
8581 ok(default_size == 9,
"Default font size should not be changed.\n");
8638 const char * streamtext =
8639 "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n"
8640 "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n"
8647 DWORD dwStyle, new_align;
8650 memset(&pf, 0,
sizeof(pf));
8655 ok(pf.wAlignment == align_mask[
i],
"(i = %d) got %d expected %d\n",
8656 i, pf.wAlignment, align_mask[
i]);
8658 ok((
i ? (dwStyle & align_style[
i]) : (!(dwStyle & 0x0000000f))) ,
8659 "(i = %d) didn't set right align style: 0x%x\n",
i, dwStyle);
8668 pf.wAlignment = new_align;
8672 ok(pf.wAlignment == new_align,
"got %d expect %d\n", pf.wAlignment, new_align);
8678 ok(pf.wAlignment == align_mask[
i],
"got %d expect %d\n", pf.wAlignment, align_mask[
i]);
8682 pf.cTabCount = -25000;
8684 ok(pf.cTabCount == -25000,
"Got %d\n", pf.cTabCount);
8686 ok(pf.cTabCount == 0,
"Got %d\n", pf.cTabCount);
8688 pf.cTabCount = 25000;
8690 ok(pf.cTabCount == 25000,
"Got %d\n", pf.cTabCount);
8692 ok(pf.cTabCount == 32,
"Got %d\n", pf.cTabCount);
8697 ok(pf.cTabCount == 32,
"Got %d\n", pf.cTabCount);
8702 ok(pf.cTabCount == 32,
"Got %d\n", pf.cTabCount);
8707 ok(pf.cTabCount == 1,
"Got %d\n", pf.cTabCount);
8720 memset(&pf, 0,
sizeof(pf));
8731 static const char text1[] =
"aaa\r\nbbb\r\nccc\r\nddd\r\neee";
8732 static const char text2[] =
"aaa\r\nbbb\r\nccc\r\nddd\r\neee\r\n";
8733 static const char text3[] =
"abcdef\x8e\xf0";
8738 ok(
result ==
lstrlenA(text1),
"WM_GETTEXTLENGTH returned %d, expected %d\n",
8743 ok(
result ==
lstrlenA(text2),
"WM_GETTEXTLENGTH returned %d, expected %d\n",
8748 skip(
"Skip multibyte character tests on non-Japanese platform\n");
8761 const char *specials =
"{\\rtf1\\emspace\\enspace\\bullet\\lquote"
8762 "\\rquote\\ldblquote\\rdblquote\\ltrmark\\rtlmark\\zwj\\zwnj}";
8763 const WCHAR expect_specials[] = {
' ',
' ',0x2022,0x2018,0x2019,0x201c,
8764 0x201d,0x200e,0x200f,0x200d,0x200c};
8765 const char *pard =
"{\\rtf1 ABC\\rtlpar\\par DEF\\par HIJ\\pard\\par}";
8766 const char *highlight =
"{\\rtf1{\\colortbl;\\red0\\green0\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}\\cf2\\highlight3 foo\\par}";
8792 fmt.cbSize =
sizeof(
fmt);
8812 cf.cbSize =
sizeof(
cf);
8815 ok(
cf.crTextColor ==
RGB(128,128,128),
"got %08x\n",
cf.crTextColor );
8816 ok(
cf.crBackColor ==
RGB(192,192,192),
"got %08x\n",
cf.crBackColor );
8836 const char *rtf =
"{\\rtf1{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}{\\f1\\fnil\\fcharset2 Symbol;}}"
8837 "{\\fs10{\\pard\\fs16\\fi200\\li360\\f0 First\\par"
8838 "\\f0\\fs25 Second\\par"
8839 "{\\f0\\fs26 Third}\\par"
8840 "{\\f0\\fs22 Fourth}\\par}}}";
8843 int i,
num, expect_height;
8851 for (
i = 0;
i <=
num;
i++)
8854 cf.cbSize =
sizeof(
cf);
8858 if (
i < 6) expect_height = 160;
8859 else if (
i < 13) expect_height = 250;
8860 else if (
i < 18) expect_height = 260;
8861 else if (
i == 18 ||
i == 25) expect_height = 250;
8862 else expect_height = 220;
8863 ok(
cf.yHeight == expect_height,
"%d: got %d\n",
i,
cf.yHeight );
8872 const char *numbers =
"{\\rtf1{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}{\\f1\\fnil\\fcharset2 Symbol;}}"
8873 "\\pard{\\pntext\\f0 3.\\tab}{\\*\\pn\\pnlvlbody\\pnfs32\\pnf0\\pnindent1000\\pnstart2\\pndec{\\pntxta.}}"
8874 "\\fs20\\fi200\\li360\\f0 First\\par"
8875 "{\\pntext\\f0 4.\\tab}\\f0 Second\\par"
8876 "{\\pntext\\f0 6.\\tab}\\f0 Third\\par}";
8877 const WCHAR expect_numbers_txt[] = {
'F',
'i',
'r',
's',
't',
'\r',
'S',
'e',
'c',
'o',
'n',
'd',
'\r',
'T',
'h',
'i',
'r',
'd',0};
8903 fmt.cbSize =
sizeof(
fmt);
8907 ok(
fmt.wNumberingStart == 2,
"got %d\n",
fmt.wNumberingStart );
8909 ok(
fmt.wNumberingTab == 1000,
"got %d\n",
fmt.wNumberingTab );
8910 ok(
fmt.dxStartIndent == 560,
"got %d\n",
fmt.dxStartIndent );
8911 ok(
fmt.dxOffset == -200,
"got %d\n",
fmt.dxOffset );
8915 memset( &fmt2, 0,
sizeof(fmt2) );
8916 fmt2.
cbSize =
sizeof(fmt2);
8923 cf.cbSize =
sizeof(
cf);
8926 ok(
cf.yHeight == 200,
"got %d\n",
cf.yHeight );
8929 cf.cbSize =
sizeof(
cf);
8932 ok(
cf.yHeight == 200,
"got %d\n",
cf.yHeight );
8958 static const char text1[] =
"abcdefg\n";
8980 hr = IRichEditOle_GetClientSite(reole, &clientsite);
8981 ok(
hr ==
S_OK,
"IRichEditOle_GetClientSite failed: 0x%08x\n",
hr);
8983 DVASPECT_CONTENT, 0, 1);
8984 hr = IRichEditOle_InsertObject(reole, &reo1);
8985 ok(
hr ==
S_OK,
"IRichEditOle_InsertObject failed: 0x%08x\n",
hr);
8986 IOleClientSite_Release(clientsite);
9001 hr = IRichEditOle_GetClientSite(reole, &clientsite);
9002 ok(
hr ==
S_OK,
"IRichEditOle_GetClientSite failed: 0x%08x\n",
hr);
9004 DVASPECT_CONTENT, 0, 2);
9005 hr = IRichEditOle_InsertObject(reole, &reo2);
9006 ok(
hr ==
S_OK,
"IRichEditOle_InsertObject failed: 0x%08x\n",
hr);
9007 IOleClientSite_Release(clientsite);
9021 IRichEditOle_Release(reole);
9033 {
"RichEdit",
FALSE },
9034 {
"RichEdit20A",
TRUE },
9035 {
"RichEdit20W",
TRUE },
9036 {
"RichEdit50A",
FALSE },
9037 {
"RichEdit50W",
FALSE }
9042 for (
i = 0;
i <
sizeof(
test)/
sizeof(
test[0]);
i++)
9045 hwnd =
CreateWindowExA(0,
test[
i].
class,
NULL,
WS_POPUP, 0, 0, 0, 0, 0, 0, 0,
NULL);
9137 if (
getenv(
"WINETEST_RICHED20" )) {
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
static unsigned char bytes[4]
static const char * wine_dbgstr_rect(const RECT *prc)
void user(int argc, const char *argv[])
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTickCount(VOID)
LANGID WINAPI GetSystemDefaultLangID(void)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
LCID WINAPI GetSystemDefaultLCID(void)
HRESULT WINAPI OleFlushClipboard(void)
static WCHAR * get_text(const ME_Run *run, int offset)
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static const WCHAR titleW[]
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static const char textA[]
static const WCHAR textW[]
static const WCHAR desc[]
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static HMODULE MODULEINFO DWORD cb
#define todo_wine_if(is_todo)
static unsigned int recursionLevel
static struct dialog_mode_messages dm_messages
static void test_EM_SELECTIONTYPE(void)
static void test_EM_FORMATRANGE(void)
static CHAR string2[MAX_PATH]
static DWORD CALLBACK test_EM_STREAMIN_esCallback_UTF8Split(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
#define expect_empty(hwnd, wm_get_text)
static LRESULT WINAPI WM_NOTIFY_ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void test_SETPARAFORMAT(void)
static void simulate_typing_characters(HWND hwnd, const char *szChars)
static LRESULT WINAPI EN_LINK_ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static LRESULT CALLBACK dialog_mode_wnd_proc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
static void test_WM_PASTE(void)
static DWORD CALLBACK test_EM_STREAMIN_null_bytes(DWORD_PTR cookie, BYTE *buf, LONG size, LONG *written)
static void test_EM_EXSETSEL(void)
static void test_EM_GETSELTEXT(void)
static void check_CFE_LINK_rcvd(HWND hwnd, BOOL is_url, const char *url)
static void test_WM_GETTEXT(void)
static void fill_reobject_struct(REOBJECT *reobj, LONG cp, LPOLEOBJECT poleobj, LPSTORAGE pstg, LPOLECLIENTSITE polesite, LONG sizel_cx, LONG sizel_cy, DWORD aspect, DWORD flags, DWORD user)
static void test_EM_StreamIn_Undo(void)
#define test_dm_messages(wmclose, wmgetdefid, wmnextdlgctl)
static void test_EM_SETOPTIONS(void)
static HWND new_richeditW(HWND parent)
static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void test_EM_FINDWORDBREAK_W(void)
static void test_WM_SETFONT(void)
static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id)
static HMODULE hmoduleRichEdit
#define ID_RICHEDITTESTDBUTTON
static void test_undo_coalescing(void)
#define TEST_SETTEXTW(a, b)
static void test_EM_GETTEXTLENGTHEX(void)
static void format_test_result(char *target, const char *src)
static HWND new_richedit(HWND parent)
static void test_EM_STREAMOUT_FONTTBL(void)
static void test_EM_GETLINE(void)
#define DISABLE_WS_VSCROLL(hwnd)
static void test_WM_GETTEXTLENGTH(void)
#define expect_textW(hwnd, wm_get_text, txt)
static void test_EM_SCROLL(void)
static HWND new_windowW(LPCWSTR lpClassName, DWORD dwStyle, HWND parent)
static unsigned int WM_SIZE_recursionLevel
static DWORD CALLBACK test_EM_STREAMIN_esCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static int nCallbackCount
static void run_tests_EM_FINDTEXT(HWND hwnd, const char *name, struct find_s *find, int num_tests, BOOL unicode)
static void move_cursor(HWND hwnd, LONG charindex)
static WCHAR * atowstr(const char *str)
static void test_EM_GETLIMITTEXT(void)
static const struct exsetsel_s exsetsel_tests[]
#define expect_textA(hwnd, wm_get_text, txt)
static void test_EN_LINK(void)
static void test_unicode_conversions(void)
static void test_EM_STREAMIN(void)
static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id)
static BOOL check_CFE_LINK_selection(HWND hwnd, int sel_start, int sel_end)
static BOOL is_em_settextex_supported(HWND hwnd)
static void test_EM_STREAMOUT(void)
static BOOL hold_key(int vk)
static void test_EM_AUTOURLDETECT(void)
static void test_EM_REPLACESEL(int redraw)
static LRESULT send_ctrl_key(HWND hwnd, UINT key)
static int received_WM_NOTIFY
#define ok_w3(format, szString1, szString2, szString3)
static HWND new_richedit_with_style(HWND parent, DWORD style)
static DWORD CALLBACK test_esCallback_written_1(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static void test_WM_CREATE(void)
static void test_WM_SETTEXT(void)
static void test_EM_SETCHARFORMAT(void)
static int queriedEventMask
static void test_background(void)
static BOOL is_lang_japanese
static void test_dialogmode(void)
static BOOL filter_on_WM_NOTIFY
static struct find_s find_tests2[]
static void test_EM_SETTEXTMODE(void)
static void test_format_rect(void)
static HWND hwndRichedit_WM_NOTIFY
static LRESULT WINAPI RicheditStupidOverrideProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void test_eventMask(void)
static void test_EM_LINELENGTH(void)
static struct find_s find_tests[]
static void test_scrollbar_visibility(void)
static CHAR string1[MAX_PATH]
static void keep_responsive(time_t delay_time)
static void test_EM_CHARFROMPOS(void)
static HWND eventMaskEditHwnd
static BOOL release_key(int vk)
static void test_EM_SETFONTSIZE(void)
static DWORD CALLBACK test_EM_GETMODIFY_esCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static void test_EM_SETSEL(void)
static void line_scroll(HWND hwnd, int amount)
static int modify_at_WM_NOTIFY
static void test_rtf(void)
static void check_EM_FINDTEXT(HWND hwnd, const char *name, struct find_s *f, int id, BOOL unicode)
static void test_WM_GETDLGCODE(void)
static void test_EM_SCROLLCARET(void)
static int get_scroll_pos_y(HWND hwnd)
static void test_EM_SETUNDOLIMIT(void)
static CHAR string3[MAX_PATH]
static void test_EM_STREAMOUT_empty_para(void)
static void test_EM_LIMITTEXT(void)
static void test_autoscroll(void)
static void check_EM_FINDTEXTEX(HWND hwnd, const char *name, struct find_s *f, int id, BOOL unicode)
static void test_word_wrap(void)
static void test_enter(void)
#define TEST_SETTEXT(a, b)
static void test_EM_FINDWORDBREAK_A(void)
static LONG CALLBACK customWordBreakProc(WCHAR *text, int pos, int bytes, int code)
static void test_reset_default_para_fmt(void)
static void test_window_classes(void)
static DWORD CALLBACK test_WM_SETTEXT_esCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static LONG twips2points(LONG value)
#define ENABLE_WS_VSCROLL(hwnd)
#define ITextServices_OnTxPropertyBitsChange(This, a, b)
static int count_pars(const char *buf)
#define set_textA(hwnd, wm_set_text, txt)
static void test_EM_POSFROMCHAR(void)
static DWORD CALLBACK EditStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static void test_zoom(void)
static int watchForEventMask
static HWND new_static_wnd(HWND parent)
static DWORD CALLBACK test_EM_STREAMIN_esCallback2(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
static HWND new_window(LPCSTR lpClassName, DWORD dwStyle, HWND parent)
static void test_ES_PASSWORD(void)
static const struct getline_s gl[]
static void test_EM_EXLIMITTEXT(void)
static void _test_font_size(unsigned line, HWND hwnd, LONG size, LONG expected_size, LRESULT expected_res, BOOL expected_undo)
static void link_notify_test(const char *desc, int i, HWND hwnd, HWND parent, UINT msg, WPARAM wParam, LPARAM lParam, BOOL notifies)
static BOOL bailedOutOfRecursion
static void test_WM_CHAR(void)
static void test_eop_char_fmt(void)
static void test_word_movement(void)
#define TEST_EM_SETFONTSIZE(hwnd, size, expected_size, expected_res, expected_undo)
static const char haystack[]
static void test_para_numbering(void)
#define set_textW(hwnd, wm_set_text, txt)
static void test_EM_GETTEXTRANGE(void)
static void test_alignment_style(void)
static void test_EM_SETTEXTEX(void)
static void disable_beep(HWND hwnd)
static void test_WM_NOTIFY(void)
static void test_EM_SETREADONLY(void)
static void test_TM_PLAINTEXT(void)
static void test_EM_GETMODIFY(void)
static IID * pIID_ITextServices
static void test_EM_FINDTEXT(void)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define LOCALE_SYSTEM_DEFAULT
interface IStorage * LPSTORAGE
#define WS_OVERLAPPEDWINDOW
void redraw(int x, int y, int cx, int cy)
#define CFU_UNDERLINEDOUBLE
struct _charformat CHARFORMATA
static const WCHAR RICHEDIT_CLASS20W[]
struct _charformatw CHARFORMATW
#define RICHEDIT_CLASS20A
#define ES_DISABLENOSCROLL
struct _paraformat2 PARAFORMAT2
struct _charformat2a CHARFORMAT2A
#define CFE_AUTOBACKCOLOR
#define EM_STOPGROUPTYPING
#define EM_GETTEXTLENGTHEX
#define EM_SETTARGETDEVICE
#define CFM_UNDERLINETYPE
#define CFU_UNDERLINENONE
#define EM_GETOLEINTERFACE
CHAR lfFaceName[LF_FACESIZE]
int expected_getsel_start
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
#define ERROR_CANNOT_FIND_WND_CLASS
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define OUT_DEFAULT_PRECIS
#define CLIP_DEFAULT_PRECIS
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)
BOOL WINAPI GetTextExtentPoint32A(_In_ HDC hdc, _In_reads_(c) LPCSTR lpString, _In_ int c, _Out_ LPSIZE psizl)
#define LOCALE_FONTSIGNATURE
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
#define SetWindowLongPtrA
UINT WINAPI MapVirtualKeyA(_In_ UINT, _In_ UINT)
BOOL WINAPI SetKeyboardState(_In_reads_(256) LPBYTE)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define EM_GETPASSWORDCHAR
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
#define EM_SETPASSWORDCHAR
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
#define EM_EMPTYUNDOBUFFER
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_Check_return_ BOOL WINAPI GetKeyboardState(_Out_writes_(256) PBYTE lpKeyState)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
#define EM_GETFIRSTVISIBLELINE
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI IsWindowUnicode(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define EM_SETWORDBREAKPROC
HDC WINAPI GetDC(_In_opt_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetClassInfoA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSA)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)