31#define ID_EDITTESTDBUTTON 0x123
32#define ID_EDITTEST2 99
43 static int num_ok_commands = 0;
110 else if (hfocus == hedit2)
112 else if (hfocus == hedit3)
118 if ((hfocus == hedit) && (num_ok_commands == 0))
254 if ((hfocus == hok) &&
len == 0)
263 else if (hfocus == hcancel)
265 else if (hfocus == hedit)
377 if ((hfocus == hedit) &&
len == 0)
384 if ((hfocus == hok) &&
len == 0)
499 if ((hfocus == hedit) &&
len == 0)
506 if ((hfocus == hok) &&
len == 0)
513 if ((hfocus == hedit) &&
len == 2)
553 ok (
handle !=
NULL,
"CreateWindow EDIT Control failed\n");
562 static const WCHAR testtextW[] = {
'T',
'e',
's',
't',
' ',
't',
'e',
'x',
't',0};
563 static const WCHAR editW[] = {
'E',
'd',
'i',
't',0};
580 ok(
b,
"AdjustWindowRect failed\n");
589 ok (parentWnd !=
NULL,
"CreateWindow EDIT Test failed\n");
598 ok (editWnd !=
NULL,
"CreateWindow EDIT Test Text failed\n");
610 trace(
"Edit control has no parent!\n");
640 RECT ClientRect, WindowRect;
664 "The client height should be %d, but is %d\n",
677 trace(
"EDIT: Single line\n");
681 for (
i=0;
i<65535;
i++)
683 msMessage.wParam =
i;
686 "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n",
r);
690 trace(
"EDIT: Single line want returns\n");
694 for (
i=0;
i<65535;
i++)
696 msMessage.wParam =
i;
699 "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n",
r);
703 trace(
"EDIT: Multiline line\n");
707 for (
i=0;
i<65535;
i++)
709 msMessage.wParam =
i;
712 "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n",
r);
716 trace(
"EDIT: Multi line want returns\n");
720 for (
i=0;
i<65535;
i++)
722 msMessage.wParam =
i;
725 "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n",
r);
739 char szLocalString[
MAXLEN];
758 trace(
"EDIT: SETTEXT atomicity\n");
761 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
763 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
765 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
769 "Wrong contents of edit: %s\n", szLocalString);
773 todo_wine ok(0 ==
r,
"SetCaretPos succeeded unexpectedly, expected: 0, got: %d\n",
r);
775 ok(phwnd !=
NULL,
"SetFocus failed unexpectedly, expected non-zero, got NULL\n");
777 ok(1 ==
r,
"SetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
779 ok(1 ==
r,
"GetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
780 ok(cpos.
x == 0 && cpos.
y == 0,
"Wrong caret position, expected: (0,0), got: (%d,%d)\n", cpos.
x, cpos.
y);
782 ok(1 ==
r,
"SetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
784 ok(1 ==
r,
"GetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
785 ok(cpos.
x == -1 && cpos.
y == -1,
"Wrong caret position, expected: (-1,-1), got: (%d,%d)\n", cpos.
x, cpos.
y);
787 ok(1 ==
r,
"SetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
789 ok(1 ==
r,
"GetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
790 ok(cpos.
x == (
w << 1) && cpos.
y == (
h << 1),
"Wrong caret position, expected: (%d,%d), got: (%d,%d)\n",
w << 1,
h << 1, cpos.
x, cpos.
y);
792 ok(1 ==
r,
"SetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
794 ok(1 ==
r,
"GetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
795 ok(cpos.
x ==
w && cpos.
y ==
h,
"Wrong caret position, expected: (%d,%d), got: (%d,%d)\n",
w,
h, cpos.
x, cpos.
y);
797 ok(1 ==
r,
"SetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
799 ok(1 ==
r,
"GetCaretPos failed unexpectedly, expected: 1, got: %d\n",
r);
800 ok(cpos.
x == (
w - 1) && cpos.
y == (
h - 1),
"Wrong caret position, expected: (%d,%d), got: (%d,%d)\n",
w - 1,
h - 1, cpos.
x, cpos.
y);
808 char szLocalString[
MAXLEN];
811 if (
strcmp(szLocalString,
"foo")==0) {
812 strcpy(szLocalString,
"bar");
840#define test_notify(enchange, enmaxtext, enupdate) \
842 ok(notifications.en_change == enchange, "expected %d EN_CHANGE notifications, " \
843 "got %d\n", enchange, notifications.en_change); \
844 ok(notifications.en_maxtext == enmaxtext, "expected %d EN_MAXTEXT notifications, " \
845 "got %d\n", enmaxtext, notifications.en_maxtext); \
846 ok(notifications.en_update == enupdate, "expected %d EN_UPDATE notifications, " \
847 "got %d\n", enupdate, notifications.en_update); \
880 static const char *
str =
"this is a long string.";
881 static const char *str2 =
"this is a long string.\r\nthis is a long string.\r\nthis is a long string.\r\nthis is a long string.";
887 trace(
"EDIT: Test notifications\n");
897 trace(
"EDIT: Single line, no ES_AUTOHSCROLL\n");
918 ok(1 ==
len,
"wrong text length, expected 1, got %d\n",
len);
941 ok(5 ==
len,
"text should have been truncated to limit, expected 5, got %d\n",
len);
952 trace(
"EDIT: Single line, ES_AUTOHSCROLL\n");
977 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
983 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
992 ok(5 ==
len,
"text should have been truncated to limit, expected 5, got %d\n",
len);
1003 trace(
"EDIT: Multline, no ES_AUTOHSCROLL, no ES_AUTOVSCROLL\n");
1008 10, 10, (50 *
dpi) / 96, (50 *
dpi) / 96,
1019 ok(0 ==
len,
"text should have been truncated, expected 0, got %d\n",
len);
1042 ok(5 ==
len,
"text should have been truncated to limit, expected 5, got %d\n",
len);
1053 trace(
"EDIT: Multline, ES_AUTOHSCROLL, no ES_AUTOVSCROLL\n");
1058 10, 10, (50 *
dpi) / 96, (50 *
dpi) / 96,
1065 ok(0 ==
len,
"text should have been truncated, expected 0, got %d\n",
len);
1078 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
1087 ok(5 ==
len,
"text should have been truncated to limit, expected 5, got %d\n",
len);
1093 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
1098 trace(
"EDIT: Multline, ES_AUTOHSCROLL and ES_AUTOVSCROLL\n");
1110 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
1116 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
1125 ok(5 ==
len,
"text should have been truncated to limit, expected 5, got %d\n",
len);
1131 ok(
lstrlenA(str2) ==
len,
"text shouldn't have been truncated\n");
1146 trace(
"EDIT: Test EM_CHARFROMPOS and EM_POSFROMCHAR\n");
1151 mid = lo + (hi - lo) / 2;
1153 for (
i = lo;
i < mid;
i++) {
1155 ok(0 ==
ret,
"expected 0 got %d\n",
ret);
1157 for (
i = mid;
i <= hi;
i++) {
1159 ok(1 ==
ret,
"expected 1 got %d\n",
ret);
1162 ok(-1 ==
ret,
"expected -1 got %d\n",
ret);
1169 mid = lo + (hi - lo) / 2;
1171 for (
i = lo;
i < mid;
i++) {
1173 ok(0 ==
ret,
"expected 0 got %d\n",
ret);
1175 for (
i = mid;
i <= hi;
i++) {
1177 ok(1 ==
ret,
"expected 1 got %d\n",
ret);
1180 ok(-1 ==
ret,
"expected -1 got %d\n",
ret);
1187 mid = lo + (hi - lo) / 2;
1189 for (
i = lo;
i < mid;
i++) {
1191 ok(0 ==
ret,
"expected 0 got %d\n",
ret);
1193 for (
i = mid;
i <= hi;
i++) {
1195 ok(1 ==
ret,
"expected 1 got %d\n",
ret);
1198 ok(-1 ==
ret,
"expected -1 got %d\n",
ret);
1205 mid = lo + (hi - lo) / 2 +1;
1207 for (
i = lo;
i < mid;
i++) {
1209 ok((0 ==
ret || 1 ==
ret ),
"expected 0 or 1 got %d\n",
ret);
1211 for (
i = mid;
i <= hi;
i++) {
1213 ok(1 ==
ret,
"expected 1 got %d\n",
ret);
1216 ok(-1 ==
ret,
"expected -1 got %d\n",
ret);
1223 mid = lo + (hi - lo) / 2 +1;
1225 for (
i = lo;
i < mid;
i++) {
1227 ok((0 ==
ret || 1 ==
ret ),
"expected 0 or 1 got %d\n",
ret);
1229 for (
i = mid;
i <= hi;
i++) {
1231 ok(1 ==
ret,
"expected 1 got %d\n",
ret);
1234 ok(-1 ==
ret,
"expected -1 got %d\n",
ret);
1241 mid = lo + (hi - lo) / 2 +1;
1243 for (
i = lo;
i < mid;
i++) {
1245 ok((0 ==
ret || 1 ==
ret ),
"expected 0 or 1 got %d\n",
ret);
1247 for (
i = mid;
i <= hi;
i++) {
1249 ok(1 ==
ret,
"expected 1 got %d\n",
ret);
1252 ok(-1 ==
ret,
"expected -1 got %d\n",
ret);
1261 static const char *
str =
"test\r\ntest";
1265 RECT rc1 = { 10, 10, 11, 11};
1278 ok( rc.
right - rc.
left > 20,
"size of the window (%d) is smaller than expected\n",
1327 static const char *
str =
"test\r\ntest";
1347 ok(
ret == 0,
"Expected 0, got %d\n",
ret);
1353 ok(
ret == 0,
"Expected 0, got %d\n",
ret);
1355 ok(
ret == 0,
"Expected 0, got len %d\n",
ret);
1367 trace(
"EDIT: buffer limit for single-line\n");
1370 ok(
r == 30000,
"Incorrect default text limit, expected 30000 got %u\n",
r);
1373 ok(
r == 2147483646,
"got limit %u (expected 2147483646)\n",
r);
1377 trace(
"EDIT: buffer limit for multi-line\n");
1380 ok(
r == 30000,
"Incorrect default text limit, expected 30000 got %u\n",
r);
1383 ok(
r == 4294967295U,
"got limit %u (expected 4294967295)\n",
r);
1390 static const char *single_line_str =
"a";
1391 static const char *multiline_str =
"Test\r\nText";
1408 ok(!
ret,
"Returned %x, expected 0.\n",
ret);
1411 ok(!
ret,
"Returned %x, expected 0.\n",
ret);
1414 ok(!
ret,
"Returned %x, expected 0.\n",
ret);
1417 ok(!
ret,
"Returned %x, expected 0.\n",
ret);
1433 ok(!
ret,
"Returned %x, expected 0.\n",
ret);
1441 case 932:
case 936:
case 949:
case 950:
case 1361:
1460 memset(&lf, 0,
sizeof(lf));
1470 hwnd =
CreateWindowExA(0,
"Edit",
"A",
WS_POPUP, 0, 0, 5000, 1000,
NULL,
NULL,
NULL,
NULL);
1499 empty_expect = threshold > 80 ? small_margins :
expect;
1502 hwnd =
CreateWindowExA(0,
"Edit",
"A",
WS_POPUP, 0, 0, threshold - 1, 100,
NULL,
NULL,
NULL,
NULL);
1518 hwnd =
CreateWindowExA(0,
"Edit",
"A",
WS_POPUP, 0, 0, threshold, 100,
NULL,
NULL,
NULL,
NULL);
1534 hwnd =
CreateWindowExA(0,
"Edit",
"A",
WS_POPUP, 0, 0, 0, 0,
NULL,
NULL,
NULL,
NULL);
1557 (
fs.fsCsb[0] & FS_DBCS_MASK));
1563 if (side_bearing < 0)
1564 margin =
min(-side_bearing,
width/2);
1598 BOOL cjk_charset, cjk_font;
1604 const WCHAR EditW[] = {
'E',
'd',
'i',
't',0},
strW[] = {
'W',0};
1614 memset(&lf, 0,
sizeof(lf));
1624 hwnd =
CreateWindowExW(0, EditW,
strW,
WS_POPUP, 0, 0, 5000, 1000,
NULL,
NULL,
NULL,
NULL);
1643 if ((cjk_charset || cjk_font) &&
1644 pGetCharWidthInfo && pGetCharWidthInfo(
hdc, &
info)) {
1654 font_expect = small_margins;
1667 ok(
margins == font_expect,
"%s:%d: expected %d, %d, got %d, %d\n", facename,
charset,
HIWORD(font_expect),
LOWORD(font_expect),
HIWORD(
margins),
LOWORD(
margins));
1671 ok(
margins ==
expect,
"%s:%d: expected %d, %d, got %d, %d\n", facename,
charset,
HIWORD(
expect),
LOWORD(
expect),
HIWORD(
margins),
LOWORD(
margins));
1675 hwnd =
CreateWindowExA(0,
"Edit",
"A",
WS_POPUP, 0, 0, 5000, 1000,
NULL,
NULL,
NULL,
NULL);
1686 font_expect = small_margins;
1699 ok(
margins == font_expect,
"%s:%d: expected %d, %d, got %d, %d\n", facename,
charset,
HIWORD(font_expect),
LOWORD(font_expect),
HIWORD(
margins),
LOWORD(
margins));
1703 ok(
margins ==
expect,
"%s:%d: expected %d, %d, got %d, %d\n", facename,
charset,
HIWORD(
expect),
LOWORD(
expect),
HIWORD(
margins),
LOWORD(
margins));
1729 RECT old_rect, new_rect;
1730 INT old_right_margin;
1731 DWORD old_margins, new_margins;
1736 old_right_margin =
HIWORD(old_margins);
1742 ok(
LOWORD(new_margins) == 10,
"Wrong left margin: %d\n",
LOWORD(new_margins));
1743 ok(
HIWORD(new_margins) == old_right_margin,
"Wrong right margin: %d\n",
HIWORD(new_margins));
1747 ok(
LOWORD(new_margins) == 10,
"Wrong left margin: %d\n",
LOWORD(new_margins));
1748 ok(
HIWORD(new_margins) == 10,
"Wrong right margin: %d\n",
HIWORD(new_margins));
1756 ok(new_rect.
left == old_rect.
left + 10,
"The left border of the rectangle is wrong\n");
1757 ok(new_rect.
right == old_rect.
right - 15,
"The right border of the rectangle is wrong\n");
1758 ok(new_rect.
top == old_rect.
top,
"The top border of the rectangle must not change\n");
1759 ok(new_rect.
bottom == old_rect.
bottom,
"The bottom border of the rectangle must not change\n");
1765 SetRect(&old_rect, 1, 1, 99, 99);
1770 ok(
EqualRect(&old_rect, &new_rect),
"The border of the rectangle has changed\n");
1777 ok(
EqualRect(&old_rect, &new_rect),
"The border of the rectangle has changed\n");
1780 ok(
EqualRect(&old_rect, &new_rect),
"The border of the rectangle has changed\n");
1783 ok(
EqualRect(&old_rect, &new_rect),
"The border of the rectangle has changed\n");
1786 ok(
EqualRect(&old_rect, &new_rect),
"The border of the rectangle has changed\n");
1812 skip(
"MS PGothic is not available, skipping some margin tests\n");
1819 skip(
"Ume P Gothic is not available, skipping some margin tests\n");
1826 skip(
"SimSun is not available, skipping some margin tests\n");
1838 skip(
"Arial not found - skipping font change margin tests\n");
1846 memset(&lf, 0,
sizeof(lf));
1932#define edit_pos_ok(exp, got, txt) \
1933 ok(exp == got, "wrong " #txt " expected %d got %d\n", exp, got);
1935#define check_pos(hwEdit, set_height, test_top, test_height, test_left) \
1939 set_client_height(hwEdit, set_height); \
1940 SendMessageA(hwEdit, EM_GETRECT, 0, (LPARAM) &format_rect); \
1941 left_margin = LOWORD(SendMessageA(hwEdit, EM_GETMARGINS, 0, 0)); \
1942 edit_pos_ok(test_top, format_rect.top, vertical position); \
1943 edit_pos_ok((int)test_height, format_rect.bottom - format_rect.top, height); \
1944 edit_pos_ok(test_left, format_rect.left - left_margin, left); \
1963 ok (
font !=
NULL,
"GetStockObject SYSTEM_FONT failed\n");
1965 ok (
dc !=
NULL,
"GetDC() failed\n");
1968 ok (xb,
"GetTextMetrics failed\n");
2070 trace(
"EDIT: Text position (Single line)\n");
2072 trace(
"EDIT: Text position (Multi line)\n");
2085 ok(
r ==
ES_PASSWORD,
"Wrong style expected ES_PASSWORD got: 0x%x\n",
r);
2093 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2110 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2112 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2117 ok(
r == 0,
"Expected: 0, got: %d\n",
r);
2129 const char*
text =
"undo this";
2133 ok(0 ==
r,
"Wrong style expected 0x%x got: 0x%x\n", 0,
r);
2140 cpMin = cpMax = 0xdeadbeef;
2144 ok(0 == cpMin,
"Expected: %d, got %d\n", 0, cpMin);
2145 ok(9 == cpMax,
"Expected: %d, got %d\n", 9, cpMax);
2149 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2154 ok(0 ==
r,
"Expected: %d, got len %d\n", 0,
r);
2159 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2169 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2174 ok(
r == 0,
"Expected: %d, got len %d\n", 0,
r);
2196 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2201 ok(2 ==
r,
"Expected: %d, got len %d\n", 2,
r);
2209 ok(0 ==
r,
"Wrong style expected 0x%x got: 0x%x\n", 0,
r);
2216 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2221 ok(0 ==
r,
"Expected: %d, got len %d\n", 0,
r);
2236 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2241 ok(0 ==
r,
"Expected: %d, got len %d\n", 0,
r);
2263 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2268 ok(1 ==
r,
"Expected: %d, got len %d\n", 1,
r);
2276 ok(0 ==
r,
"Wrong style expected 0x%x got: 0x%x\n", 0,
r);
2283 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2288 ok(0 ==
r,
"Expected: %d, got len %d\n", 0,
r);
2300 ok(333 ==
r,
"Expected %d, got %d\n", 333,
r);
2302 ok(111 ==
r,
"Expected %d, got %d\n", 111,
r);
2304 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2308 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2310 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2312 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2316 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2318 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2320 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2324 ok(333 ==
r,
"Expected %d, got %d\n", 333,
r);
2326 ok(111 ==
r,
"Expected %d, got %d\n", 111,
r);
2328 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2332 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2334 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2336 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2340 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2342 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2344 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2348 ok(22 ==
r,
"Expected %d, got %d\n", 22,
r);
2350 ok(33 ==
r,
"Expected %d, got %d\n", 33,
r);
2359 ok(2222 ==
r,
"Expected %d, got %d\n", 2222,
r);
2361 ok(1111 ==
r,
"Expected %d, got %d\n", 1111,
r);
2363 ok(2222 ==
r,
"Expected %d, got %d\n", 2222,
r);
2365 ok(11 ==
r,
"Expected %d, got %d\n", 11,
r);
2374 ok(333 ==
r,
"Expected %d, got %d\n", 333,
r);
2376 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2378 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2382 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2384 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2386 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2390 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2392 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2394 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2403 ok(222 ==
r,
"Expected %d, got %d\n", 222,
r);
2405 ok(111 ==
r,
"Expected %d, got %d\n", 111,
r);
2407 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2411 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2413 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2415 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2419 ok(222 ==
r,
"Expected %d, got %d\n", 222,
r);
2421 ok(111 ==
r,
"Expected %d, got %d\n", 111,
r);
2423 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2427 ok(222 ==
r,
"Expected %d, got %d\n", 222,
r);
2429 ok(111 ==
r,
"Expected %d, got %d\n", 111,
r);
2431 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2435 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2437 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2439 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2443 ok(222 ==
r,
"Expected %d, got %d\n", 222,
r);
2445 ok(111 ==
r,
"Expected %d, got %d\n", 111,
r);
2447 ok(444 ==
r,
"Expected %d, got %d\n", 444,
r);
2469 HWND hwEdit, hwParent;
2476 ok(1 ==
r,
"expected 1, got %d\n",
r);
2514 memset(&mbi, 0,
sizeof(mbi));
2515 mbi.
cbSize =
sizeof(mbi);
2518 ok(
ret,
"GetMenuBarInfo failed\n");
2527 memset(&mbi, 0,
sizeof(mbi));
2528 mbi.
cbSize =
sizeof(mbi);
2531 ok(
ret,
"GetMenuBarInfo failed\n");
2625 "Expected no WM_COMMAND messages, got %d\n",
menu_messages.wm_command);
2627 "Expected 1 EM_SETSEL message, got %d\n",
menu_messages.em_setsel);
2642 test2.cbClsExtra = 0;
2643 test2.cbWndExtra = 0;
2654 test3.cbClsExtra = 0;
2655 test3.cbWndExtra = 0;
2666 test4.cbClsExtra = 0;
2667 test4.cbWndExtra = 0;
2706 char szLocalString[
MAXLEN];
2719 trace(
"EDIT: Oversized font (Multi line)\n");
2730 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2732 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2734 ok(1 ==
r,
"Expected: %d, got: %d\n", 1,
r);
2737 ok(
strcmp(szLocalString,
"ABC")==0,
2738 "Wrong contents of edit: %s\n", szLocalString);
2741 ok(
r != -1,
"EM_POSFROMCHAR failed index 0\n");
2743 ok(
r != -1,
"EM_POSFROMCHAR failed index 1\n");
2745 ok(
r != -1,
"EM_POSFROMCHAR failed index 2\n");
2747 ok(
r == -1,
"EM_POSFROMCHAR succeeded index 3\n");
2768#define test_dm_messages(wmcommand, wmclose, wmgetdefid, wmnextdlgctl) \
2769 ok(dm_messages.wm_command == wmcommand, "expected %d WM_COMMAND messages, " \
2770 "got %d\n", wmcommand, dm_messages.wm_command); \
2771 ok(dm_messages.wm_close == wmclose, "expected %d WM_CLOSE messages, " \
2772 "got %d\n", wmclose, dm_messages.wm_close); \
2773 ok(dm_messages.wm_getdefid == wmgetdefid, "expected %d WM_GETDIFID messages, " \
2774 "got %d\n", wmgetdefid, dm_messages.wm_getdefid);\
2775 ok(dm_messages.wm_nextdlgctl == wmnextdlgctl, "expected %d WM_NEXTDLGCTL messages, " \
2776 "got %d\n", wmnextdlgctl, dm_messages.wm_nextdlgctl)
2801 HWND hwEdit, hwParent, hwButton;
2807 ok(1 ==
r,
"expected 1, got %d\n",
r);
2809 ok(11 ==
len,
"expected 11, got %d\n",
len);
2812 ok(0x8d ==
r,
"expected 0x8d, got 0x%x\n",
r);
2815 ok(1 ==
r,
"expected 1, got %d\n",
r);
2817 ok(13 ==
len,
"expected 13, got %d\n",
len);
2820 ok(0x8d ==
r,
"expected 0x8d, got 0x%x\n",
r);
2822 ok(1 ==
r,
"expected 1, got %d\n",
r);
2824 ok(13 ==
len,
"expected 13, got %d\n",
len);
2827 ok(1 ==
r,
"expected 1, got %d\n",
r);
2829 ok(13 ==
len,
"expected 13, got %d\n",
len);
2836 ok(1 ==
r,
"expected 1, got %d\n",
r);
2838 ok(11 ==
len,
"expected 11, got %d\n",
len);
2843 msg.lParam = 0xe0001;
2845 ok(0x8d ==
r,
"expected 0x8d, got 0x%x\n",
r);
2848 ok(1 ==
r,
"expected 1, got %d\n",
r);
2850 ok(11 ==
len,
"expected 11, got %d\n",
len);
2860 ok(1 ==
r,
"expected 1, got %d\n",
r);
2865 ok(1 ==
r,
"expected 1, got %d\n",
r);
2872 msg.lParam = 0xf0001;
2874 ok(0x89 ==
r,
"expected 0x89, got 0x%x\n",
r);
2879 ok(1 ==
r,
"expected 1, got %d\n",
r);
2890 ok(1 ==
r,
"expected 1, got %d\n",
r);
2897 msg.lParam = 0x10001;
2899 ok(0x8d ==
r,
"expected 0x8d, got 0x%x\n",
r);
2904 ok(1 ==
r,
"expected 1, got %d\n",
r);
2909 ok(1 ==
r,
"expected 1, got %d\n",
r);
2914 ok(1 ==
r,
"expected 1, got %d\n",
r);
2923 ok(1 ==
r,
"expected 1, got %d\n",
r);
2933 static const char str0[] =
"untouched";
2934 static const char str1[] =
"1111+1111+1111#";
2935 static const char str1_1[] =
"2111+1111+1111#";
2936 static const char str2[] =
"2222-2222-2222-2222#";
2937 static const char str3[] =
"3333*3333*3333*3333*3333#";
2947 trace(
"EDIT: EM_GETHANDLE\n");
2954 ok(hmem ==
NULL,
"got %p (expected NULL)\n", hmem);
2970 "got %d and \"%s\" (expected %d and \"%s\")\n",
r,
current,
lstrlenA(str1), str1);
2973 ok(hmem !=
NULL,
"got %p (expected != NULL)\n", hmem);
2981 "got %d and \"%s\" (expected %d and \"%s\")\n",
len,
buffer,
lstrlenA(str1), str1);
2991 "Unexpected retval %d and text \"%s\" (expected %d and \"%s\")\n",
r,
current,
lstrlenA(str1), str1);
3005 "Unexpected retval %d and text \"%s\" (expected %d and \"%s\")\n",
r,
current,
lstrlenA(str1_1), str1_1);
3009 ok(
r,
"Failed to set text.\n");
3016 ok(
r,
"Failed to replace selection.\n");
3024 ok(halloc !=
NULL,
"got %p (expected != NULL)\n", halloc);
3035 ok(hmem2 !=
NULL,
"got %p (expected != NULL)\n", hmem2);
3045 "got %d and \"%s\" (expected %d and \"%s\")\n",
r,
current,
lstrlenA(str2), str2);
3055 "got %d and \"%s\" (expected %d and \"%s\")\n",
r,
current,
lstrlenA(str3), str3);
3075 ok(hmem2 == hmem,
"got %p (expected %p)\n", hmem2, hmem);
3089 static const char *
str =
"this is a simple text";
3090 static const char *str2 =
"first line\r\nsecond line";
3097 ok(hmem !=
NULL,
"got %p (expected != NULL)\n", hmem);
3108 ok(hmem_ret == hmem,
"expected %p, got %p\n", hmem, hmem_ret);