40#define ID_RICHEDITTESTDBUTTON 0x123
44#define ok_w3(format, szString1, szString2, szString3) \
45 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
46 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
47 WideCharToMultiByte(CP_ACP, 0, szString3, -1, string3, MAX_PATH, NULL, NULL); \
48 ok(!lstrcmpW(szString3, szString1) || !lstrcmpW(szString3, szString2), \
49 format, string1, string2, string3);
108 while (*szChars !=
'\0') {
111 ok(
ret == 0,
"WM_CHAR('%c') ret=%d\n", *szChars,
ret);
123 ok(
result,
"GetKeyboardState failed.\n");
125 key_state[
vk] |= 0x80;
127 ok(
result,
"SetKeyboardState failed.\n");
137 ok(
result,
"GetKeyboardState failed.\n");
139 key_state[
vk] &= ~0x80;
141 ok(
result,
"SetKeyboardState failed.\n");
145static const char haystack[] =
"WINEWine wineWine wine WineWine";
160 {0, -1,
"foo", 0, -1},
190 {20, 5,
"Wine", 0, 13},
209 {-20, 20,
"Wine",
FR_DOWN, -1},
210 {-20, 20,
"Wine",
FR_DOWN, -1},
211 {-15, -20,
"Wine",
FR_DOWN, -1},
212 {1<<12, 1<<13,
"Wine",
FR_DOWN, -1},
226 {0, -1,
"wineWine wine", 0, -1},
245 memset(&ftw, 0,
sizeof(ftw));
251 ok(findloc ==
f->expected_loc,
252 "EM_FINDTEXT(%s,%d,%u) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n",
253 name,
id, unicode,
f->needle,
f->start,
f->end,
f->flags, findloc,
f->expected_loc);
256 ok(findloc ==
f->expected_loc,
257 "EM_FINDTEXTW(%s,%d,%u) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n",
258 name,
id, unicode,
f->needle,
f->start,
f->end,
f->flags, findloc,
f->expected_loc);
263 memset(&fta, 0,
sizeof(fta));
269 ok(findloc ==
f->expected_loc,
270 "EM_FINDTEXT(%s,%d,%u) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n",
271 name,
id, unicode,
f->needle,
f->start,
f->end,
f->flags, findloc,
f->expected_loc);
276 int id,
BOOL unicode)
279 int expected_end_loc;
283 memset(&ftw, 0,
sizeof(ftw));
288 ok(findloc ==
f->expected_loc,
289 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
290 name,
id,
f->needle,
f->start,
f->end,
f->flags, findloc);
292 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
294 expected_end_loc = ((
f->expected_loc == -1) ? -1
295 :
f->expected_loc +
strlen(
f->needle));
297 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n",
302 memset(&fta, 0,
sizeof(fta));
307 ok(findloc ==
f->expected_loc,
308 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
309 name,
id,
f->needle,
f->start,
f->end,
f->flags, findloc);
311 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n",
313 expected_end_loc = ((
f->expected_loc == -1) ? -1
314 :
f->expected_loc +
strlen(
f->needle));
316 "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n",
379 {0, 10,
"foo bar\r"},
394 static const int nBuf = 1024;
395 char dest[1024], origdest[1024];
396 const char text[] =
"foo bar\n"
402 memset(origdest, 0xBB, nBuf);
414 ok(nCopied == expected_nCopied,
"%d: %d!=%d\n",
i, nCopied,
417 if (
gl[
i].buffer_len == 0)
420 else if (
gl[
i].buffer_len == 1)
422 !
strncmp(
dest+2, origdest+2, nBuf-2),
"buffer_len=1\n");
426 char expectedbuf[1024];
427 char resultbuf[1024];
430 for (
j = 0;
j < 32;
j++)
432 expectedbuf[0] =
'\0';
433 for (
j = 0;
j < expected_bytes_written;
j++)
435 for (;
j <
gl[
i].buffer_len;
j++)
438 sprintf(expectedbuf+
strlen(expectedbuf),
"%02x", origdest[
j] & 0xFF);
448 "%d: expected_bytes_written=%d\n" "expected=0x%s\n" "but got= 0x%s\n",
449 i, expected_bytes_written, expectedbuf, resultbuf);
453 nBuf -
gl[
i].buffer_len),
454 "%d: expected_bytes_written=%d\n" "expected=0x%s\n" "but got= 0x%s\n",
455 i, expected_bytes_written, expectedbuf, resultbuf);
470 int offset_test[10][2] = {
487 for (
i = 0;
i < 10;
i++) {
489 ok(
result == offset_test[
i][1],
"Length of line at offset %d is %ld, expected %d\n",
490 offset_test[
i][0],
result, offset_test[
i][1]);
495 skip(
"Skip multibyte character tests on non-Japanese platform\n");
502 int offset_test1[3][2] = {
510 ok(
result == offset_test1[
i][1],
"Length of line at offset %d is %ld, expected %d\n",
511 offset_test1[
i][0],
result, offset_test1[
i][1]);
522 ok(
p.x != -1 &&
p.y != -1,
"p.x:%d p.y:%d\n",
p.x,
p.y);
529 cr.
cpMax = charindex;
530 cr.
cpMin = charindex;
542 const char text[] =
"aa\n"
543 "this is a long line of text that should be longer than the "
570 ok(prevY != curY,
"%d == %d\n", prevY, curY);
578 ok(prevY != curY,
"%d == %d\n", prevY, curY);
585 ok(prevY == curY,
"%d != %d\n", prevY, curY);
592 ok(prevY == curY,
"%d != %d\n", prevY, curY);
608 static const char text[] =
"aa\n"
609 "this is a long line of text that should be longer than the "
620 (sig.
lsUsb[3] & 0x08000000) != 0);
623 for (
i = 0;
i < 50;
i++)
642 for (
i = 0;
i < 50;
i++)
679 for (
i = 0;
i < 50;
i++)
684 "EM_POSFROMCHAR reports y=%hd, expected %d\n",
713 "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n",
721 ok(
pt.x > 1,
"pt.x = %d\n",
pt.x);
725 ok(
pt.x > xpos,
"pt.x = %d\n",
pt.x);
726 xpos = (
rtl ?
pt.x + 7 :
pt.x);
729 ok(
pt.x == xpos,
"pt.x = %d\n",
pt.x);
733 ok(
pt.x == 1,
"pt.x = %d\n",
pt.x);
737 (
LPARAM)
"{\\rtf1\\pard\\fi-200\\li-200\\f1 TestSomeText\\par}");
739 ok(
pt.x == 1,
"pt.x = %d\n",
pt.x);
743 ok(
fmt.dxStartIndent == -400,
"got %d\n",
fmt.dxStartIndent);
744 ok(
fmt.dxOffset == 200,
"got %d\n",
fmt.dxOffset);
758 int tested_effects[] = {
773 DWORD expect_effects;
777 (sig.
lsUsb[3] & 0x08000000) != 0);
796 memset(&cf2, 0,
sizeof(cf2));
798 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
801 memset(&cf2, 0,
sizeof(cf2));
803 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
806 memset(&cf2, 0,
sizeof(cf2));
808 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
811 memset(&cf2, 0,
sizeof(cf2));
813 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
816 memset(&cf2, 0,
sizeof(cf2));
818 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
821 memset(&cf2, 0,
sizeof(cf2));
824 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
826 ok(rc ==
FALSE,
"Should not be able to undo here.\n");
830 memset(&cf2, 0,
sizeof(cf2));
833 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
835 ok(rc ==
FALSE,
"Should not be able to undo here.\n");
839 memset(&cf2, 0,
sizeof(cf2));
842 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
844 ok(rc ==
FALSE,
"Should not be able to undo here.\n");
848 memset(&cf2, 0,
sizeof(cf2));
851 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
857 memset(&cf2, 0,
sizeof(cf2));
860 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
862 ok(rc ==
TRUE,
"Should not be able to undo here.\n");
877 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
879 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
883 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
886 skip(
"RTL language found\n");
891 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
893 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
895 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
899 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
901 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
903 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
906 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
908 ok(rc == -1,
"Text not marked as modified, expected modified! (%d)\n", rc);
913 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
915 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
917 ok(rc == -1,
"Text not marked as modified, expected modified! (%d)\n", rc);
922 for (
i = 0; tested_effects[
i];
i++)
943 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
944 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
945 ok((cf2.dwEffects & tested_effects[
i]) == 0,
946 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n",
i, cf2.dwEffects, tested_effects[
i]);
950 cf2.dwMask = tested_effects[
i];
953 cf2.dwEffects = tested_effects[
i];
964 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
965 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
966 ok((cf2.dwEffects & tested_effects[
i]) == tested_effects[
i],
967 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n",
i, cf2.dwEffects, tested_effects[
i]);
976 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
977 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
978 ok((cf2.dwEffects & tested_effects[
i]) == 0,
979 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n",
i, cf2.dwEffects, tested_effects[
i]);
988 (cf2.dwMask & tested_effects[
i]) == 0),
989 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n",
i, cf2.dwMask, tested_effects[
i]);
994 for (
i = 0; tested_effects[
i];
i++)
1010 cf2.dwMask = tested_effects[
i];
1013 cf2.dwEffects = tested_effects[
i];
1024 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
1025 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
1026 ok((cf2.dwEffects & tested_effects[
i]) == 0,
1027 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n",
i, cf2.dwEffects, tested_effects[
i]);
1036 (cf2.dwMask & tested_effects[
i]) == tested_effects[
i]),
1037 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.dwMask, tested_effects[
i]);
1038 ok((cf2.dwEffects & tested_effects[
i]) == tested_effects[
i],
1039 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n",
i, cf2.dwEffects, tested_effects[
i]);
1048 (cf2.dwMask & tested_effects[
i]) == 0),
1049 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n",
i, cf2.dwMask, tested_effects[
i]);
1050 ok((cf2.dwEffects & tested_effects[
i]) == tested_effects[
i],
1051 "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x set\n",
i, cf2.dwEffects, tested_effects[
i]);
1077 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1147 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1182 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1184 "%d, cf2.dwEffects == 0x%08x not expecting effect 0x%08x\n",
i, cf2.
dwEffects,
CFE_BOLD);
1219 "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n",
i, cf2.
dwMask,
CFM_BOLD);
1224 memset(&cf2, 0,
sizeof(cf2));
1225 cf2.
cbSize =
sizeof(cf2);
1229 memset(&cf2, 0,
sizeof(cf2));
1230 cf2.
cbSize =
sizeof(cf2);
1234 memset(&cf2, 0,
sizeof(cf2));
1235 cf2.
cbSize =
sizeof(cf2);
1239 memset(&cf2, 0,
sizeof(cf2));
1240 cf2.
cbSize =
sizeof(cf2);
1245 memset(&cfW, 0,
sizeof(cfW));
1246 cfW.
cbSize =
sizeof(cfW);
1250 memset(&cfW, 0,
sizeof(cfW));
1251 cfW.
cbSize =
sizeof(cfW);
1255 memset(&cfW, 0,
sizeof(cfW));
1256 cfW.
cbSize =
sizeof(cfW);
1260 memset(&cfW, 0,
sizeof(cfW));
1261 cfW.
cbSize =
sizeof(cfW);
1279 "got %08x\n", cf2.
dwMask);
1291 "got %08x\n", cf2.
dwMask);
1303 "got %08x\n", cf2.
dwMask);
1315 "got %08x\n", cf2.
dwMask);
1328 "got %08x\n", cf2.
dwMask);
1340 "got %08x\n", cf2.
dwMask);
1374 "EM_SETTEXTMODE: using mutually exclusive mode flags - returned: %x\n", rc);
1384 "EM_SETTEXTMODE: changed text mode in control containing text - returned: %x\n", rc);
1401 ok(rc == 0,
"Text marked as modified, expected not modified!\n");
1406 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1409 ok(rc == -1,
"Text not marked as modified, expected modified! (%d)\n", rc);
1424 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1431 ok(rc == 0,
"EM_SETTEXTMODE: unable to switch to plain text mode with empty control: returned: %d\n", rc);
1458 "two formats found in plain text mode - cf2.dwEffects: %x cf2test.dwEffects: %x\n",
1467 ok(rc != 0,
"EM_SETTEXTMODE: changed from plain text to rich text with text in control - returned: %d\n", rc);
1474 ok(rc == 0,
"EM_SETTEXTMODE: unable to change to rich text with empty control - returned: %d\n", rc);
1500 "expected different formats - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n",
1517 ok(
ret != 0,
"expected non-zero got %d\n",
ret);
1525 ret &= ~PFM_TABLEROWDELIMITER;
1526 fmt.dwMask &= ~PFM_TABLEROWDELIMITER;
1528 ok(
ret == expectedMask,
"expected %x got %x\n", expectedMask,
ret);
1529 ok(
fmt.dwMask == expectedMask,
"expected %x got %x\n", expectedMask,
fmt.dwMask);
1532 ok(
fmt.wNumbering == 0,
"got %d\n",
fmt.wNumbering );
1533 ok(
fmt.wNumberingStart == 0,
"got %d\n",
fmt.wNumberingStart );
1534 ok(
fmt.wNumberingStyle == 0,
"got %04x\n",
fmt.wNumberingStyle );
1535 ok(
fmt.wNumberingTab == 0,
"got %d\n",
fmt.wNumberingTab );
1570 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
1573 ok(rc == 0,
"EM_SETCHARFORMAT returned %d instead of 0\n", rc);
1576 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1592 "two selections' formats differ - cf2.dwMask: %x, cf2test.dwMask %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n",
1617 ok(rc == 1,
"EM_SETCHARFORMAT returned %d instead of 1\n", rc);
1645 "Copied text retained formatting - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n",
1653 static const char text[] =
"Hello. My name is RichEdit!";
1654 static const char text2[] =
"Hello. My name is RichEdit!\r";
1655 static const char text2_after[] =
"Hello. My name is RichEdit!\r\n";
1667 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1672 "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n",
1685 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1694 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1699 "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n",
1707 "WM_GETTEXT returned %d, expected 0 or %d\n",
result,
lstrlenA(text2) - 1);
1712 "WM_GETTEXT: settext and gettext differ. strcmp: %d\n",
result);
1720 const char * text1 =
"foo bar\r\nfoo bar";
1721 const char * text2 =
"foo bar\rfoo bar";
1722 const char *
expect =
"bar\rfoo";
1787 skip(
"Skip multibyte character tests on non-Japanese platform\n");
1804 const char * text1 =
"foo bar\r\nfoo bar";
1805 const char * text2 =
"foo bar\rfoo bar";
1806 const char *
expect =
"bar\rfoo";
1826 skip(
"Skip multibyte character tests on non-Japanese platform\n");
1843 static const char text[] =
"Hello. My name is RichEdit!";
1854 ok(hwndRichEdit !=
NULL,
"class: %s, error: %d\n",
1864 ok(hwndRichEdit !=
NULL,
"class: %s, error: %d\n",
1869 "Incorrect initial options %x\n",
options);
1879 "EM_SETOPTIONS: Text not changed! s1:%s s2:%s\n",
text,
buffer);
1888 "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n",
text,
buffer);
1893 ok(dwStyle &
ES_READONLY,
"Readonly style not set by EM_SETOPTIONS\n");
1901 "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n",
text,
buffer);
1907 "Options set by SetWindowLong (%x -> %x)\n", oldOptions,
options);
1915 text_format.
cbSize =
sizeof(text_format);
1928 ok(link_present,
"URL Case: CFE_LINK not set for [%s].\n",
url);
1932 ok(!link_present,
"Non-URL Case: CFE_LINK set for [%s].\n",
url);
1949 {
"winehq.org",
FALSE},
1950 {
"http://www.winehq.org",
TRUE},
1951 {
"http//winehq.org",
FALSE},
1952 {
"ww.winehq.org",
FALSE},
1953 {
"www.winehq.org",
TRUE},
1954 {
"ftp://192.168.1.1",
TRUE},
1955 {
"ftp//192.168.1.1",
FALSE},
1956 {
"mailto:your@email.com",
TRUE},
1957 {
"prospero:prosperoserver",
TRUE},
1958 {
"telnet:test",
TRUE},
1959 {
"news:newserver",
TRUE},
1960 {
"wais:waisserver",
TRUE}
1968 const char * templates_delim[] = {
1969 "This is some text with X on it",
1970 "This is some text with (X) on it",
1971 "This is some text with X\r on it",
1972 "This is some text with ---X--- on it",
1973 "This is some text with \"X\" on it",
1974 "This is some text with 'X' on it",
1975 "This is some text with 'X' on it",
1976 "This is some text with :X: on it",
1978 "This text ends with X",
1980 "This is some text with X) on it",
1981 "This is some text with X--- on it",
1982 "This is some text with X\" on it",
1983 "This is some text with X' on it",
1984 "This is some text with X: on it",
1986 "This is some text with (X on it",
1987 "This is some text with \rX on it",
1988 "This is some text with ---X on it",
1989 "This is some text with \"X on it",
1990 "This is some text with 'X on it",
1991 "This is some text with :X on it",
1994 const char * templates_non_delim[] = {
1995 "This is some text with |X| on it",
1996 "This is some text with *X* on it",
1997 "This is some text with /X/ on it",
1998 "This is some text with +X+ on it",
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@ 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",
2007 "This is some text with %X on it",
2008 "This is some text with #X on it",
2009 "This is some text with @X on it",
2010 "This is some text with \\X on it",
2011 "This is some text with _X on it",
2016 const char * templates_xten_delim[] = {
2017 "This is some text with X| 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",
2022 "This is some text with X# on it",
2023 "This is some text with X@ on it",
2024 "This is some text with X\\ on it",
2025 "This is some text with X_ on it",
2033 const char * templates_neutral_delim[] = {
2034 "This is some text with X-Y on it",
2035 "This is some text with X--Y on it",
2036 "This is some text with X!Y on it",
2037 "This is some text with X[Y on it",
2038 "This is some text with X]Y on it",
2039 "This is some text with X{Y on it",
2040 "This is some text with X}Y on it",
2041 "This is some text with X(Y on it",
2042 "This is some text with X)Y on it",
2043 "This is some text with X\"Y on it",
2044 "This is some text with X;Y on it",
2045 "This is some text with X:Y on it",
2046 "This is some text with X'Y on it",
2047 "This is some text with X?Y on it",
2048 "This is some text with X<Y on it",
2049 "This is some text with X>Y on it",
2050 "This is some text with X.Y on it",
2051 "This is some text with X,Y on it",
2059 ok(urlRet==0,
"Good wParam: urlRet is: %d\n", urlRet);
2061 ok(urlRet==0,
"Good wParam2: urlRet is: %d\n", urlRet);
2066 ok(urlRet==
E_INVALIDARG,
"Bad wParam2: urlRet is: %d\n", urlRet);
2090 at_pos =
strchr(templates_delim[
j],
'X');
2091 at_offset = at_pos - templates_delim[
j];
2093 buffer[at_offset] =
'\0';
2104 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2106 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2108 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2113 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2115 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2120 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2122 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2124 if (
buffer[end_offset] !=
'\0')
2127 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2128 if (
buffer[end_offset +1] !=
'\0')
2131 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2141 at_pos =
strchr(templates_non_delim[
j],
'X');
2142 at_offset = at_pos - templates_non_delim[
j];
2144 buffer[at_offset] =
'\0';
2155 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2157 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2159 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2162 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2164 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2165 if (
buffer[end_offset] !=
'\0')
2168 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2169 if (
buffer[end_offset +1] !=
'\0')
2172 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2182 at_pos =
strchr(templates_xten_delim[
j],
'X');
2183 at_offset = at_pos - templates_xten_delim[
j];
2185 buffer[at_offset] =
'\0';
2196 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2198 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2200 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2205 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2207 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2209 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2214 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2216 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2218 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2220 if (
buffer[end_offset +1] !=
'\0')
2223 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset + 2,
buffer);
2224 if (
buffer[end_offset +2] !=
'\0')
2227 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3,
buffer);
2233 char * at_pos, * end_pos;
2237 if (!urls[
i].is_url)
continue;
2239 at_pos =
strchr(templates_neutral_delim[
j],
'X');
2240 at_offset = at_pos - templates_neutral_delim[
j];
2242 buffer[at_offset] =
'\0';
2247 end_offset = end_pos -
buffer;
2255 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2257 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2259 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2262 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2264 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2266 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2274 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2276 "CFE_LINK set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2278 "CFE_LINK set in (%d-%d), text: %s\n", end_offset, end_offset +1,
buffer);
2282 hwndRichEdit =
NULL;
2287 for (
i = 0;
i < 2;
i++) {
2291 for (
j = 0;
j < 3;
j++) {
2297 at_pos =
strchr(templates_delim[
j],
'X');
2298 at_offset = at_pos - templates_delim[
j];
2303 for (
u = 0; templates_delim[
j][
u];
u++) {
2304 if (templates_delim[
j][
u] ==
'\r') {
2306 }
else if (templates_delim[
j][
u] !=
'X') {
2309 for (
v = 0; urls[
i].text[
v];
v++) {
2319 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2321 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2323 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2328 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2330 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2335 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2337 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2339 if (
buffer[end_offset] !=
'\0')
2342 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2343 if (
buffer[end_offset +1] !=
'\0')
2346 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2358 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2360 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2362 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2365 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2368 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset+1,
buffer);
2369 ok(
buffer[end_offset],
"buffer \"%s\" ended prematurely. Is it missing a newline character?\n",
buffer);
2370 if (
buffer[end_offset] != 0 &&
buffer[end_offset+1] !=
'\0')
2373 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset+1, end_offset +2,
buffer);
2374 if (
buffer[end_offset +2] !=
'\0')
2377 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3,
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);
2397 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2399 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2404 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2406 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2408 if (
buffer[end_offset] !=
'\0')
2411 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2412 if (
buffer[end_offset +1] !=
'\0')
2415 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2420 hwndRichEdit =
NULL;
2425 for (
i = 0;
i < 2;
i++) {
2448 at_pos =
strchr(templates_delim[
j],
'X');
2449 at_offset = at_pos - templates_delim[
j];
2451 buffer[at_offset] =
'\0';
2462 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2464 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2466 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2471 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2473 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2478 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2480 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2482 if (
buffer[end_offset] !=
'\0')
2485 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2486 if (
buffer[end_offset +1] !=
'\0')
2489 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2500 at_pos =
strchr(templates_delim[
j],
'X');
2501 at_offset = at_pos - templates_delim[
j];
2516 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2518 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2520 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2525 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2527 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2532 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2534 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2536 if (
buffer[end_offset] !=
'\0')
2539 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2540 if (
buffer[end_offset +1] !=
'\0')
2543 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2554 at_pos =
strchr(templates_delim[
j],
'X');
2555 at_offset = at_pos - templates_delim[
j];
2575 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2577 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2579 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2584 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2586 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2591 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2593 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2595 if (
buffer[end_offset] !=
'\0')
2598 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2599 if (
buffer[end_offset +1] !=
'\0')
2602 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2608 hwndRichEdit =
NULL;
2613 for (
i = 0;
i < 2;
i++) {
2622 at_pos =
strchr(templates_delim[
j],
'X');
2623 at_offset = at_pos - templates_delim[
j];
2635 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2637 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2639 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2644 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2646 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2651 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2653 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2655 if (
buffer[end_offset] !=
'\0')
2658 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2659 if (
buffer[end_offset +1] !=
'\0')
2662 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2673 at_pos =
strchr(templates_delim[
j],
'X');
2674 at_offset = at_pos - templates_delim[
j];
2691 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1,
buffer);
2693 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1,
buffer);
2695 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset,
buffer);
2700 "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1,
buffer);
2702 "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2707 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1,
buffer);
2709 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset,
buffer);
2711 if (
buffer[end_offset] !=
'\0')
2714 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1,
buffer);
2715 if (
buffer[end_offset +1] !=
'\0')
2718 "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2,
buffer);
2724 hwndRichEdit =
NULL;
2736 int y_before, y_after;
2741 for (
i = 0;
i < 4;
i++) {
2746 ok(
expr ==
r,
"EM_SCROLL improper return value returned (i == %d). "
2747 "Got 0x%08x, expected 0x%08x\n",
i,
r,
expr);
2748 ok(y_after == 0,
"EM_SCROLL improper scroll. scrolled to line %d, not 1 "
2749 "(i == %d)\n", y_after,
i);
2757 for (
i = 0;
i < 2;
i++) {
2762 "a LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE "
2763 "LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE "
2764 "LONG LINE \nb\nc\nd\ne");
2765 for (
j = 0;
j < 12;
j++)
2775 ok(((
r & 0xffffff00) == 0x00010000) &&
2776 ((
r & 0x000000ff) != 0x00000000),
2777 "EM_SCROLL page down didn't scroll by a small positive number of "
2778 "lines (r == 0x%08x)\n",
r);
2779 ok(y_after > y_before,
"EM_SCROLL page down not functioning "
2780 "(line %d scrolled to line %d\n", y_before, y_after);
2786 ok(((
r & 0xffffff00) == 0x0001ff00),
2787 "EM_SCROLL page up didn't scroll by a small negative number of lines "
2788 "(r == 0x%08x)\n",
r);
2789 ok(y_after < y_before,
"EM_SCROLL page up not functioning (line "
2790 "%d scrolled to line %d\n", y_before, y_after);
2798 ok(
r == 0x00010001,
"EM_SCROLL line down didn't scroll by one line "
2799 "(r == 0x%08x)\n",
r);
2800 ok(y_after -1 == y_before,
"EM_SCROLL line down didn't go down by "
2801 "1 line (%d scrolled to %d)\n", y_before, y_after);
2809 ok(
r == 0x0001ffff,
"EM_SCROLL line up didn't scroll by one line "
2810 "(r == 0x%08x)\n",
r);
2811 ok(y_after +1 == y_before,
"EM_SCROLL line up didn't go up by 1 "
2812 "line (%d scrolled to %d)\n", y_before, y_after);
2822 "EM_SCROLL line up returned indicating movement (0x%08x)\n",
r);
2823 ok(y_before == y_after,
2824 "EM_SCROLL line up beyond top worked (%d)\n", y_after);
2834 "EM_SCROLL page up returned indicating movement (0x%08x)\n",
r);
2835 ok(y_before == y_after,
2836 "EM_SCROLL page up beyond top worked (%d)\n", y_after);
2838 for (
j = 0;
j < 12;
j++)
2846 "EM_SCROLL page down returned indicating movement (0x%08x)\n",
r);
2847 ok(y_before == y_after,
2848 "EM_SCROLL page down beyond bottom worked (%d -> %d)\n",
2856 "EM_SCROLL line down returned indicating movement (0x%08x)\n",
r);
2857 ok(y_before == y_after,
2858 "EM_SCROLL line down beyond bottom worked (%d -> %d)\n",
2899 const char *
text=
"a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n";
2915 memset(&si, 0,
sizeof(si));
2920 "Vertical scrollbar is visible, should be invisible.\n");
2922 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
2926 memset(&si, 0,
sizeof(si));
2931 "Vertical scrollbar is visible, should be invisible.\n");
2933 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
2937 memset(&si, 0,
sizeof(si));
2942 "Vertical scrollbar is invisible, should be visible.\n");
2944 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2950 memset(&si, 0,
sizeof(si));
2955 "Vertical scrollbar is visible, should be invisible.\n");
2957 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2962 memset(&si, 0,
sizeof(si));
2967 "Vertical scrollbar is visible, should be invisible.\n");
2969 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2973 memset(&si, 0,
sizeof(si));
2978 "Vertical scrollbar is visible, should be invisible.\n");
2980 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2984 memset(&si, 0,
sizeof(si));
2989 "Vertical scrollbar is visible, should be invisible.\n");
2991 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
2995 memset(&si, 0,
sizeof(si));
3000 "Vertical scrollbar is visible, should be invisible.\n");
3002 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3011 memset(&si, 0,
sizeof(si));
3016 "Vertical scrollbar is invisible, should be visible.\n");
3018 "reported page/range is %d (%d..%d) expected 0 (0..1)\n",
3022 memset(&si, 0,
sizeof(si));
3027 "Vertical scrollbar is invisible, should be visible.\n");
3029 "reported page/range is %d (%d..%d) expected 0 (0..1)\n",
3033 memset(&si, 0,
sizeof(si));
3038 "Vertical scrollbar is invisible, should be visible.\n");
3040 "reported page/range is %d (%d..%d)\n",
3045 memset(&si, 0,
sizeof(si));
3050 "Vertical scrollbar is invisible, should be visible.\n");
3052 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3057 memset(&si, 0,
sizeof(si));
3062 "Vertical scrollbar is invisible, should be visible.\n");
3064 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3068 memset(&si, 0,
sizeof(si));
3073 "Vertical scrollbar is invisible, should be visible.\n");
3075 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3079 memset(&si, 0,
sizeof(si));
3084 "Vertical scrollbar is invisible, should be visible.\n");
3086 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3090 memset(&si, 0,
sizeof(si));
3095 "Vertical scrollbar is invisible, should be visible.\n");
3097 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3107 memset(&si, 0,
sizeof(si));
3112 "Vertical scrollbar is invisible, should be visible.\n");
3115 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3121 memset(&si, 0,
sizeof(si));
3126 "Vertical scrollbar is invisible, should be visible.\n");
3129 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3135 memset(&si, 0,
sizeof(si));
3140 "Vertical scrollbar is invisible, should be visible.\n");
3143 "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");
3157 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3163 memset(&si, 0,
sizeof(si));
3168 "Vertical scrollbar is invisible, should be visible.\n");
3171 "reported page/range is %d (%d..%d) expected 0 (0..100)\n",
3177 memset(&si, 0,
sizeof(si));
3182 "Vertical scrollbar is visible, should be invisible.\n");
3184 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3192 memset(&si, 0,
sizeof(si));
3197 "Vertical scrollbar is visible, should be invisible.\n");
3199 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3203 memset(&si, 0,
sizeof(si));
3208 "Vertical scrollbar is visible, should be invisible.\n");
3210 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3214 memset(&si, 0,
sizeof(si));
3219 "Vertical scrollbar is visible, should be invisible.\n");
3221 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3225 memset(&si, 0,
sizeof(si));
3230 "Vertical scrollbar is visible, should be invisible.\n");
3232 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3236 memset(&si, 0,
sizeof(si));
3241 "Vertical scrollbar is invisible, should be visible.\n");
3243 "reported page/range is %d (%d..%d)\n",
3248 memset(&si, 0,
sizeof(si));
3253 "Vertical scrollbar is visible, should be invisible.\n");
3255 "reported page/range is %d (%d..%d)\n",
3259 memset(&si, 0,
sizeof(si));
3264 "Vertical scrollbar is visible, should be invisible.\n");
3266 "reported page/range is %d (%d..%d)\n",
3272 memset(&si, 0,
sizeof(si));
3277 "Vertical scrollbar is invisible, should be visible.\n");
3279 "reported page/range is %d (%d..%d)\n",
3283 memset(&si, 0,
sizeof(si));
3288 "Vertical scrollbar is visible, should be invisible.\n");
3290 "reported page/range is %d (%d..%d)\n",
3295 memset(&si, 0,
sizeof(si));
3300 "Vertical scrollbar is invisible, should be visible.\n");
3302 "reported page/range is %d (%d..%d)\n",
3306 memset(&si, 0,
sizeof(si));
3311 "Vertical scrollbar is visible, should be invisible.\n");
3313 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3317 memset(&si, 0,
sizeof(si));
3322 "Vertical scrollbar is invisible, should be visible.\n");
3324 "reported page/range is %d (%d..%d)\n",
3333#define ENABLE_WS_VSCROLL(hwnd) \
3334 SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_VSCROLL)
3335#define DISABLE_WS_VSCROLL(hwnd) \
3336 SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_VSCROLL)
3340 memset(&si, 0,
sizeof(si));
3345 "Vertical scrollbar is invisible, should be visible.\n");
3347 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3352 memset(&si, 0,
sizeof(si));
3357 "Vertical scrollbar is invisible, should be visible.\n");
3359 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3364 memset(&si, 0,
sizeof(si));
3369 "Vertical scrollbar is invisible, should be visible.\n");
3371 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3376 memset(&si, 0,
sizeof(si));
3381 "Vertical scrollbar is invisible, should be visible.\n");
3383 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3388 memset(&si, 0,
sizeof(si));
3393 "Vertical scrollbar is invisible, should be visible.\n");
3395 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3400 memset(&si, 0,
sizeof(si));
3405 "Vertical scrollbar is visible, should be invisible.\n");
3407 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3415 memset(&si, 0,
sizeof(si));
3420 "Vertical scrollbar is visible, should be invisible.\n");
3422 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3426 memset(&si, 0,
sizeof(si));
3431 "Vertical scrollbar is visible, should be invisible.\n");
3433 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3437 memset(&si, 0,
sizeof(si));
3442 "Vertical scrollbar is visible, should be invisible.\n");
3444 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3448 memset(&si, 0,
sizeof(si));
3453 "Vertical scrollbar is visible, should be invisible.\n");
3455 "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n",
3459 memset(&si, 0,
sizeof(si));
3464 "Vertical scrollbar is invisible, should be visible.\n");
3466 "reported page/range is %d (%d..%d)\n",
3471 memset(&si, 0,
sizeof(si));
3476 "Vertical scrollbar is visible, should be invisible.\n");
3478 "reported page/range is %d (%d..%d)\n",
3482 memset(&si, 0,
sizeof(si));
3487 "Vertical scrollbar is visible, should be invisible.\n");
3489 "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n",
3493 memset(&si, 0,
sizeof(si));
3498 "Vertical scrollbar is invisible, should be visible.\n");
3500 "reported page/range is %d (%d..%d)\n",
3504 memset(&si, 0,
sizeof(si));
3509 "Vertical scrollbar is visible, should be invisible.\n");
3511 "reported page/range is %d (%d..%d)\n",
3517 memset(&si, 0,
sizeof(si));
3522 "Vertical scrollbar is invisible, should be visible.\n");
3524 "reported page/range is %d (%d..%d)\n",
3528 memset(&si, 0,
sizeof(si));
3533 "Vertical scrollbar is visible, should be invisible.\n");
3535 "reported page/range is %d (%d..%d)\n",
3540 memset(&si, 0,
sizeof(si));
3545 "Vertical scrollbar is invisible, should be visible.\n");
3547 "reported page/range is %d (%d..%d)\n",
3569 "WM_SIZE/scrollbar mutual recursion detected, expected none!\n");
3576 "WM_SIZE/scrollbar mutual recursion detected, expected none!\n");
3610 for (
i=0;
i<101;
i++)
3612 for (
i=0;
i<100;
i++)
3615 "EM_SETUNDOLIMIT allowed more than a hundred undo's by default.\n");
3623 "EM_SETUNDOLIMIT allowed undo with UNDOLIMIT set to 0\n");
3633 "EM_SETUNDOLIMIT didn't allow the first undo with UNDOLIMIT set to 2\n");
3636 "EM_SETUNDOLIMIT didn't allow a second undo with UNDOLIMIT set to 2\n");
3639 "EM_SETUNDOLIMIT allowed a third undo with UNDOLIMIT set to 2\n");
3645 "EM_SETUNDOLIMIT returned %d when set to -1, instead of 100\n",
result);
3660 "EM_GETPASSWORDCHAR returned %c by default, instead of NULL\n",
result);
3666 "EM_GETPASSWORDCHAR returned %c (%d) when set to 'x', instead of x (120)\n",
result,
result);
3672 "EM_GETPASSWORDCHAR returned %c (%d) when set to 'x', instead of x (120)\n",
result,
result);
3683 char**
str = (
char**)dwCookie;
3696 const char * TestItem1 =
"TestSomeText";
3697 const char * TestItem2 =
"TestSomeText\r";
3698 const char * TestItem2_after =
"TestSomeText\r\n";
3699 const char * TestItem3 =
"TestSomeText\rSomeMoreText\r";
3700 const char * TestItem3_after =
"TestSomeText\r\nSomeMoreText\r\n";
3701 const char * TestItem4 =
"TestSomeText\n\nTestSomeText";
3702 const char * TestItem4_after =
"TestSomeText\r\n\r\nTestSomeText";
3703 const char * TestItem5 =
"TestSomeText\r\r\nTestSomeText";
3704 const char * TestItem5_after =
"TestSomeText TestSomeText";
3705 const char * TestItem6 =
"TestSomeText\r\r\n\rTestSomeText";
3706 const char * TestItem6_after =
"TestSomeText \r\nTestSomeText";
3707 const char * TestItem7 =
"TestSomeText\r\n\r\r\n\rTestSomeText";
3708 const char * TestItem7_after =
"TestSomeText\r\n \r\nTestSomeText";
3710 const char rtftextA[] =
"{\\rtf sometext}";
3711 const char urtftextA[] =
"{\\urtf sometext}";
3712 const WCHAR rtftextW[] = {
'{',
'\\',
'r',
't',
'f',
' ',
's',
'o',
'm',
'e',
't',
'e',
'x',
't',
'}',0};
3713 const WCHAR urtftextW[] = {
'{',
'\\',
'u',
'r',
't',
'f',
' ',
's',
'o',
'm',
'e',
't',
'e',
'x',
't',
'}',0};
3714 const WCHAR sometextW[] = {
's',
'o',
'm',
'e',
't',
'e',
'x',
't',0};
3716 char buf[1024] = {0};
3717 WCHAR bufW[1024] = {0};
3726#define TEST_SETTEXT(a, b) \
3727 result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)a); \
3728 ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
3729 result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buf); \
3730 ok (result == lstrlenA(buf), \
3731 "WM_GETTEXT returned %ld instead of expected %u\n", \
3732 result, lstrlenA(buf)); \
3733 result = strcmp(b, buf); \
3735 "WM_SETTEXT round trip: strcmp = %ld, text=\"%s\"\n", result, buf);
3754#define TEST_SETTEXTW(a, b) \
3755 result = SendMessageW(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)a); \
3756 ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \
3757 result = SendMessageW(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)bufW); \
3758 ok (result == lstrlenW(bufW), \
3759 "WM_GETTEXT returned %ld instead of expected %u\n", \
3760 result, lstrlenW(bufW)); \
3761 result = lstrcmpW(b, bufW); \
3762 ok(result == 0, "WM_SETTEXT round trip: strcmp = %ld\n", result);
3778 ok(
result == 1,
"WM_SETTEXT returned %ld, expected 12\n",
result);
3780 ok(
result == 5,
"WM_GETTEXT returned %ld, expected 5\n",
result);
3781 ok(!
strcmp(
buf,
"line1"),
"WM_GETTEXT returned incorrect string '%s'\n",
buf);
3783 ok(
result == 1,
"WM_SETTEXT returned %ld, expected 1\n",
result);
3785 ok(
result == 3,
"WM_GETTEXT returned %ld, expected 3\n",
result);
3786 ok(!
strcmp(
buf,
"ABC"),
"WM_GETTEXT returned incorrect string '%s'\n",
buf);
3797 char**
str = (
char**)dwCookie;
3798 ok(*pcb ==
cb || *pcb == 0,
"cb %d, *pcb %d\n",
cb, *pcb);
3810 const char *
p =
buf;
3826 char buf[1024] = {0};
3830 const char * TestItem1 =
"TestSomeText";
3831 const char * TestItem2 =
"TestSomeText\r";
3832 const char * TestItem3 =
"TestSomeText\r\n";
3842 ok(
r == 12,
"streamed text length is %d, expecting 12\n",
r);
3844 "streamed text different, got %s\n",
buf);
3873 ok(
r == 14,
"streamed text length is %d, expecting 14\n",
r);
3875 "streamed text different from, got %s\n",
buf);
3902 ok(
r == 14,
"streamed text length is %d, expecting 14\n",
r);
3904 "streamed text different, got %s\n",
buf);
3914 ok(
r == 14,
"streamed text length is %d, expecting 14\n",
r);
3916 "streamed text different, got %s\n",
buf);
3927 char buf[1024] = {0};
3932 const char * TestItem =
"TestSomeText";
3947 ok(fontTbl !=
NULL,
"missing \\fonttbl section\n");
3952 while(*fontTbl && brackCount)
3956 else if(*fontTbl ==
'}')
3961 ok(brackCount == 0,
"missing closing bracket in \\fonttbl block\n");
3966 ok(*fontTbl ==
'}',
"spurious character '%02x' before \\fonttbl closing bracket\n", *fontTbl);
3970 ok(*fontTbl == 0x0d && *(fontTbl+1) == 0x0a,
"missing crlf after \\fonttbl block\n");
4000 int sel_start, sel_end;
4003 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
4005 'T',
'e',
'x',
't', 0};
4006 WCHAR TestItem1alt[] = {
'T',
'T',
'e',
's',
4012 WCHAR TestItem1altn[] = {
'T',
'T',
'e',
's',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't',
4013 '\r',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't',0};
4014 WCHAR TestItem2[] = {
'T',
'e',
's',
't',
4018 const char * TestItem2_after =
"TestSomeText\r\n";
4019 WCHAR TestItem3[] = {
'T',
'e',
's',
't',
4022 '\r',
'\n',
'\r',
'\n', 0};
4023 WCHAR TestItem3alt[] = {
'T',
'e',
's',
't',
4027 WCHAR TestItem3_after[] = {
'T',
'e',
's',
't',
4031 WCHAR TestItem4[] = {
'T',
'e',
's',
't',
4034 '\r',
'\r',
'\n',
'\r',
4036 WCHAR TestItem4_after[] = {
'T',
'e',
's',
't',
4040#define MAX_BUF_LEN 1024
4068 ok (
parent != 0,
"Failed to create parent window\n");
4079 (
LPARAM)
"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}");
4086 ok(sel_start == 18,
"Selection start incorrectly at %d\n", sel_start);
4087 ok(sel_end == 18,
"Selection end incorrectly at %d\n", sel_end);
4096 (
LPARAM)
"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}");
4101 ok(si.
nPos != 0,
"Position is incorrectly at %d\n", si.
nPos);
4103 ok(sel_start == 18,
"Selection start incorrectly at %d\n", sel_start);
4104 ok(sel_end == 18,
"Selection end incorrectly at %d\n", sel_end);
4111 (
LPARAM)
"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}");
4112 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4116 ok(si.
nPos == 0,
"Position is incorrectly at %d\n", si.
nPos);
4118 ok(sel_start == 0,
"Selection start incorrectly at %d\n", sel_start);
4119 ok(sel_end == 0,
"Selection end incorrectly at %d\n", sel_end);
4130 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4133 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4146 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4149 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4153 ok(
strcmp((
const char *)
buf, TestItem2_after) == 0,
4154 "WM_GETTEXT did *not* see \\r converted to \\r\\n pairs.\n");
4165 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4180 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4192 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4195 "EM_SETTEXTEX did not convert properly\n");
4206 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4209 "EM_SETTEXTEX did not convert properly\n");
4220 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4223 "EM_SETTEXTEX did not convert properly\n");
4230 "EM_SETTEXTEX returned %d, instead of 1\n",
result);
4231 ok(!
buf[0],
"EM_SETTEXTEX with NULL lParam should clear rich edit.\n");
4236 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4245 "EM_SETTEXTEX with NULL lParam to replace selection"
4246 " with no text should return 0. Got %i\n",
4252 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4263 "EM_SETTEXTEX with NULL lParam to replace selection"
4264 " with no text should return 0. Got %i\n",
4267 "EM_SETTEXTEX to replace selection with more text failed: %i.\n",
4279 trace(
"EM_STREAMOUT produced:\n%s\n", (
char *)
buf);
4291 ok(
result == 1,
"EM_SETTEXTEX returned %d, expected 1\n",
result);
4294 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
4310 ok(
lstrcmpA(bufACP,
"not unicode") == 0,
"'%s' != 'not unicode'\n", bufACP);
4321 trace(
"EM_STREAMOUT produced:\n%s\n", (
char *)
buf);
4339 ok_w3(
"Expected \"%s\" or \"%s\", got \"%s\"\n", TestItem1alt, TestItem1altn,
buf);
4367 "EM_GETTEXTEX results not what was set by EM_SETTEXTEX when"
4368 " using ST_SELECTION and non-Unicode\n");
4380 ok(!
strcmp(bufACP,
"richtext"),
"expected 'richtext' but got '%s'\n", bufACP);
4391 ok(!
strcmp(bufACP,
"morerichtext"),
"expected 'morerichtext' but got '%s'\n", bufACP);
4398 ok(
result == 15,
"EM_SETTEXTEX: Test UTF8 with BOM returned %d, expected 15\n",
result);
4400 ok(
result == 0,
"EM_SETTEXTEX: Test UTF8 with BOM set wrong text: Result: %s\n", bufACP);
4406 ok(
result == 15,
"EM_SETTEXTEX: Test UTF8 with BOM returned %d, expected 15\n",
result);
4408 ok(
result == 0,
"EM_SETTEXTEX: Test UTF8 with BOM set wrong text: Result: %s\n", bufACP);
4412 skip(
"Skip multibyte character tests on non-Japanese platform\n");
4421 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4423 "EM_SETTEXTEX: Test multibyte character set wrong text: Result: %s\n", bufACP);
4426 setText.codepage =
CP_ACP;
4428 ok(
result == 1,
"EM_SETTEXTEX incorrectly returned %d, expected 1\n",
result);
4430 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4432 "EM_SETTEXTEX: Test multibyte character set wrong text: Result: %s\n", bufACP);
4436 setText.codepage =
CP_ACP;
4440 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4442 "EM_SETTEXTEX: Test multibyte character set wrong text: Result: %s\n", bufACP);
4452 ok(
result == 1,
"EM_SETTEXTEX incorrectly returned %d, expected 1\n",
result);
4454 ok(
result == 5,
"WM_GETTEXT incorrectly returned %d, expected 5\n",
result);
4455 ok(!
strcmp(bufACP,
"line1"),
"EM_SETTEXTEX: Test single-line text: Result: %s\n", bufACP);
4475 "EM_LIMITTEXT: set to 100, returned: %d, expected: 100\n",
ret);
4481 "EM_LIMITTEXT: set to 0, returned: %d, expected: 65536\n",
ret);
4487 "EM_LIMITTEXT: set to -1, returned: %d, expected: -1\n",
ret);
4493 "EM_LIMITTEXT: set to -2, returned: %d, expected: -2\n",
ret);
4501 int i, selBegin, selEnd, len1, len2;
4503 char text[1024 + 1];
4509 ok(32767 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 32767,
i);
4515 ok(textlimit ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit,
i);
4521 ok(textlimit ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit,
i);
4526 ok(65536 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 65536,
i);
4528 textlimit =
sizeof(
text)-1;
4537 len1 = selEnd - selBegin;
4544 len2 = selEnd - selBegin;
4547 "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n",
4555 len1 = selEnd - selBegin;
4558 "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n",
4566 len2 = selEnd - selBegin;
4569 "EM_EXLIMITTEXT: No Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n",
4575 text[textlimit] = 0;
4587 text[textlimit] = 0;
4592 ok(10 ==
i,
"expected 10 chars\n");
4594 ok(10 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10,
i);
4598 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4601 ok(10 ==
i,
"expected 10 chars, got %i\n",
i);
4603 ok(10 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10,
i);
4608 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4611 ok(10 ==
i,
"expected 10 chars, got %i\n",
i);
4613 ok(10 ==
i,
"EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10,
i);
4620 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4622 ok(0 ==
i,
"WM_CHAR wasn't processed\n");
4625 ok(1 ==
i,
"expected 1 chars, got %i instead\n",
i);
4636 ok(32767 ==
i,
"expected: %d, actual: %d\n", 32767,
i);
4640 ok(50000 ==
i,
"expected: %d, actual: %d\n", 50000,
i);
4666 returnedCF2A.
cbSize =
sizeof(returnedCF2A);
4674 "EM_GETCHARFORMAT: Returned wrong font on test 1. Sent: %s, Returned: %s\n",
4681 "EM_GETCHARFORMAT: Returned wrong font on test 2. Sent: %s, Returned: %s\n",
4688 "EM_GETCHARFORMAT: Returned wrong font on test 3. Sent: %s, Returned: %s\n",
4693 ZeroMemory(&returnedCF2A,
sizeof(returnedCF2A));
4694 ZeroMemory(&sentLogFont,
sizeof(sentLogFont));
4695 returnedCF2A.
cbSize =
sizeof(returnedCF2A);
4701 "EM_GETCHARFORMAT: Returned wrong font on test 4. Sent: NULL, Returned: %s. Expected \"System\".\n",returnedCF2A.
szFaceName);
4712 const char**
str = (
const char**)dwCookie;
4732 WCHAR TestItem1[] = {
'T',
'e',
's',
't',
4734 'T',
'e',
'x',
't', 0};
4735 WCHAR TestItem2[] = {
'T',
'e',
's',
't',
4737 'O',
't',
'h',
'e',
'r',
4738 'T',
'e',
'x',
't', 0};
4739 const char* streamText =
"hello world";
4755 "EM_GETMODIFY returned non-zero, instead of zero on create\n");
4761 "EM_GETMODIFY returned zero, instead of non-zero on EM_SETMODIFY\n");
4767 "EM_GETMODIFY returned non-zero, instead of zero on EM_SETMODIFY\n");
4774 "EM_GETMODIFY returned non-zero, instead of zero on setting font\n");
4781 "EM_GETMODIFY returned zero, instead of non-zero on setting text\n");
4787 "EM_GETMODIFY returned zero, instead of non-zero on undo after setting text\n");
4795 "EM_GETMODIFY returned non-zero, instead of zero when setting text while not keeping undo stack\n");
4802 "EM_GETMODIFY returned non-zero for WM_SETTEXT\n");
4809 "EM_GETMODIFY returned non-zero, instead of zero for WM_CLEAR\n");
4818 "EM_GETMODIFY returned zero, instead of non-zero when replacing text\n");
4827 "EM_GETMODIFY returned zero, instead of non-zero when pasting identical text\n");
4837 "EM_GETMODIFY returned zero, instead of non-zero when pasting different text\n");
4845 "EM_GETMODIFY returned zero, instead of non-zero for WM_CHAR\n");
4853 "EM_GETMODIFY returned zero, instead of non-zero for backspace\n");
4863 ok(
result == 1,
"EM_SETCHARFORMAT returned %ld instead of 1\n",
result);
4866 "EM_GETMODIFY returned zero, instead of non-zero for EM_SETCHARFORMAT\n");
4877 "EM_GETMODIFY returned zero, instead of non-zero for EM_SETPARAFORMAT\n");
4887 "EM_GETMODIFY returned zero, instead of non-zero for EM_STREAM\n");
4903 {5, 10, 10, 5, 10 },
4904 {15, 17, 17, 15, 17 },
4906 {0, 100, 18, 0, 18 },
4908 {-1, 1, 17, 17, 17 },
4916 {-1, -1, 17, 17, 17 },
4917 {-4, -5, 17, 17, 17 },
4919 {0, -1, 18, 0, 18 },
4920 {17, -5, 18, 17, 18 },
4921 {18, -3, 17, 17, 17 },
4923 {15, 19, 18, 15, 18 },
4924 {19, 15, 18, 15, 18 },
4926 {17, 18, 18, 17, 18 },
4927 {17, 50, 18, 17, 18 },
4964 skip(
"Skip multibyte character tests on non-Japanese platform\n");
4978 ok(!
strcmp(bufA,
"ef\x8e\xf0g"),
"EM_GETSELTEXT return incorrect string\n");
4980 ok(cr.
cpMin == 4,
"Selection start incorrectly: %d expected 4\n", cr.
cpMin);
4981 ok(cr.
cpMax == 8,
"Selection end incorrectly: %d expected 8\n", cr.
cpMax);
5004 char buffA[32] = {0};
5021 ok(buffA[0] == 0,
"selection text %s\n", buffA);
5024 skip(
"Skip multibyte character tests on non-Japanese platform\n");
5027 int sel_start, sel_end;
5036 ok(!
strcmp(buffA,
"ef\x8e\xf0g"),
"EM_GETSELTEXT return incorrect string\n");
5038 ok(sel_start == 4,
"Selection start incorrectly: %d expected 4\n", sel_start);
5039 ok(sel_end == 8,
"Selection end incorrectly: %d expected 8\n", sel_end);
5052 CHAR rtfstream[] =
"{\\rtf1 TestSomeText}";
5053 CHAR urtfstream[] =
"{\\urtf1 TestSomeText}";
5063 ok(0 ==
r,
"EM_REPLACESEL returned %d, expected 0\n",
r);
5066 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5072 trace(
"Testing EM_REPLACESEL behavior with redraw=%d\n",
redraw);
5078 ok(9 ==
r,
"EM_REPLACESEL returned %d, expected 9\n",
r);
5081 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5089 "EM_GETTEXTEX results not what was set by EM_REPLACESEL\n");
5093 ok(
r == 1,
"EM_GETLINECOUNT returned %d, expected 1\n",
r);
5097 ok(10 ==
r,
"EM_REPLACESEL returned %d, expected 10\n",
r);
5100 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5108 "EM_GETTEXTEX returned incorrect string\n");
5112 ok(
r == 2,
"EM_GETLINECOUNT returned %d, expected 2\n",
r);
5116 ok(
r == 11,
"EM_REPLACESEL returned %d, expected 11\n",
r);
5120 ok(
r == 2,
"EM_GETLINECOUNT returned %d, expected 2\n",
r);
5123 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5124 ok(cr.
cpMin == 10,
"EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.
cpMin);
5125 ok(cr.
cpMax == 10,
"EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.
cpMax);
5129 ok(0 ==
r,
"expected %d, got %d\n", 0,
r);
5137 "EM_GETTEXTEX returned incorrect string\n");
5140 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5141 ok(cr.
cpMin == 10,
"EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.
cpMin);
5142 ok(cr.
cpMax == 10,
"EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.
cpMax);
5152 ok(2 ==
r,
"EM_REPLACESEL returned %d, expected 4\n",
r);
5154 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5155 ok(cr.
cpMin == 2,
"EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.
cpMin);
5156 ok(cr.
cpMax == 2,
"EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.
cpMax);
5166 "EM_GETTEXTEX returned incorrect string\n");
5170 ok(
r == 3,
"EM_GETLINECOUNT returned %d, expected 3\n",
r);
5174 ok(
r == 3,
"EM_REPLACESEL returned %d, expected 3\n",
r);
5176 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5177 ok(cr.
cpMin == 1,
"EM_EXGETSEL returned cpMin=%d, expected 1\n", cr.
cpMin);
5178 ok(cr.
cpMax == 1,
"EM_EXGETSEL returned cpMax=%d, expected 1\n", cr.
cpMax);
5188 "EM_GETTEXTEX returned incorrect string\n");
5192 ok(
r == 1,
"EM_GETLINECOUNT returned %d, expected 1\n",
r);
5196 ok(
r == 9,
"EM_REPLACESEL returned %d, expected 9\n",
r);
5198 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5199 ok(cr.
cpMin == 7,
"EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.
cpMin);
5200 ok(cr.
cpMax == 7,
"EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.
cpMax);
5210 "EM_GETTEXTEX returned incorrect string\n");
5214 ok(
r == 7,
"EM_GETLINECOUNT returned %d, expected 7\n",
r);
5218 ok(
r == 5,
"EM_REPLACESEL returned %d, expected 5\n",
r);
5220 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5221 ok(cr.
cpMin == 2,
"EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.
cpMin);
5222 ok(cr.
cpMax == 2,
"EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.
cpMax);
5232 "EM_GETTEXTEX returned incorrect string\n");
5236 ok(
r == 2,
"EM_GETLINECOUNT returned %d, expected 2\n",
r);
5240 ok(
r == 5,
"EM_REPLACESEL returned %d, expected 5\n",
r);
5242 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5243 ok(cr.
cpMin == 3,
"EM_EXGETSEL returned cpMin=%d, expected 3\n", cr.
cpMin);
5244 ok(cr.
cpMax == 3,
"EM_EXGETSEL returned cpMax=%d, expected 3\n", cr.
cpMax);
5254 "EM_GETTEXTEX returned incorrect string\n");
5258 ok(
r == 3,
"EM_GETLINECOUNT returned %d, expected 3\n",
r);
5262 ok(
r == 6,
"EM_REPLACESEL returned %d, expected 6\n",
r);
5264 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5265 ok(cr.
cpMin == 5,
"EM_EXGETSEL returned cpMin=%d, expected 5\n", cr.
cpMin);
5266 ok(cr.
cpMax == 5,
"EM_EXGETSEL returned cpMax=%d, expected 5\n", cr.
cpMax);
5276 "EM_GETTEXTEX returned incorrect string\n");
5280 ok(
r == 5,
"EM_GETLINECOUNT returned %d, expected 5\n",
r);
5284 ok(2 ==
r,
"EM_REPLACESEL returned %d, expected 2\n",
r);
5286 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5287 ok(cr.
cpMin == 2,
"EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.
cpMin);
5288 ok(cr.
cpMax == 2,
"EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.
cpMax);
5298 "EM_GETTEXTEX returned incorrect string\n");
5302 ok(
r == 3,
"EM_GETLINECOUNT returned %d, expected 3\n",
r);
5306 ok(
r == 9,
"EM_REPLACESEL returned %d, expected 9\n",
r);
5308 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5309 ok(cr.
cpMin == 7,
"EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.
cpMin);
5310 ok(cr.
cpMax == 7,
"EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.
cpMax);
5320 "EM_GETTEXTEX returned incorrect string\n");
5324 ok(
r == 7,
"EM_GETLINECOUNT returned %d, expected 7\n",
r);
5328 skip(
"Skip multibyte character tests on non-Japanese platform\n");
5333 todo_wine ok(
r == 5,
"EM_REPLACESEL returned %d, expected 5\n",
r);
5335 ok(
r == 0,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5336 ok(cr.cpMin == 4,
"EM_EXGETSEL returned cpMin=%d, expected 4\n", cr.cpMin);
5337 ok(cr.cpMax == 4,
"EM_EXGETSEL returned cpMax=%d, expected 4\n", cr.cpMax);
5339 ok(!
strcmp(
buffer,
"abc\x8e\xf0"),
"WM_GETTEXT returned incorrect string\n");
5340 ok(
r == 5,
"WM_GETTEXT returned %d, expected 5\n",
r);
5344 todo_wine ok(
r == 4,
"EM_REPLACESEL returned %d, expected 4\n",
r);
5346 ok(
r == 0,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5347 todo_wine ok(cr.cpMin == 4,
"EM_EXGETSEL returned cpMin=%d, expected 4\n", cr.cpMin);
5348 todo_wine ok(cr.cpMax == 4,
"EM_EXGETSEL returned cpMax=%d, expected 4\n", cr.cpMax);
5351 todo_wine ok(
r == 5,
"WM_GETTEXT returned %d, expected 5\n",
r);
5356 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5358 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5366 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5368 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5377 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5379 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5388 todo_wine ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5390 ok(0 ==
r,
"EM_EXGETSEL returned %d, expected 0\n",
r);
5406 ok(
r == 12,
"EM_REPLACESEL returned %d, expected 12\n",
r);
5408 ok(
r == 5,
"WM_GETTEXT returned %d, expected 5\n",
r);
5433 const char* text1 =
"testing paste\r";
5434 const char* text1_step1 =
"testing paste\r\ntesting paste\r\n";
5435 const char* text1_after =
"testing paste\r\n";
5436 const char* text2 =
"testing paste\r\rtesting paste";
5437 const char* text2_after =
"testing paste\r\n\r\ntesting paste";
5438 const char* text3 =
"testing paste\r\npaste\r\ntesting paste";
5451 "test paste: strcmp = %i, text='%s'\n",
result,
buffer);
5458 "test paste: strcmp = %i, text='%s'\n",
result,
buffer);
5469 "test paste: strcmp = %i\n",
result);
5475 "test paste: strcmp = %i\n",
result);
5481 "test paste: strcmp = %i\n",
result);
5491 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5505 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5519 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5534 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5540 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5548 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5555 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5570 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5578 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5590 "test paste: strcmp = %i, actual = '%s'\n",
result,
buffer);
5596 int r,
i, tpp_x, tpp_y;
5600 BOOL skip_non_english;
5601 static const struct {
5606 {
"WINE wine", 0, 0},
5607 {
"WINE wineWine", 0, 0},
5608 {
"WINE\r\nwine\r\nwine", 5, 10},
5609 {
"WINE\r\nWINEwine\r\nWINEwine", 5, 14},
5610 {
"WINE\r\n\r\nwine\r\nwine", 5, 6}
5614 if (skip_non_english)
5615 skip(
"Skipping some tests on non-English platform\n");
5668 ok(
r ==
len,
"Expected %d, got %d\n",
len,
r);
5678 if (! skip_non_english)
5679 ok(fr.rc.bottom == (stringsize.
cy * tpp_y),
"Expected bottom to be %d, got %d\n", (stringsize.
cy * tpp_y), fr.rc.bottom);
5683 ok(
r == fmtstrings[
i].
first,
"Expected %d, got %d\n", fmtstrings[
i].
first,
r);
5686 ok(
r <
len,
"Expected < %d, got %d\n",
len,
r);
5691 if (fmtstrings[
i].second)
5693 ok(
r == fmtstrings[
i].second,
"Expected %d, got %d\n", fmtstrings[
i].second,
r);
5695 else if (! skip_non_english)
5696 ok (
r <
len,
"Expected < %d, got %d\n",
len,
r);
5702 ok(
r ==
len,
"Expected %d, got %d\n",
len,
r);
5715 const char text[] = {
't',
'e',
's',
't'};
5726 *pcb =
sizeof(
text);
5741 const char**
str = (
const char**)dwCookie;
5762 static const char first[] =
"\xef\xbb\xbf\xc3\x96\xc3";
5763 *pcb =
sizeof(
first) - 1;
5765 }
else if(*phase == 1){
5766 static const char second[] =
"\x8f\xc3\x8b";
5767 *pcb =
sizeof(second) - 1;
5768 memcpy(pbBuff, second, *pcb);
5783 static const char first[] =
"{\\rtf1\\ansi{Th\0is";
5784 *written =
sizeof(
first);
5787 else if (*phase == 1)
5789 static const char second[] =
" is a test}}";
5790 *written =
sizeof(second);
5820 str->buffer += *pcb;
5821 str->length -= *pcb;
5832 char buffer[1024] = {0}, tmp[16];
5836 const char * streamText0 =
"{\\rtf1\\fi100\\li200\\rtlpar\\qr TestSomeText}";
5837 const char * streamText0a =
"{\\rtf1\\fi100\\li200\\rtlpar\\qr TestSomeText\\par}";
5838 const char * streamText0b =
"{\\rtf1 TestSomeText\\par\\par}";
5841 const char * streamText1 =
5842 "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n"
5843 "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n"
5847 const char * streamText2 =
5848 "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;"
5849 "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255"
5850 "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 "
5851 "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 "
5852 "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 "
5853 "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 "
5854 "\\tx11448 \\tx11872 \\tx12296 \\tx12720 \\tx13144 \\cf2 RichEdit1\\line }";
5856 const char * streamText3 =
"RichEdit1";
5858 const char * streamTextUTF8BOM =
"\xef\xbb\xbfTestUTF8WithBOM";
5860 const char * streamText4 =
5861 "This text just needs to be long enough to cause run to be split onto "
5862 "two separate lines and make sure the null terminating character is "
5863 "handled properly.\0";
5865 const WCHAR UTF8Split_exp[4] = {0xd6, 0xcf, 0xcb, 0};
5867 int length4 =
strlen(streamText4) + 1;
5870 (
char *)streamText4,
5873 const WCHAR streamText5[] = {
'T',
'e',
's',
't',
'S',
'o',
'm',
'e',
'T',
'e',
'x',
't' };
5876 sizeof(streamText5),
5877 (
char *)streamText5,
5889 "EM_STREAMIN: Test 0 returned %ld, expected 12\n",
result);
5892 "EM_STREAMIN: Test 0 set wrong text: Result: %s\n",
buffer);
5893 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0 set error %d, expected %d\n",
es.dwError, 0);
5899 fmt.cbSize =
sizeof(
fmt);
5901 ok(
fmt.dxStartIndent == 0,
"got %d\n",
fmt.dxStartIndent);
5902 ok(
fmt.dxOffset == 0,
"got %d\n",
fmt.dxOffset);
5916 "EM_STREAMIN: Test 0-a returned %ld, expected 12\n",
result);
5919 "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",
buffer);
5920 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0-a set error %d, expected %d\n",
es.dwError, 0);
5926 fmt.cbSize =
sizeof(
fmt);
5928 ok(
fmt.dxStartIndent == 300,
"got %d\n",
fmt.dxStartIndent);
5929 ok(
fmt.dxOffset == -100,
"got %d\n",
fmt.dxOffset);
5942 "EM_STREAMIN: Test 0-b returned %ld, expected 14\n",
result);
5945 "EM_STREAMIN: Test 0-b set wrong text: Result: %s\n",
buffer);
5946 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0-b set error %d, expected %d\n",
es.dwError, 0);
5958 "EM_STREAMIN: Test 0-a returned %ld, expected 12\n",
result);
5961 "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",
buffer);
5962 ok(
es.dwError == 0,
"EM_STREAMIN: Test 0-a set error %d, expected %d\n",
es.dwError, 0);
5979 "EM_STREAMIN: Test SFF_SELECTION 0-a returned %ld, expected 14\n",
result);
5982 "EM_STREAMIN: Test SFF_SELECTION 0-a set wrong text: Result: %s\n",
buffer);
5983 ok(
es.dwError == 0,
"EM_STREAMIN: Test SFF_SELECTION 0-a set error %d, expected %d\n",
es.dwError, 0);
5993 "EM_STREAMIN: Test 1 returned %ld, expected 12\n",
result);
5996 "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",
buffer);
5997 ok(
es.dwError == 0,
"EM_STREAMIN: Test 1 set error %d, expected %d\n",
es.dwError, 0);
6006 "EM_STREAMIN: Test 2 returned %ld, expected 0\n",
result);
6007 ok(!
buffer[0],
"EM_STREAMIN: Test 2 set wrong text: Result: %s\n",
buffer);
6008 ok(
es.dwError == -16,
"EM_STREAMIN: Test 2 set error %d, expected %d\n",
es.dwError, -16);
6017 "EM_STREAMIN: Test 3 returned %ld, expected 0\n",
result);
6018 ok(!
buffer[0],
"EM_STREAMIN: Test 3 set wrong text: Result: %s\n",
buffer);
6019 ok(
es.dwError == -16,
"EM_STREAMIN: Test 3 set error %d, expected %d\n",
es.dwError, -16);
6029 "EM_STREAMIN: Test UTF8WithBOM returned %ld, expected 15\n",
result);
6032 "EM_STREAMIN: Test UTF8WithBOM set wrong text: Result: %s\n",
buffer);
6033 ok(
es.dwError == 0,
"EM_STREAMIN: Test UTF8WithBOM set error %d, expected %d\n",
es.dwError, 0);
6046 "EM_STREAMIN: Test UTF8Split returned %ld\n",
result);
6049 "EM_STREAMIN: Test UTF8Split set wrong text: Result: %s\n",
buffer);
6050 ok(
es.dwError == 0,
"EM_STREAMIN: Test UTF8Split set error %d, expected %d\n",
es.dwError, 0);
6056 ok(
result == length4,
"got %ld, expected %d\n",
result, length4);
6060 "EM_STREAMIN: Test 4 returned %ld, expected %d\n",
result, length4);
6061 ok(
es.dwError == 0,
"EM_STREAMIN: Test 4 set error %d, expected %d\n",
es.dwError, 0);
6067 ok(
result ==
sizeof(streamText5),
"got %ld, expected %u\n",
result, (
UINT)
sizeof(streamText5));
6071 "EM_STREAMIN: Test 5 returned %ld, expected %d\n",
result, length5);
6072 ok(
es.dwError == 0,
"EM_STREAMIN: Test 5 set error %d, expected %d\n",
es.dwError, 0);
6078 ptr =
"line1\r\nline2";
6086 "EM_STREAMIN: Unexpected text '%s'\n",
buffer);
6119 const char randomtext[] =
"Some text";
6132 "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",
buffer);
6136 "EM_STREAMIN without SFF_SELECTION wrongly allows undo\n");
6147 "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",
buffer);
6151 "EM_STREAMIN with SFF_SELECTION but no selection set "
6152 "should create an undo\n");
6163 "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",
buffer);
6167 "EM_STREAMIN with SFF_SELECTION and selection set "
6168 "should create an undo\n");
6181 static const WCHAR tW[] = {
't',0};
6182 static const WCHAR teW[] = {
't',
'e',0};
6183 static const WCHAR textW[] = {
't',
'e',
's',
't',0};
6184 static const char textA[] =
"test";
6188 int em_settextex_supported,
ret;
6190#define set_textA(hwnd, wm_set_text, txt) \
6192 SETTEXTEX stex = { ST_DEFAULT, CP_ACP }; \
6193 WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \
6194 assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \
6195 ret = SendMessageA(hwnd, wm_set_text, wparam, (LPARAM)txt); \
6196 ok(ret, "SendMessageA(%02x) error %u\n", wm_set_text, GetLastError()); \
6198#define expect_textA(hwnd, wm_get_text, txt) \
6200 GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \
6201 WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \
6202 assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \
6203 memset(bufA, 0xAA, sizeof(bufA)); \
6204 ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \
6205 ok(ret, "SendMessageA(%02x) error %u\n", wm_get_text, GetLastError()); \
6206 ret = lstrcmpA(bufA, txt); \
6207 ok(!ret, "%02x: strings do not match: expected %s got %s\n", wm_get_text, txt, bufA); \
6210#define set_textW(hwnd, wm_set_text, txt) \
6212 SETTEXTEX stex = { ST_DEFAULT, 1200 }; \
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 = SendMessageW(hwnd, wm_set_text, wparam, (LPARAM)txt); \
6216 ok(ret, "SendMessageW(%02x) error %u\n", wm_set_text, GetLastError()); \
6218#define expect_textW(hwnd, wm_get_text, txt) \
6220 GETTEXTEX gtex = { 64, GT_DEFAULT, 1200, 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(bufW, 0xAA, sizeof(bufW)); \
6224 ret = SendMessageW(hwnd, wm_get_text, wparam, (LPARAM)bufW); \
6225 ok(ret, "SendMessageW(%02x) error %u\n", wm_get_text, GetLastError()); \
6226 ret = lstrcmpW(bufW, txt); \
6227 ok(!ret, "%02x: strings do not match: expected[0] %x got[0] %x\n", wm_get_text, txt[0], bufW[0]); \
6229#define expect_empty(hwnd, wm_get_text) \
6231 GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \
6232 WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \
6233 assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \
6234 memset(bufA, 0xAA, sizeof(bufA)); \
6235 ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \
6236 ok(!ret, "empty richedit should return 0, got %d\n", ret); \
6237 ok(!*bufA, "empty richedit should return empty string, got %s\n", bufA); \
6241 0, 0, 200, 60, 0, 0, 0, 0);
6245 ok(
ret,
"RichEdit20W should be unicode under NT\n");
6249 trace(
"EM_SETTEXTEX is %ssupported on this platform\n",
6250 em_settextex_supported ?
"" :
"NOT ");
6256 ok(!
ret,
"SendMessageA(WM_CHAR) should return 0, got %d\n",
ret);
6262 ok(!
ret,
"SendMessageA(WM_CHAR) should return 0, got %d\n",
ret);
6276 if (em_settextex_supported)
6290 if (em_settextex_supported)
6301 0, 0, 200, 60, 0, 0, 0, 0);
6305 ok(!
ret,
"RichEdit20A should NOT be unicode\n");
6312 if (em_settextex_supported)
6326 if (em_settextex_supported)
6341 const char * char_list =
"abc\rabc\r";
6342 const char * expected_content_single =
"abcabc";
6343 const char * expected_content_multi =
"abc\r\nabc\r\n";
6349 0, 0, 200, 60, 0, 0, 0, 0);
6353 while (*
p !=
'\0') {
6356 ok(
ret == 0,
"WM_CHAR('%c') ret=%d\n", *
p,
ret);
6363 ok(
ret == 0,
"WM_GETTEXT recovered incorrect string!\n");
6369 0, 0, 200, 60, 0, 0, 0, 0);
6373 while (*
p !=
'\0') {
6376 ok(
ret == 0,
"WM_CHAR('%c') ret=%d\n", *
p,
ret);
6383 ok(
ret == 0,
"WM_GETTEXT recovered incorrect string!\n");
6393 const char * base_string =
"base string";
6395 const char * test_string_after =
"a";
6396 const char * test_string_2 =
"a\rtest\rstring";
6401 0, 0, 200, 60, 0, 0, 0, 0);
6440 ok(
ret == 0,
"WM_GETTEXT recovered incorrect string!\n");
6446 0, 0, 200, 60, 0, 0, 0, 0);
6502 "GTL_DEFAULT gave %i, expected %i\n",
ret,
lstrlenA(test_string_2));
6508 "GTL_NUMCHARS gave %i, expected %i\n",
ret,
lstrlenA(test_string_2));
6514 "GTL_NUMBYTES gave %i, expected %i\n",
ret,
lstrlenA(test_string_2)*2);
6520 "GTL_PRECISE gave %i, expected %i\n",
ret,
lstrlenA(test_string_2)*2);
6526 "GTL_NUMCHAR | GTL_PRECISE gave %i, expected %i\n",
ret,
lstrlenA(test_string_2));
6532 "GTL_NUMCHARS | GTL_NUMBYTES gave %i, expected %i\n",
ret,
E_INVALIDARG);
6559 const char text[] =
"foo bar\n";
6577 ok (
parent != 0,
"Failed to create parent window\n");
6586 ok(
ret == eventMask,
"failed to set event mask\n");
6592 ok(
ret ==
TRUE,
"failed to set text\n");
6653 int sel_start, sel_end;
6670 ok (
parent != 0,
"Failed to create parent window\n");
6722 ok(sel_start == 1 && sel_end == 1,
6723 "selections is incorrectly at (%d,%d)\n", sel_start, sel_end);
6728 ok(sel_start == 1 && sel_end == 1,
6729 "selections is incorrectly at (%d,%d)\n", sel_start, sel_end);
6735 ok(sel_start == 1 && sel_end == 1,
6736 "selections is incorrectly at (%d,%d)\n", sel_start, sel_end);
6743#define CURSOR_CLIENT_X 5
6744#define CURSOR_CLIENT_Y 5
6783 memset(&junk_enlink, 0x23,
sizeof(junk_enlink));
6807 "%s test %i: Expected lParam 0x%lx got 0x%lx\n",
6815 "%s test %i: Expected enlink to remain unmodified\n",
desc,
i);
6824 POINT orig_cursor_pos;
6835 link_notify_tests[] =
6905 ok(
parent != 0,
"Failed to create parent window\n");
6908 ok(
hwnd != 0,
"Failed to create edit window\n");
6936 link_notify_tests[
i].notifies);
6952 0, 0, 200, 60, 0, 0, 0, 0);
6958 ok (
result ==
FALSE,
"Undo operation successful with nothing to undo.\n");
6962 ok (
result ==
FALSE,
"Redo operation successful with nothing undone.\n");
6971 ok (
result ==
FALSE,
"Can redo before anything is undone.\n");
6973 ok (
result ==
TRUE,
"Cannot undo typed characters.\n");
6975 ok (
result ==
TRUE,
"EM_UNDO Failed to undo typed characters.\n");
6980 ok (
result == 0,
"expected '%s' but got '%s'\n",
"one two three",
buffer);
6983 ok (
result ==
TRUE,
"Cannot undo typed characters.\n");
6985 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
6993 ok (
result ==
FALSE,
"Redo buffer should have been cleared by typing.\n");
6998 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7001 ok (
result == 0,
"expected '%s' but got '%s'\n",
"one two three",
buffer);
7009 ok (
result ==
FALSE,
"Redo buffer should have been cleared by typing.\n");
7014 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7029 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7034 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7037 ok (
result == 0,
"expected '%s' but got '%s'\n",
"abcd",
buffer);
7048 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7051 ok (
result == 0,
"expected '%s' but got '%s'\n",
"one two three",
buffer);
7053 ok (
result ==
TRUE,
"Failed to undo typed characters.\n");
7102 int sel_start, sel_end;
7103 const WCHAR textW[] = {
'o',
'n',
'e',
' ',
't',
'w',
'o',
'X',
't',
'h',
'r',
'e',
'e',0};
7116 ok(sel_start == sel_end,
"Selection should be empty\n");
7117 ok(sel_start == 4,
"Cursor is at %d instead of %d\n", sel_start, 4);
7122 ok(sel_start == sel_end,
"Selection should be empty\n");
7123 ok(sel_start == 9,
"Cursor is at %d instead of %d\n", sel_start, 9);
7128 ok(sel_start == sel_end,
"Selection should be empty\n");
7129 ok(sel_start == 4,
"Cursor is at %d instead of %d\n", sel_start, 4);
7134 ok(sel_start == sel_end,
"Selection should be empty\n");
7135 ok(sel_start == 0,
"Cursor is at %d instead of %d\n", sel_start, 0);
7142 ok(sel_start == sel_end,
"Selection should be empty\n");
7143 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 == 9,
"Cursor is at %d instead of %d\n", sel_start, 9);
7161 ok(sel_start == sel_end,
"Selection should be empty\n");
7162 ok(sel_start == 8,
"Cursor is at %d instead of %d\n", sel_start, 8);
7181 ok(sel_start == sel_end,
"Selection should be empty\n");
7182 ok(sel_start == 8,
"Cursor is at %d instead of %d\n", sel_start, 8);
7199 (
LPARAM)
"one two three four five six seven\reight");
7204 ok(
result == 34,
"expected character index of 34 but got %d\n",
result);
7244 const char *
text =
"Must be long enough to test line wrapping";
7254 ok(
res,
"WM_SETTEXT failed.\n");
7256 ok(
pos,
"pos=%d indicating no word wrap when it is expected.\n",
pos);
7258 ok(
lines > 1,
"Line was expected to wrap (lines=%d).\n",
lines);
7262 ok(
pos,
"pos=%d indicating no word wrap when it is expected.\n",
pos);
7270 ok(
res,
"WM_SETTEXT failed.\n");
7272 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7274 ok(
lines == 1,
"Line wasn't expected to wrap (lines=%d).\n",
lines);
7278 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7285 ok(
res,
"WM_SETTEXT failed.\n");
7287 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7291 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7299 ok(
res,
"WM_SETTEXT failed.\n");
7301 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7305 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7309 ok(
res,
"EM_SETTARGETDEVICE failed (returned %d).\n",
res);
7311 ok(!
pos,
"pos=%d indicating word wrap when none is expected.\n",
pos);
7314 ok(
res,
"EM_SETTARGETDEVICE failed (returned %d).\n",
res);
7316 ok(
pos,
"pos=%d indicating no word wrap when it is expected.\n",
pos);
7325 ok(
res,
"EM_REPLACESEL failed.\n");
7327 ok(
lines == 1,
"Line wasn't expected to wrap (lines=%d).\n",
lines);
7330 ok(
lines > 1,
"Line was expected to wrap (lines=%d).\n",
lines);
7349 ok(
ret == 1,
"EM_GETSCROLLPOS returned %d instead of 1\n",
ret);
7350 ok(
pt.y != 0,
"Didn't scroll down after replacing text.\n");
7358 ok(
ret == 1,
"EM_GETSCROLLPOS returned %d instead of 1\n",
ret);
7359 ok(
pt.y == 0,
"y scroll position is %d after clearing text.\n",
pt.y);
7415 for (
n = -3;
n <= 3;
n++)
7573 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7591 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7602 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7613 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7624 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7638 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7649 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7662 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7673 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7689 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7700 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7713 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7724 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7734 ok(
res ==
expected,
"WM_GETDLGCODE returned %x but expected %x\n",
7745 int numerator, denominator;
7755 ok(numerator == 0,
"Numerator should be initialized to 0 (got %d).\n", numerator);
7756 ok(denominator == 0,
"Denominator should be initialized to 0 (got %d).\n", denominator);
7763 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7767 ok(numerator == 110,
"incorrect numerator is %d\n", numerator);
7768 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7778 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7782 ok(numerator == 500,
"incorrect numerator is %d\n", numerator);
7783 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7792 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7796 ok(numerator == 491,
"incorrect numerator is %d\n", numerator);
7797 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7806 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7810 ok(numerator == 10,
"incorrect numerator is %d\n", numerator);
7811 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7820 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7824 ok(numerator == 19,
"incorrect numerator is %d\n", numerator);
7825 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7835 ok(!
ret,
"WM_MOUSEWHEEL failed (%d).\n",
ret);
7839 ok(numerator == 394,
"incorrect numerator is %d\n", numerator);
7840 ok(denominator == 100,
"incorrect denominator is %d\n", denominator);
7845 ok(
ret ==
TRUE,
"EM_SETZOOM rejected valid values (%d).\n",
ret);
7848 ok(
ret ==
TRUE,
"EM_SETZOOM rejected valid values (%d).\n",
ret);
7851 ok(
ret ==
FALSE,
"EM_SETZOOM accepted invalid values (%d).\n",
ret);
7854 ok(numerator == 127,
"incorrect numerator is %d\n", numerator);
7855 ok(denominator == 2,
"incorrect denominator is %d\n", denominator);
7859 ok(
ret ==
FALSE,
"EM_SETZOOM accepted invalid values (%d).\n",
ret);
7863 ok(
ret ==
FALSE,
"EM_SETZOOM accepted invalid values (%d).\n",
ret);
7870 ok(numerator == 127,
"incorrect numerator is %d\n", numerator);
7871 ok(denominator == 2,
"incorrect denominator is %d\n", denominator);
7888#define test_dm_messages(wmclose, wmgetdefid, wmnextdlgctl) \
7889 ok(dm_messages.wm_close == wmclose, "expected %d WM_CLOSE message, " \
7890 "got %d\n", wmclose, dm_messages.wm_close); \
7891 ok(dm_messages.wm_getdefid == wmgetdefid, "expected %d WM_GETDIFID message, " \
7892 "got %d\n", wmgetdefid, dm_messages.wm_getdefid);\
7893 ok(dm_messages.wm_nextdlgctl == wmnextdlgctl, "expected %d WM_NEXTDLGCTL message, " \
7894 "got %d\n", wmnextdlgctl, dm_messages.wm_nextdlgctl)
7916 HWND hwRichEdit, hwParent, hwButton;
7941 ok(0 ==
r,
"expected 0, got %d\n",
r);
7943 ok(2 == lcount,
"expected 2, got %d\n", lcount);
7946 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
7949 ok(0 ==
r,
"expected 0, got %d\n",
r);
7951 ok(3 == lcount,
"expected 3, got %d\n", lcount);
7954 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
7956 ok(0 ==
r,
"expected 0, got %d\n",
r);
7958 ok(3 == lcount,
"expected 3, got %d\n", lcount);
7967 ok(0 ==
r,
"expected 0, got %d\n",
r);
7969 ok(2 == lcount,
"expected 2, got %d\n", lcount);
7972 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
7975 ok(0 ==
r,
"expected 0, got %d\n",
r);
7977 ok(2 == lcount,
"expected 2, got %d\n", lcount);
7989 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
7993 ok(0 ==
r,
"expected 0, got %d\n",
r);
7998 ok(0 ==
r,
"expected 0, got %d\n",
r);
8009 ok(0 ==
r,
"expected 0, got %d\n",
r);
8013 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8017 ok(0 ==
r,
"expected 0, got %d\n",
r);
8022 ok(0 ==
r,
"expected 0, got %d\n",
r);
8027 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
8032 ok(0 ==
r,
"expected 0, got %d\n",
r);
8036 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8040 ok(0 ==
r,
"expected 0, got %d\n",
r);
8045 ok(0 ==
r,
"expected 0, got %d\n",
r);
8054 ok(0 ==
r,
"expected 0, got %d\n",
r);
8058 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8069 ok(0 ==
r,
"expected 0, got %d\n",
r);
8073 ok(2 == lcount,
"expected 2, got %d\n", lcount);
8077 ok(0 ==
r,
"expected 0, got %d\n",
r);
8082 ok(0 ==
r,
"expected 0, got %d\n",
r);
8087 ok(0x8f ==
r,
"expected 0x8f, got 0x%x\n",
r);
8092 ok(0 ==
r,
"expected 0, got %d\n",
r);
8096 ok(3 == lcount,
"expected 3, got %d\n", lcount);
8100 ok(0 ==
r,
"expected 0, got %d\n",
r);
8105 ok(0 ==
r,
"expected 0, got %d\n",
r);
8114 ok(0 ==
r,
"expected 0, got %d\n",
r);
8118 ok(4 == lcount,
"expected 4, got %d\n", lcount);
8129 ok(0 ==
r,
"expected 0, got %d\n",
r);
8134 ok(0 ==
r,
"expected 0, got %d\n",
r);
8139 ok(0 ==
r,
"expected 0, got %d\n",
r);
8144 ok(0x8b ==
r,
"expected 0x8b, got 0x%x\n",
r);
8149 ok(0 ==
r,
"expected 0, got %d\n",
r);
8154 ok(0 ==
r,
"expected 0, got %d\n",
r);
8159 ok(0 ==
r,
"expected 0, got %d\n",
r);
8168 ok(0 ==
r,
"expected 0, got %d\n",
r);
8179 ok(0 ==
r,
"expected 0, got %d\n",
r);
8184 ok(0x8b ==
r,
"expected 0x8b, got 0x%x\n",
r);
8189 ok(0 ==
r,
"expected 0, got %d\n",
r);
8198 ok(0 ==
r,
"expected 0, got %d\n",
r);
8207 static const struct {
8210 } delimiter_tests[] = {
8237 wbuf[0] = delimiter_tests[
i].c;
8242 ok(
result == delimiter_tests[
i].isdelimiter,
8243 "wanted ISDELIMITER_W(0x%x) %d, got %d\n",
8244 delimiter_tests[
i].
c, delimiter_tests[
i].isdelimiter,
result);
8251 static const struct {
8254 } delimiter_tests[] = {
8270 buf[0] = delimiter_tests[
i].c;
8275 ok(
result == delimiter_tests[
i].isdelimiter,
8276 "wanted ISDELIMITER_A(0x%x) %d, got %d\n",
8277 delimiter_tests[
i].
c, delimiter_tests[
i].isdelimiter,
result);
8300 static const struct {
8301 const char *initialtext;
8303 const char *expectedwmtext;
8304 const char *expectedemtext;
8305 const char *expectedemtextcrlf;
8306 } testenteritems[] = {
8307 {
"aaabbb\r\n", 3,
"aaa\r\nbbb\r\n",
"aaa\rbbb\r",
"aaa\r\nbbb\r\n"},
8308 {
"aaabbb\r\n", 6,
"aaabbb\r\n\r\n",
"aaabbb\r\r",
"aaabbb\r\n\r\n"},
8309 {
"aa\rabbb\r\n", 7,
"aa\r\nabbb\r\n\r\n",
"aa\rabbb\r\r",
"aa\r\nabbb\r\n\r\n"},
8310 {
"aa\rabbb\r\n", 3,
"aa\r\n\r\nabbb\r\n",
"aa\r\rabbb\r",
"aa\r\n\r\nabbb\r\n"},
8311 {
"aa\rabbb\r\n", 2,
"aa\r\n\r\nabbb\r\n",
"aa\r\rabbb\r",
"aa\r\n\r\nabbb\r\n"}
8314 char expectedbuf[1024];
8315 char resultbuf[1024];
8318 char buf[1024] = {0};
8327 ok (
result == 1,
"[%d] WM_SETTEXT returned %ld instead of 1\n",
i,
result);
8336 expected = testenteritems[
i].expectedwmtext;
8343 "[%d] WM_GETTEXT unexpected '%s' expected '%s'\n",
8344 i, resultbuf, expectedbuf);
8351 expected = testenteritems[
i].expectedemtext;
8358 "[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n",
8359 i, resultbuf, expectedbuf);
8363 getText.codepage =
CP_ACP;
8366 expected = testenteritems[
i].expectedemtextcrlf;
8373 "[%d] EM_GETTEXTEX, GT_USECRLF unexpected '%s', expected '%s'\n",
8374 i, resultbuf, expectedbuf);
8382 ok (
result == 1,
"[%d] WM_SETTEXT returned %ld instead of 1\n",
i,
result);
8391 ok (
result == 0,
"[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n",
i, resultbuf, expectedbuf);
8394 ok (
result == 1,
"[%d] WM_SETTEXT returned %ld instead of 1\n",
i,
result);
8403 ok (
result == 0,
"[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n",
i, resultbuf, expectedbuf);
8410 static const WCHAR titleW[] = {
'l',
'i',
'n',
'e',
'1',
'\n',
'l',
'i',
'n',
'e',
'2',0};
8411 static const char title[] =
"line1\nline2";
8423 ok(
len == 5,
"GetWindowText returned %d\n",
len);
8427 ok(
res == 0,
"SendMessage(EM_GETSEL) returned %lx\n",
res);
8436 ok(
len == 12,
"GetWindowText returned %d\n",
len);
8440 ok(
res == 0,
"SendMessage(EM_GETSEL) returned %lx\n",
res);
8453 WORD def_align, new_align;
8459 def_align =
fmt.wAlignment;
8466 fmt.wAlignment = new_align;
8470 ok(
fmt.wAlignment == new_align,
"got %d expect %d\n",
fmt.wAlignment, new_align );
8476 ok(
fmt.wAlignment == def_align,
"got %d expect %d\n",
fmt.wAlignment, def_align );
8488 ok(
res == 1,
"EM_SETREADONLY\n");
8490 ok(dwStyle &
ES_READONLY,
"got wrong value: 0x%x\n", dwStyle);
8493 ok(
res == 1,
"EM_SETREADONLY\n");
8495 ok(!(dwStyle &
ES_READONLY),
"got wrong value: 0x%x\n", dwStyle);
8505#define TEST_EM_SETFONTSIZE(hwnd,size,expected_size,expected_res,expected_undo) \
8506 _test_font_size(__LINE__,hwnd,size,expected_size,expected_res,expected_undo)
8514 cf.cbSize =
sizeof(
cf);
8520 ok_(__FILE__,
line)(
res == expected_res,
"EM_SETFONTSIZE unexpected return value: %lx.\n",
res);
8521 ok_(__FILE__,
line)(
twips2points(
cf.yHeight) == expected_size,
"got wrong font size: %d, expected: %d\n",
8523 ok_(__FILE__,
line)(isundo == expected_undo,
"get wrong undo mark: %d, expected: %d.\n",
8524 isundo, expected_undo);
8534 tmp_cf.
cbSize =
sizeof(tmp_cf);
8546 ok(default_size == 9,
"Default font size should not be changed.\n");
8603 const char * streamtext =
8604 "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n"
8605 "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n"
8612 DWORD dwStyle, new_align;
8615 memset(&pf, 0,
sizeof(pf));
8620 ok(pf.wAlignment == align_mask[
i],
"(i = %d) got %d expected %d\n",
8621 i, pf.wAlignment, align_mask[
i]);
8623 ok((
i ? (dwStyle & align_style[
i]) : (!(dwStyle & 0x0000000f))) ,
8624 "(i = %d) didn't set right align style: 0x%x\n",
i, dwStyle);
8633 pf.wAlignment = new_align;
8637 ok(pf.wAlignment == new_align,
"got %d expect %d\n", pf.wAlignment, new_align);
8643 ok(pf.wAlignment == align_mask[
i],
"got %d expect %d\n", pf.wAlignment, align_mask[
i]);
8647 pf.cTabCount = -25000;
8649 ok(pf.cTabCount == -25000,
"Got %d\n", pf.cTabCount);
8651 ok(pf.cTabCount == 0,
"Got %d\n", pf.cTabCount);
8653 pf.cTabCount = 25000;
8655 ok(pf.cTabCount == 25000,
"Got %d\n", pf.cTabCount);
8657 ok(pf.cTabCount == 32,
"Got %d\n", pf.cTabCount);
8662 ok(pf.cTabCount == 32,
"Got %d\n", pf.cTabCount);
8667 ok(pf.cTabCount == 32,
"Got %d\n", pf.cTabCount);
8672 ok(pf.cTabCount == 1,
"Got %d\n", pf.cTabCount);
8685 memset(&pf, 0,
sizeof(pf));
8696 static const char text1[] =
"aaa\r\nbbb\r\nccc\r\nddd\r\neee";
8697 static const char text2[] =
"aaa\r\nbbb\r\nccc\r\nddd\r\neee\r\n";
8698 static const char text3[] =
"abcdef\x8e\xf0";
8703 ok(
result ==
lstrlenA(text1),
"WM_GETTEXTLENGTH returned %d, expected %d\n",
8708 ok(
result ==
lstrlenA(text2),
"WM_GETTEXTLENGTH returned %d, expected %d\n",
8713 skip(
"Skip multibyte character tests on non-Japanese platform\n");
8726 const char *specials =
"{\\rtf1\\emspace\\enspace\\bullet\\lquote"
8727 "\\rquote\\ldblquote\\rdblquote\\ltrmark\\rtlmark\\zwj\\zwnj}";
8728 const WCHAR expect_specials[] = {
' ',
' ',0x2022,0x2018,0x2019,0x201c,
8729 0x201d,0x200e,0x200f,0x200d,0x200c};
8730 const char *pard =
"{\\rtf1 ABC\\rtlpar\\par DEF\\par HIJ\\pard\\par}";
8731 const char *highlight =
"{\\rtf1{\\colortbl;\\red0\\green0\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}\\cf2\\highlight3 foo\\par}";
8757 fmt.cbSize =
sizeof(
fmt);
8777 cf.cbSize =
sizeof(
cf);
8780 ok(
cf.crTextColor ==
RGB(128,128,128),
"got %08x\n",
cf.crTextColor );
8781 ok(
cf.crBackColor ==
RGB(192,192,192),
"got %08x\n",
cf.crBackColor );
8801 const char *rtf =
"{\\rtf1{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}{\\f1\\fnil\\fcharset2 Symbol;}}"
8802 "{\\fs10{\\pard\\fs16\\fi200\\li360\\f0 First\\par"
8803 "\\f0\\fs25 Second\\par"
8804 "{\\f0\\fs26 Third}\\par"
8805 "{\\f0\\fs22 Fourth}\\par}}}";
8808 int i,
num, expect_height;
8816 for (
i = 0;
i <=
num;
i++)
8819 cf.cbSize =
sizeof(
cf);
8823 if (
i < 6) expect_height = 160;
8824 else if (
i < 13) expect_height = 250;
8825 else if (
i < 18) expect_height = 260;
8826 else if (
i == 18 ||
i == 25) expect_height = 250;
8827 else expect_height = 220;
8828 ok(
cf.yHeight == expect_height,
"%d: got %d\n",
i,
cf.yHeight );
8837 const char *numbers =
"{\\rtf1{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}{\\f1\\fnil\\fcharset2 Symbol;}}"
8838 "\\pard{\\pntext\\f0 3.\\tab}{\\*\\pn\\pnlvlbody\\pnfs32\\pnf0\\pnindent1000\\pnstart2\\pndec{\\pntxta.}}"
8839 "\\fs20\\fi200\\li360\\f0 First\\par"
8840 "{\\pntext\\f0 4.\\tab}\\f0 Second\\par"
8841 "{\\pntext\\f0 6.\\tab}\\f0 Third\\par}";
8842 const WCHAR expect_numbers_txt[] = {
'F',
'i',
'r',
's',
't',
'\r',
'S',
'e',
'c',
'o',
'n',
'd',
'\r',
'T',
'h',
'i',
'r',
'd',0};
8868 fmt.cbSize =
sizeof(
fmt);
8872 ok(
fmt.wNumberingStart == 2,
"got %d\n",
fmt.wNumberingStart );
8874 ok(
fmt.wNumberingTab == 1000,
"got %d\n",
fmt.wNumberingTab );
8875 ok(
fmt.dxStartIndent == 560,
"got %d\n",
fmt.dxStartIndent );
8876 ok(
fmt.dxOffset == -200,
"got %d\n",
fmt.dxOffset );
8880 memset( &fmt2, 0,
sizeof(fmt2) );
8881 fmt2.
cbSize =
sizeof(fmt2);
8888 cf.cbSize =
sizeof(
cf);
8891 ok(
cf.yHeight == 200,
"got %d\n",
cf.yHeight );
8894 cf.cbSize =
sizeof(
cf);
8897 ok(
cf.yHeight == 200,
"got %d\n",
cf.yHeight );
8923 static const char text1[] =
"abcdefg\n";
8945 hr = IRichEditOle_GetClientSite(reole, &clientsite);
8946 ok(
hr ==
S_OK,
"IRichEditOle_GetClientSite failed: 0x%08x\n",
hr);
8948 DVASPECT_CONTENT, 0, 1);
8949 hr = IRichEditOle_InsertObject(reole, &reo1);
8950 ok(
hr ==
S_OK,
"IRichEditOle_InsertObject failed: 0x%08x\n",
hr);
8951 IOleClientSite_Release(clientsite);
8966 hr = IRichEditOle_GetClientSite(reole, &clientsite);
8967 ok(
hr ==
S_OK,
"IRichEditOle_GetClientSite failed: 0x%08x\n",
hr);
8969 DVASPECT_CONTENT, 0, 2);
8970 hr = IRichEditOle_InsertObject(reole, &reo2);
8971 ok(
hr ==
S_OK,
"IRichEditOle_InsertObject failed: 0x%08x\n",
hr);
8972 IOleClientSite_Release(clientsite);
8986 IRichEditOle_Release(reole);
8998 {
"RichEdit",
FALSE },
8999 {
"RichEdit20A",
TRUE },
9000 {
"RichEdit20W",
TRUE },
9001 {
"RichEdit50A",
FALSE },
9002 {
"RichEdit50W",
FALSE }
9007 for (
i = 0;
i <
sizeof(
test)/
sizeof(
test[0]);
i++)
9010 hwnd =
CreateWindowExA(0,
test[
i].
class,
NULL,
WS_POPUP, 0, 0, 0, 0, 0, 0, 0,
NULL);
9102 if (
getenv(
"WINETEST_RICHED20" )) {
char * strcat(char *DstString, const char *SrcString)
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 * strcpy(char *DstString, const char *SrcString)
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 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)
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)
LANGID WINAPI GetUserDefaultLangID(void)
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)
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 test_WM_NOTIFY(void)
static void test_EM_SETREADONLY(void)
static void test_TM_PLAINTEXT(void)
static void test_EM_GETMODIFY(void)
static void test_EM_FINDTEXT(void)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define LOCALE_USER_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)