ReactOS 0.4.16-dev-197-g92996da
pager.c
Go to the documentation of this file.
1/*
2 * Unit tests for the pager control
3 *
4 * Copyright 2012 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <windows.h>
22#include <commctrl.h>
23
24#include "wine/test.h"
25#include "msg.h"
26
27#define NUM_MSG_SEQUENCES 1
28#define PAGER_SEQ_INDEX 0
29
33static const CHAR test_a[] = "test";
34static const WCHAR test_w[] = L"test";
35/* Double zero so that it's safe to cast it to WCHAR * */
36static const CHAR te_a[] = {'t', 'e', 0, 0};
37static const CHAR large_a[] =
38 "You should have received a copy of the GNU Lesser General Public License along with this ...";
39static const WCHAR large_w[] =
40 L"You should have received a copy of the GNU Lesser General Public License along with this ...";
41static const WCHAR large_truncated_65_w[65] =
42 L"You should have received a copy of the GNU Lesser General Public";
43static const WCHAR large_truncated_80_w[80] =
44 L"You should have received a copy of the GNU Lesser General Public License along w";
45static WCHAR buffer[64];
46
47/* Text field conversion test behavior flags. */
49{
57 ZERO_SEND = 0x80
58};
59
61{
64};
65
66static struct notify_test_info
67{
72 /* Whether parent received notification */
77 /* Text field conversion test behavior flag */
80
82{
83 /* Data sent to pager */
87 /* Data expected by parent of pager */
88 const void *expect_text;
89};
90
92{
93 /* Data sent to pager */
97 /* Data for parent to write */
102 /* Data when message returned */
103 const void *return_text;
105};
106
108{
109 void *ptr;
110 size_t size;
119};
120
122{
123 {test_w, sizeof(test_w), ARRAY_SIZE(buffer), test_a}
124};
125
127{
128 {test_w, sizeof(test_w), ARRAY_SIZE(buffer), test_w}
129};
130
132{
133 {L"", sizeof(L""), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_w, ARRAY_SIZE(buffer)},
134 {L"", sizeof(L""), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, test_w, ARRAY_SIZE(buffer)},
135 {NULL, sizeof(L""), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, NULL, ARRAY_SIZE(buffer)},
137 {L"", sizeof(L""), ARRAY_SIZE(buffer), "", 0, 0, 1, L"", 1},
138};
139
141{
142 {L"", sizeof(L""), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_a, ARRAY_SIZE(buffer)},
143 {L"", sizeof(L""), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, test_a, ARRAY_SIZE(buffer)},
144};
145
146static const struct notify_test_tooltip
147{
148 /* Data for parent to write */
153 /* Data when message returned */
158 /* Data expected by parent */
160 /* Data send to parent */
165{
166 {NULL, 0, NULL, NULL, L"", -1, L""},
167 {test_a, sizeof(test_a), NULL, NULL, test_w, -1, test_w},
168 {test_a, sizeof(test_a), test_a, NULL, test_w, -1, test_w},
169 {test_a, sizeof(test_a), (CHAR *)1, (HMODULE)0xdeadbeef, L"", -1, (WCHAR *)1, (HMODULE)0xdeadbeef},
170 {test_a, sizeof(test_a), test_a, (HMODULE)0xdeadbeef, test_w, -1, test_w, (HMODULE)0xdeadbeef},
171 {NULL, 0, test_a, NULL, test_w, -1, test_w},
172 {test_a, 2, test_a, NULL, test_w, -1, test_w},
173 {NULL, 0, NULL, NULL, test_w, -1, test_w, NULL, test_a, test_w, sizeof(test_w)},
174 {NULL, 0, NULL, NULL, L"", -1, L"", NULL, "", NULL, 0, test_w},
177
179{
180 /* Data send to parent */
182 /* Data expected by parent */
184 /* Data for parent to write */
188 /* Data when message returned */
193{
194 {test_w, test_a},
195 {NULL, NULL, NULL, 0, test_a, L"", -1, test_w},
196 {NULL, NULL, test_a, sizeof(test_a), NULL, test_w, -1, test_w},
197 {NULL, NULL, test_a, 2, test_a, (WCHAR *)te_a, -1, test_w},
198 {NULL, NULL, NULL, 0, large_a, NULL, 0, large_w}
200
201#define CHILD1_ID 1
202#define CHILD2_ID 2
203
204static BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*);
205static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
206
208
209static const struct message set_child_seq[] = {
210 { PGM_SETCHILD, sent },
213 { WM_NOTIFY, sent|id|parent, 0, 0, PGN_CALCSIZE },
217 { WM_CHILDACTIVATE, sent|id, 0, 0, CHILD1_ID },
220 { 0 }
221};
222
223/* This differs from the above message list only in the child window that is
224 * expected to receive the child messages. No message is sent to the old child.
225 * Also child 2 is hidden while child 1 is visible. The pager does not make the
226 * hidden child visible. */
227static const struct message switch_child_seq[] = {
228 { PGM_SETCHILD, sent },
231 { WM_NOTIFY, sent|id|parent, 0, 0, PGN_CALCSIZE },
235 { WM_CHILDACTIVATE, sent|id, 0, 0, CHILD2_ID },
237 { WM_SIZE, sent|id|defwinproc, 0, 0, CHILD2_ID },
238 { 0 }
239};
240
241static const struct message set_pos_seq[] = {
242 { PGM_SETPOS, sent },
245 { WM_NOTIFY, sent|id|parent, 0, 0, PGN_CALCSIZE },
247 { WM_MOVE, sent|optional },
248 /* The WM_SIZE handler sends WM_WINDOWPOSCHANGING, WM_CHILDACTIVATE
249 * and WM_WINDOWPOSCHANGED (which sends WM_MOVE) to the child.
250 * Another WM_WINDOWPOSCHANGING is sent afterwards.
251 *
252 * The 2nd WM_WINDOWPOSCHANGING is unconditional, but the comparison
253 * function is too simple to roll back an accepted message, so we have
254 * to mark the 2nd message optional. */
255 { WM_SIZE, sent|optional },
256 { WM_WINDOWPOSCHANGING, sent|id, 0, 0, CHILD1_ID }, /* Actually optional. */
257 { WM_CHILDACTIVATE, sent|id, 0, 0, CHILD1_ID }, /* Actually optional. */
260 { WM_WINDOWPOSCHANGING, sent|id|optional, 0, 0, CHILD1_ID }, /* Actually not optional. */
261 { WM_CHILDACTIVATE, sent|id|optional, 0, 0, CHILD1_ID }, /* Actually not optional. */
262 { 0 }
263};
264
265static const struct message set_pos_empty_seq[] = {
266 { PGM_SETPOS, sent },
267 { 0 }
268};
269
270static CHAR *heap_strdup(const CHAR *str)
271{
272 int len = lstrlenA(str) + 1;
273 CHAR *ret = heap_alloc(len * sizeof(CHAR));
274 lstrcpyA(ret, str);
275 return ret;
276}
277
279{
280 static LONG defwndproc_counter = 0;
281 LRESULT ret;
282 struct message msg;
283
284 /* log system messages, except for painting */
285 if (message < WM_USER &&
286 message != WM_PAINT &&
288 message != WM_NCPAINT &&
290 message != WM_GETTEXT &&
291 message != WM_GETICON &&
293 {
294 msg.message = message;
295 msg.flags = sent|wparam|lparam|parent;
296 if (defwndproc_counter) msg.flags |= defwinproc;
297 msg.wParam = wParam;
298 msg.lParam = lParam;
299 if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code;
301 }
302
303 if (message == WM_NOTIFY)
304 {
305 NMHDR *nmhdr = (NMHDR *)lParam;
306
307 switch (nmhdr->code)
308 {
309 case PGN_CALCSIZE:
310 {
311 NMPGCALCSIZE *nmpgcs = (NMPGCALCSIZE *)lParam;
313
314 if (style & PGS_HORZ)
315 ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
316 else
317 ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
318 break;
319 }
320 default:
321 ;
322 }
323 }
324
325 defwndproc_counter++;
327 defwndproc_counter--;
328
329 return ret;
330}
331
333{
334 WNDCLASSA cls;
335
336 cls.style = 0;
338 cls.cbClsExtra = 0;
339 cls.cbWndExtra = 0;
341 cls.hIcon = 0;
344 cls.lpszMenuName = NULL;
345 cls.lpszClassName = "Pager test parent class";
346 return RegisterClassA(&cls);
347}
348
350{
352 return NULL;
353
354 return CreateWindowA("Pager test parent class", "Pager test parent window",
356 0, 0, 200, 200, 0, NULL, GetModuleHandleA(NULL), NULL );
357}
358
360{
362 struct message msg = { 0 };
363
364 msg.message = message;
365 msg.flags = sent|wparam|lparam;
366 msg.wParam = wParam;
367 msg.lParam = lParam;
369 return CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
370}
371
373{
374 WNDPROC oldproc;
375 HWND hwnd;
376 RECT rect;
377
380 0, 0, 100, 100, parent_wnd, 0, GetModuleHandleA(0), 0 );
383 return hwnd;
384}
385
387{
388 static LONG defwndproc_counter;
389 struct message msg = { 0 };
390 LRESULT ret;
391
392 msg.message = message;
393 msg.flags = sent | wparam | lparam;
394 if (defwndproc_counter)
395 msg.flags |= defwinproc;
396 msg.wParam = wParam;
397 msg.lParam = lParam;
398
399 if (hwnd == child1_wnd)
400 msg.id = CHILD1_ID;
401 else if (hwnd == child2_wnd)
402 msg.id = CHILD2_ID;
403 else
404 msg.id = 0;
405
407
408 defwndproc_counter++;
410 defwndproc_counter--;
411
412 return ret;
413}
414
416{
417 WNDCLASSA cls;
418
419 cls.style = 0;
421 cls.cbClsExtra = 0;
422 cls.cbWndExtra = 0;
424 cls.hIcon = 0;
427 cls.lpszMenuName = NULL;
428 cls.lpszClassName = "Pager test child class";
429 return RegisterClassA(&cls);
430}
431
432static void test_pager(void)
433{
434 HWND pager;
435 RECT rect, rect2;
436
438 ok(pager != NULL, "Fail to create pager\n");
439
441
442 child1_wnd = CreateWindowA( "Pager test child class", "button", WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 300, 300,
443 pager, 0, GetModuleHandleA(0), 0 );
444 child2_wnd = CreateWindowA("Pager test child class", "button", WS_CHILD | WS_BORDER, 0, 0, 300, 300,
445 pager, 0, GetModuleHandleA(0), 0);
446
450 GetWindowRect( pager, &rect );
451 ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
452 "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top );
453
456 ok_sequence(sequences, PAGER_SEQ_INDEX, switch_child_seq, "switch to invisible child", FALSE);
457 GetWindowRect(pager, &rect);
458 ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
459 "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top);
460 ok(!IsWindowVisible(child2_wnd), "Child window 2 is visible\n");
461
464 ok_sequence(sequences, PAGER_SEQ_INDEX, set_child_seq, "switch to visible child", FALSE);
465 GetWindowRect(pager, &rect);
466 ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
467 "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top);
468
470 SendMessageA( pager, PGM_SETPOS, 0, 10 );
472 GetWindowRect( pager, &rect );
473 ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
474 "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top );
475
477 SendMessageA( pager, PGM_SETPOS, 0, 10 );
479
481 SendMessageA( pager, PGM_SETPOS, 0, 9 );
483
484 DestroyWindow( pager );
485
486 /* Test if resizing works */
488 ok(pager != NULL, "failed to create pager control\n");
489
490 GetWindowRect( pager, &rect );
491 MoveWindow( pager, 0, 0, 200, 100, TRUE );
492 GetWindowRect( pager, &rect2 );
493 ok(rect2.right - rect2.left > rect.right - rect.left, "expected pager window to resize, %s\n",
495
496 DestroyWindow( pager );
497
499 ok(pager != NULL, "failed to create pager control\n");
500
501 GetWindowRect( pager, &rect );
502 MoveWindow( pager, 0, 0, 100, 200, TRUE );
503 GetWindowRect( pager, &rect2 );
504 ok(rect2.bottom - rect2.top > rect.bottom - rect.top, "expected pager window to resize, %s\n",
506
507 DestroyWindow( pager );
508}
509
511{
512 switch (message)
513 {
514 case WM_NOTIFYFORMAT:
515 if (lParam == NF_QUERY)
516 {
518 return notify_format;
519 }
520 else if (lParam == NF_REQUERY)
521 return SendMessageA(GetParent(hwnd), WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
522 else
523 return 0;
524 default:
527 }
528}
529
531{
532 static const WCHAR class_w[] = {'P', 'a', 'g', 'e', 'r', ' ', 'n', 'o', 't', 'i', 'f', 'y', 'f',
533 'o', 'r', 'm', 'a', 't', ' ', 'c', 'l', 'a', 's', 's', 0};
534 WNDCLASSW cls = {0};
535
538 cls.lpszClassName = class_w;
539 return RegisterClassW(&cls);
540}
541
542static void test_wm_notifyformat(void)
543{
544 static const WCHAR class_w[] = {'P', 'a', 'g', 'e', 'r', ' ', 'n', 'o', 't', 'i', 'f', 'y', 'f',
545 'o', 'r', 'm', 'a', 't', ' ', 'c', 'l', 'a', 's', 's', 0};
546 static const WCHAR parent_w[] = {'p', 'a', 'r', 'e', 'n', 't', 0};
547 static const WCHAR pager_w[] = {'p', 'a', 'g', 'e', 'r', 0};
548 static const WCHAR child_w[] = {'c', 'h', 'i', 'l', 'd', 0};
549 static const INT formats[] = {NFR_UNICODE, NFR_ANSI};
550 HWND parent, pager, child;
551 LRESULT ret;
552 BOOL bret;
553 INT i;
554
556 ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
557
558 for (i = 0; i < ARRAY_SIZE(formats); i++)
559 {
561 parent = CreateWindowW(class_w, parent_w, WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleW(0), 0);
562 ok(parent != NULL, "CreateWindow failed\n");
563 pager = CreateWindowW(WC_PAGESCROLLERW, pager_w, WS_CHILD, 0, 0, 100, 100, parent, 0, GetModuleHandleW(0), 0);
564 ok(pager != NULL, "CreateWindow failed\n");
565 child = CreateWindowW(class_w, child_w, WS_CHILD, 0, 0, 100, 100, pager, 0, GetModuleHandleW(0), 0);
566 ok(child != NULL, "CreateWindow failed\n");
568
569 /* Test parent */
571 ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent, NF_REQUERY);
572 ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
573 ok(notify_query_received, "Didn't receive notify\n");
574
575 /* Send NF_QUERY directly to parent */
577 ret = SendMessageW(parent, WM_NOTIFYFORMAT, (WPARAM)pager, NF_QUERY);
578 ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
579 ok(notify_query_received, "Didn't receive notify\n");
580
581 /* Pager send notifications to its parent regardless of wParam */
583 ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent_wnd, NF_REQUERY);
584 ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
585 ok(notify_query_received, "Didn't receive notify\n");
586
587 /* Pager always wants Unicode notifications from children */
588 ret = SendMessageW(child, WM_NOTIFYFORMAT, (WPARAM)pager, NF_REQUERY);
589 ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
590 ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)child, NF_QUERY);
591 ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
592
594 }
595
597}
598
599static void notify_generic_text_handler(CHAR **text, INT *text_max)
600{
601 const struct notify_test_send *send_data;
602 const struct notify_test_receive *receive_data;
603
605 {
606 case CONVERT_SEND:
608 {
612 ok(!*text[0], "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n",
615 ok(!lstrcmpA(send_data->expect_text, *text), "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n",
617 (CHAR *)send_data->expect_text, *text);
618 else
619 ok(!lstrcmpW((WCHAR *)send_data->expect_text, (WCHAR *)*text),
620 "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n", notify_test_info.unicode,
623 if (text_max)
624 ok(*text_max == send_data->send_text_max, "Code 0x%08x test 0x%08x sub test %d expect %d, got %d\n",
626 send_data->send_text_max, *text_max);
627 break;
628 }
629 case CONVERT_RECEIVE:
631 {
634 if (text_max)
635 ok(*text_max == receive_data->send_text_max, "Code 0x%08x test 0x%08x sub test %d expect %d, got %d\n",
637 receive_data->send_text_max, *text_max);
638
639 if (receive_data->write_text)
640 memcpy(*text, receive_data->write_text, receive_data->write_text_size);
641 /* 64bit Windows will try to free the text pointer even if it's application provided when handling
642 * HDN_GETDISPINFOW. Deliberate leak here. */
644 *text = heap_strdup(receive_data->write_pointer);
645 else
646 *text = (char *)receive_data->write_pointer;
647 if (text_max && receive_data->write_text_max != -1) *text_max = receive_data->write_text_max;
648 break;
649 }
651 ok(!*text[0], "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n",
653 break;
655 ok(!*text, "Code 0x%08x test 0x%08x sub test %d expect null text\n", notify_test_info.unicode,
657 break;
658 }
659}
660
662{
664 ok(nm->lpszText == nm->szText, "Sub test %d expect %p, got %p\n", notify_test_info.sub_test_id, nm->szText,
665 nm->lpszText);
666 if (data->expect_sztext)
667 ok(!lstrcmpA(data->expect_sztext, nm->szText), "Sub test %d expect %s, got %s\n", notify_test_info.sub_test_id,
668 data->expect_sztext, nm->szText);
669 if (data->write_sztext) memcpy(nm->szText, data->write_sztext, data->write_sztext_size);
670 if (data->write_lpsztext) nm->lpszText = (char *)data->write_lpsztext;
671 if (data->write_hinst) nm->hinst = data->write_hinst;
672}
673
675{
677 if (data->expect_pszformat)
678 ok(!lstrcmpA(data->expect_pszformat, nm->pszFormat), "Sub test %d expect %s, got %s\n",
679 notify_test_info.sub_test_id, data->expect_pszformat, nm->pszFormat);
680 ok(nm->pszDisplay == nm->szDisplay, "Test %d expect %p, got %p\n", notify_test_info.sub_test_id, nm->szDisplay,
681 nm->pszDisplay);
682 if (data->write_szdisplay) memcpy(nm->szDisplay, data->write_szdisplay, data->write_szdisplay_size);
683 if (data->write_pszdisplay) nm->pszDisplay = data->write_pszdisplay;
684}
685
687{
688 static const WCHAR test[] = {'t', 'e', 's', 't', 0};
689 switch (message)
690 {
691 case WM_NOTIFY:
692 {
693 NMHDR *hdr = (NMHDR *)lParam;
694
695 /* Not notifications we want to test */
696 if (!notify_test_info.unicode) break;
697 ok(!notify_test_info.received, "Extra notification received\n");
698
699 ok(wParam == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
700 ok(hdr->code == notify_test_info.ansi, "Expect 0x%08x, got 0x%08x\n", notify_test_info.ansi, hdr->code);
701 ok(hdr->idFrom == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
702 ok(hdr->hwndFrom == notify_test_info.hwnd_from, "Expect %p, got %p\n", notify_test_info.hwnd_from, hdr->hwndFrom);
703
704 if (hdr->code != notify_test_info.ansi)
705 {
706 skip("Notification code mismatch, skipping lParam check\n");
707 return 0;
708 }
709 switch (hdr->code)
710 {
711 /* ComboBoxEx */
712 case CBEN_INSERTITEM:
713 case CBEN_DELETEITEM:
714 {
715 NMCOMBOBOXEXW *nmcbe = (NMCOMBOBOXEXW *)hdr;
717 break;
718 }
719 case CBEN_DRAGBEGINA:
720 {
721 NMCBEDRAGBEGINA *nmcbedb = (NMCBEDRAGBEGINA *)hdr;
722 ok(!lstrcmpA(nmcbedb->szText, test_a), "Expect %s, got %s\n", nmcbedb->szText, test_a);
723 break;
724 }
725 case CBEN_ENDEDITA:
726 {
727 NMCBEENDEDITA *nmcbeed = (NMCBEENDEDITA *)hdr;
728 ok(!lstrcmpA(nmcbeed->szText, test_a), "Expect %s, got %s\n", nmcbeed->szText, test_a);
729 break;
730 }
732 {
733 NMCOMBOBOXEXA *nmcbe = (NMCOMBOBOXEXA *)hdr;
735 break;
736 }
737 /* Date and Time Picker */
738 case DTN_FORMATA:
739 {
741 break;
742 }
743 case DTN_FORMATQUERYA:
744 {
747 break;
748 }
749 case DTN_WMKEYDOWNA:
750 {
753 break;
754 }
755 case DTN_USERSTRINGA:
756 {
759 break;
760 }
761 /* Header */
762 case HDN_BEGINDRAG:
763 case HDN_ENDDRAG:
766 case HDN_DROPDOWN:
767 case HDN_FILTERCHANGE:
768 case HDN_ITEMKEYDOWN:
771 {
772 NMHEADERW *nmhd = (NMHEADERW *)hdr;
773 ok(!lstrcmpW(nmhd->pitem->pszText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w),
774 wine_dbgstr_w(nmhd->pitem->pszText));
775 ok(!lstrcmpW(((HD_TEXTFILTERW *)nmhd->pitem->pvFilter)->pszText, test_w), "Expect %s, got %s\n",
777 break;
778 }
779 case HDN_BEGINTRACKA:
781 case HDN_ENDTRACKA:
782 case HDN_ITEMCHANGEDA:
784 case HDN_ITEMCLICKA:
786 case HDN_TRACKA:
787 {
788 NMHEADERA *nmhd = (NMHEADERA *)hdr;
789 ok(!lstrcmpA(nmhd->pitem->pszText, test_a), "Expect %s, got %s\n", test_a, nmhd->pitem->pszText);
790 ok(!lstrcmpA(((HD_TEXTFILTERA *)nmhd->pitem->pvFilter)->pszText, test_a), "Expect %s, got %s\n", test_a,
791 ((HD_TEXTFILTERA *)nmhd->pitem->pvFilter)->pszText);
792 break;
793 }
794 case HDN_GETDISPINFOA:
795 {
796 NMHDDISPINFOA *nmhddi = (NMHDDISPINFOA *)hdr;
798 break;
799 }
800 /* List View */
803 case LVN_GETDISPINFOA:
804 case LVN_SETDISPINFOA:
805 {
806 NMLVDISPINFOA *nmlvdi = (NMLVDISPINFOA *)hdr;
808 break;
809 }
810 case LVN_GETINFOTIPA:
811 {
812 NMLVGETINFOTIPA *nmlvgit = (NMLVGETINFOTIPA *)hdr;
813 notify_generic_text_handler(&nmlvgit->pszText, &nmlvgit->cchTextMax);
814 break;
815 }
817 case LVN_ODFINDITEMA:
818 {
819 NMLVFINDITEMA *nmlvfi = (NMLVFINDITEMA *)hdr;
821 break;
822 }
823 /* Toolbar */
824 case TBN_SAVE:
825 {
826 NMTBSAVE *nmtbs = (NMTBSAVE *)hdr;
828 break;
829 }
830 case TBN_RESTORE:
831 {
832 NMTBRESTORE *nmtbr = (NMTBRESTORE *)hdr;
834 break;
835 }
837 {
838 NMTOOLBARA *nmtb = (NMTOOLBARA *)hdr;
840 break;
841 }
842 case TBN_GETDISPINFOW:
843 {
844 NMTBDISPINFOW *nmtbdi = (NMTBDISPINFOW *)hdr;
845 notify_generic_text_handler((CHAR **)&nmtbdi->pszText, &nmtbdi->cchText);
846 break;
847 }
848 case TBN_GETINFOTIPA:
849 {
850 NMTBGETINFOTIPA *nmtbgit = (NMTBGETINFOTIPA *)hdr;
851 notify_generic_text_handler(&nmtbgit->pszText, &nmtbgit->cchTextMax);
852 break;
853 }
854 /* Tooltip */
855 case TTN_GETDISPINFOA:
856 {
858 break;
859 }
860 /* Tree View */
863 case TVN_GETDISPINFOA:
864 case TVN_SETDISPINFOA:
865 {
866 NMTVDISPINFOA *nmtvdi = (NMTVDISPINFOA *)hdr;
868 break;
869 }
870 case TVN_GETINFOTIPA:
871 {
872 NMTVGETINFOTIPA *nmtvgit = (NMTVGETINFOTIPA *)hdr;
873 notify_generic_text_handler(&nmtvgit->pszText, &nmtvgit->cchTextMax);
874 break;
875 }
876 case TVN_SINGLEEXPAND:
877 case TVN_BEGINDRAGA:
878 case TVN_BEGINRDRAGA:
881 case TVN_DELETEITEMA:
882 case TVN_SELCHANGINGA:
883 case TVN_SELCHANGEDA:
884 {
885 NMTREEVIEWA *nmtv = (NMTREEVIEWA *)hdr;
888 else
890 break;
891 }
892
893 default:
894 ok(0, "Unexpected message 0x%08x\n", hdr->code);
895 }
897 ok(!lstrcmpA(test_a, "test"), "test_a got modified\n");
898 ok(!lstrcmpW(test_w, test), "test_w got modified\n");
899 return 0;
900 }
901 case WM_NOTIFYFORMAT:
902 if (lParam == NF_QUERY) return NFR_ANSI;
903 break;
904 }
906}
907
909{
910 WNDCLASSA cls = {0};
911
914 cls.lpszClassName = "Pager notify class";
915 return RegisterClassA(&cls);
916}
917
918static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
919{
920 NMHDR *hdr = (NMHDR *)lParam;
921
922 notify_test_info.unicode = unicode;
925 notify_test_info.ansi = ansi;
927
928 hdr->code = unicode;
929 hdr->idFrom = 1;
930 hdr->hwndFrom = child1_wnd;
931
932 SendMessageW(pager, WM_NOTIFY, hdr->idFrom, lParam);
933 ok(notify_test_info.received, "Expect notification received\n");
934 ok(hdr->code == code_change ? ansi : unicode, "Expect 0x%08x, got 0x%08x\n", hdr->code,
935 code_change ? ansi : unicode);
936}
937
938/* Send notify to test text field conversion. In parent proc notify_generic_text_handler() handles these messages */
940{
941 const struct notify_test_send *send_data;
942 const struct notify_test_receive *receive_data;
944 INT i;
945
948
949 if (para->flags & (CONVERT_SEND | DONT_CONVERT_SEND))
950 {
951 if (para->flags & CONVERT_SEND)
952 {
954 send_data = test_convert_send_data;
956 }
957 else
958 {
960 send_data = test_dont_convert_send_data;
962 }
963
964 for (i = 0; i < array_size; i++)
965 {
966 const struct notify_test_send *data = send_data + i;
968
969 memset(para->ptr, 0, para->size);
970 if (para->mask) *para->mask = para->required_mask;
971 if (data->send_text)
972 {
973 memcpy(buffer, data->send_text, data->send_text_size);
974 *para->text = buffer;
975 }
976 if (para->text_max) *para->text_max = data->send_text_max;
977 send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
978 }
979 }
980
982 {
983 if (para->flags & CONVERT_RECEIVE)
984 {
988 }
989 else
990 {
994 }
995
996 for (i = 0; i < array_size; i++)
997 {
998 const struct notify_test_receive *data = receive_data + i;
1000
1001 memset(para->ptr, 0, para->size);
1002 if (para->mask) *para->mask = para->required_mask;
1003 if (data->send_text)
1004 {
1005 memcpy(buffer, data->send_text, data->send_text_size);
1006 *para->text = buffer;
1007 }
1008 if (para->text_max) *para->text_max = data->send_text_max;
1009 send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1010 if (data->return_text)
1011 {
1012 if (para->flags & CONVERT_RECEIVE)
1013 ok(!wcsncmp(data->return_text, *para->text, *para->text_max),
1014 "Code 0x%08x sub test %d expect %s, got %s\n", para->code_unicode, i,
1015 wine_dbgstr_w((WCHAR *)data->return_text), wine_dbgstr_w(*para->text));
1016 else
1017 ok(!lstrcmpA(data->return_text, (CHAR *)*para->text), "Code 0x%08x sub test %d expect %s, got %s\n",
1018 para->code_unicode, i, (CHAR *)data->return_text, (CHAR *)*para->text);
1019 }
1020 if (para->text_max)
1021 ok(data->return_text_max == *para->text_max, "Code 0x%08x sub test %d expect %d, got %d\n",
1022 para->code_unicode, i, data->return_text_max, *para->text_max);
1023 }
1024 }
1025
1026 /* Extra tests for other behavior flags that are not worth it to create their own test arrays */
1027 memset(para->ptr, 0, para->size);
1028 if (para->mask) *para->mask = para->required_mask;
1029 if (para->text_max) *para->text_max = 1;
1030 if (para->flags & SEND_EMPTY_IF_NULL)
1032 else
1034 send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1035
1037 memset(para->ptr, 0, para->size);
1038 memset(buffer, 0, sizeof(buffer));
1039 *para->text = buffer;
1040 if (para->text_max) *para->text_max = ARRAY_SIZE(buffer);
1041 send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1042 if(para->flags & SET_NULL_IF_NO_MASK)
1043 ok(!*para->text, "Expect null text\n");
1044}
1045
1047{
1048 static NMCBEDRAGBEGINW nmcbedb;
1049 static NMCBEENDEDITW nmcbeed;
1050
1051 /* CBEN_DRAGBEGIN */
1052 memset(&nmcbedb, 0, sizeof(nmcbedb));
1053 memcpy(nmcbedb.szText, test_w, sizeof(test_w));
1055 ok(!lstrcmpW(nmcbedb.szText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(nmcbedb.szText));
1056
1057 /* CBEN_ENDEDIT */
1058 memset(&nmcbeed, 0, sizeof(nmcbeed));
1059 memcpy(nmcbeed.szText, test_w, sizeof(test_w));
1060 send_notify(pager, CBEN_ENDEDITW, CBEN_ENDEDITA, (LPARAM)&nmcbeed, FALSE);
1061 ok(!lstrcmpW(nmcbeed.szText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(nmcbeed.szText));
1062}
1063
1065{
1066 const struct notify_test_datetime_format *data;
1067 NMDATETIMEFORMATW nmdtf;
1068 INT i;
1069
1070 for (i = 0; i < ARRAY_SIZE(test_datetime_format_data); i++)
1071 {
1074
1075 memset(&nmdtf, 0, sizeof(nmdtf));
1076 if(data->send_pszformat) nmdtf.pszFormat = data->send_pszformat;
1077 nmdtf.pszDisplay = nmdtf.szDisplay;
1078 send_notify(pager, DTN_FORMATW, DTN_FORMATA, (LPARAM)&nmdtf, TRUE);
1079 if (data->return_szdisplay)
1080 ok(!lstrcmpW(nmdtf.szDisplay, data->return_szdisplay), "Sub test %d expect %s, got %s\n", i,
1081 wine_dbgstr_w(data->return_szdisplay), wine_dbgstr_w(nmdtf.szDisplay));
1082 if (data->return_pszdisplay)
1083 ok(!lstrcmpW(nmdtf.pszDisplay, data->return_pszdisplay), "Sub test %d expect %s, got %s\n", i,
1084 wine_dbgstr_w(data->return_pszdisplay), wine_dbgstr_w(nmdtf.pszDisplay));
1085 }
1086}
1087
1088static void test_wm_notify_header(HWND pager)
1089{
1090 NMHEADERW nmh = {{0}};
1091 HDITEMW hdi = {0};
1092 HD_TEXTFILTERW hdtf = {0};
1093
1094 hdi.mask = HDI_TEXT | HDI_FILTER;
1095 hdi.pszText = (WCHAR *)test_w;
1096 hdtf.pszText = (WCHAR *)test_w;
1097 nmh.pitem = &hdi;
1098 nmh.pitem->pvFilter = &hdtf;
1115 send_notify(pager, HDN_TRACKW, HDN_TRACKA, (LPARAM)&nmh, TRUE);
1116}
1117
1119{
1120 NMTTDISPINFOW nmttdi;
1121 const struct notify_test_tooltip *data;
1122 INT i;
1123
1124 for (i = 0; i < ARRAY_SIZE(test_tooltip_data); i++)
1125 {
1128
1129 memset(&nmttdi, 0, sizeof(nmttdi));
1130 if (data->send_sztext) memcpy(nmttdi.szText, data->send_sztext, data->send_sztext_size);
1131 if (data->send_lpsztext) nmttdi.lpszText = (WCHAR *)data->send_lpsztext;
1133 if (data->return_sztext)
1134 {
1135 if (data->return_sztext_size == -1)
1136 ok(!lstrcmpW(nmttdi.szText, data->return_sztext), "Sub test %d expect %s, got %s\n", i,
1137 wine_dbgstr_w(data->return_sztext), wine_dbgstr_w(nmttdi.szText));
1138 else
1139 ok(!memcmp(nmttdi.szText, data->return_sztext, data->return_sztext_size), "Wrong szText content\n");
1140 }
1141 if (data->return_lpsztext)
1142 {
1143 if (IS_INTRESOURCE(data->return_lpsztext))
1144 ok(nmttdi.lpszText == data->return_lpsztext, "Sub test %d expect %s, got %s\n", i,
1145 wine_dbgstr_w(data->return_lpsztext), wine_dbgstr_w(nmttdi.lpszText));
1146 else
1147 ok(!lstrcmpW(nmttdi.lpszText, data->return_lpsztext), "Test %d expect %s, got %s\n", i,
1148 wine_dbgstr_w(data->return_lpsztext), wine_dbgstr_w(nmttdi.lpszText));
1149 }
1150 if (data->return_hinst)
1151 ok(nmttdi.hinst == data->return_hinst, "Sub test %d expect %p, got %p\n", i, data->return_hinst,
1152 nmttdi.hinst);
1153 }
1154}
1155
1156static void test_wm_notify(void)
1157{
1158 static const CHAR *class = "Pager notify class";
1159 HWND parent, pager;
1160 /* Combo Box Ex */
1161 static NMCOMBOBOXEXW nmcbe;
1162 /* Date and Time Picker */
1163 static NMDATETIMEFORMATQUERYW nmdtfq;
1164 static NMDATETIMEWMKEYDOWNW nmdtkd;
1165 static NMDATETIMESTRINGW nmdts;
1166 /* Header */
1167 static NMHDDISPINFOW nmhddi;
1168 /* List View */
1169 static NMLVDISPINFOW nmlvdi;
1170 static NMLVGETINFOTIPW nmlvgit;
1171 static NMLVFINDITEMW nmlvfi;
1172 /* Tool Bar */
1173 static NMTBRESTORE nmtbr;
1174 static NMTBSAVE nmtbs;
1175 static NMTOOLBARW nmtb;
1176 static NMTBDISPINFOW nmtbdi;
1177 static NMTBGETINFOTIPW nmtbgit;
1178 /* Tree View */
1179 static NMTVDISPINFOW nmtvdi;
1180 static NMTVGETINFOTIPW nmtvgit;
1181 static NMTREEVIEWW nmtv;
1182 static const struct generic_text_helper_para paras[] =
1183 {
1184 /* Combo Box Ex */
1185 {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1186 CBEN_INSERTITEM, CBEN_INSERTITEM, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1187 {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1188 CBEN_DELETEITEM, CBEN_DELETEITEM, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1189 {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1190 CBEN_GETDISPINFOW, CBEN_GETDISPINFOA, ZERO_SEND | SET_NULL_IF_NO_MASK | DONT_CONVERT_SEND | CONVERT_RECEIVE},
1191 /* Date and Time Picker */
1192 {&nmdtfq, sizeof(nmdtfq), NULL, 0, (WCHAR **)&nmdtfq.pszFormat, NULL, DTN_FORMATQUERYW, DTN_FORMATQUERYA,
1193 CONVERT_SEND},
1194 {&nmdtkd, sizeof(nmdtkd), NULL, 0, (WCHAR **)&nmdtkd.pszFormat, NULL, DTN_WMKEYDOWNW, DTN_WMKEYDOWNA,
1195 CONVERT_SEND},
1196 {&nmdts, sizeof(nmdts), NULL, 0, (WCHAR **)&nmdts.pszUserString, NULL, DTN_USERSTRINGW, DTN_USERSTRINGA,
1197 CONVERT_SEND},
1198 /* Header */
1199 {&nmhddi, sizeof(nmhddi), &nmhddi.mask, HDI_TEXT, &nmhddi.pszText, &nmhddi.cchTextMax, HDN_GETDISPINFOW,
1200 HDN_GETDISPINFOA, SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE},
1201 /* List View */
1202 {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_STRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL,
1203 LVN_INCREMENTALSEARCHW, LVN_INCREMENTALSEARCHA, CONVERT_SEND},
1204 {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_SUBSTRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL, LVN_ODFINDITEMW,
1205 LVN_ODFINDITEMA, CONVERT_SEND},
1206 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1207 LVN_BEGINLABELEDITW, LVN_BEGINLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1208 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1209 LVN_ENDLABELEDITW, LVN_ENDLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1210 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1211 LVN_GETDISPINFOW, LVN_GETDISPINFOA, DONT_CONVERT_SEND | CONVERT_RECEIVE},
1212 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1213 LVN_SETDISPINFOW, LVN_SETDISPINFOA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1214 {&nmlvgit, sizeof(nmlvgit), NULL, 0, &nmlvgit.pszText, &nmlvgit.cchTextMax, LVN_GETINFOTIPW, LVN_GETINFOTIPA,
1215 CONVERT_SEND | CONVERT_RECEIVE},
1216 /* Tool Bar */
1217 {&nmtbs, sizeof(nmtbs), NULL, 0, (WCHAR **)&nmtbs.tbButton.iString, NULL, TBN_SAVE, TBN_SAVE,
1218 DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1219 {&nmtbr, sizeof(nmtbr), NULL, 0, (WCHAR **)&nmtbr.tbButton.iString, NULL, TBN_RESTORE, TBN_RESTORE,
1220 DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1221 {&nmtbdi, sizeof(nmtbdi), &nmtbdi.dwMask, TBNF_TEXT, &nmtbdi.pszText, &nmtbdi.cchText, TBN_GETDISPINFOW,
1222 TBN_GETDISPINFOW, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1223 {&nmtb, sizeof(nmtb), NULL, 0, &nmtb.pszText, &nmtb.cchText, TBN_GETBUTTONINFOW, TBN_GETBUTTONINFOA,
1224 SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE},
1225 {&nmtbgit, sizeof(nmtbgit), NULL, 0, &nmtbgit.pszText, &nmtbgit.cchTextMax, TBN_GETINFOTIPW, TBN_GETINFOTIPA,
1226 DONT_CONVERT_SEND | CONVERT_RECEIVE},
1227 /* Tree View */
1228 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1229 TVN_BEGINLABELEDITW, TVN_BEGINLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1230 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1231 TVN_ENDLABELEDITW, TVN_ENDLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1232 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1233 TVN_GETDISPINFOW, TVN_GETDISPINFOA, ZERO_SEND | DONT_CONVERT_SEND| CONVERT_RECEIVE},
1234 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1235 TVN_SETDISPINFOW, TVN_SETDISPINFOA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1236 {&nmtvgit, sizeof(nmtvgit), NULL, 0, &nmtvgit.pszText, &nmtvgit.cchTextMax, TVN_GETINFOTIPW, TVN_GETINFOTIPA,
1237 DONT_CONVERT_SEND | CONVERT_RECEIVE},
1238 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1239 TVN_SINGLEEXPAND, TVN_SINGLEEXPAND, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE, TVITEM_NEW_HANDLER},
1240 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1241 TVN_SINGLEEXPAND, TVN_SINGLEEXPAND, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE, TVITEM_OLD_HANDLER},
1242 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1243 TVN_BEGINDRAGW, TVN_BEGINDRAGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1244 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1245 TVN_BEGINDRAGW, TVN_BEGINDRAGA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1246 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1247 TVN_BEGINRDRAGW, TVN_BEGINRDRAGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1248 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1249 TVN_BEGINRDRAGW, TVN_BEGINRDRAGA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1250 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1251 TVN_ITEMEXPANDEDW, TVN_ITEMEXPANDEDA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1252 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1253 TVN_ITEMEXPANDEDW, TVN_ITEMEXPANDEDA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1254 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1255 TVN_ITEMEXPANDINGW, TVN_ITEMEXPANDINGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1256 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1257 TVN_ITEMEXPANDINGW, TVN_ITEMEXPANDINGA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1258 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1259 TVN_DELETEITEMW, TVN_DELETEITEMA, DONT_CONVERT_SEND, TVITEM_NEW_HANDLER},
1260 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1261 TVN_DELETEITEMW, TVN_DELETEITEMA, CONVERT_SEND, TVITEM_OLD_HANDLER},
1262 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1263 TVN_SELCHANGINGW, TVN_SELCHANGINGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1264 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1265 TVN_SELCHANGINGW, TVN_SELCHANGINGA, CONVERT_SEND, TVITEM_OLD_HANDLER},
1266 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1267 TVN_SELCHANGEDW, TVN_SELCHANGEDA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1268 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1269 TVN_SELCHANGEDW, TVN_SELCHANGEDA, CONVERT_SEND, TVITEM_OLD_HANDLER}
1270 };
1271 BOOL bret;
1272 INT i;
1273
1274 bret = register_test_notify_class();
1275 ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
1276
1277 parent = CreateWindowA(class, "parent", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), 0);
1278 ok(parent != NULL, "CreateWindow failed\n");
1279 pager = CreateWindowA(WC_PAGESCROLLERA, "pager", WS_CHILD, 0, 0, 100, 100, parent, 0, GetModuleHandleA(0), 0);
1280 ok(pager != NULL, "CreateWindow failed\n");
1281 child1_wnd = CreateWindowA(class, "child", WS_CHILD, 0, 0, 100, 100, pager, (HMENU)1, GetModuleHandleA(0), 0);
1282 ok(child1_wnd != NULL, "CreateWindow failed\n");
1283 SendMessageW(pager, PGM_SETCHILD, 0, (LPARAM)child1_wnd);
1284
1285 for (i = 0; i < ARRAY_SIZE(paras); i++)
1286 test_notify_generic_text_helper(pager, paras + i);
1287
1288 /* Tests for those that can't be covered by generic text test helper */
1289 test_wm_notify_comboboxex(pager);
1290 test_wm_notify_datetime(pager);
1291 test_wm_notify_header(pager);
1292 test_wm_notify_tooltip(pager);
1293
1294 DestroyWindow(parent);
1295 UnregisterClassA(class, GetModuleHandleA(NULL));
1296}
1297
1298static void init_functions(void)
1299{
1300 HMODULE mod = LoadLibraryA("comctl32.dll");
1301
1302#define X(f) p##f = (void*)GetProcAddress(mod, #f);
1303 X(InitCommonControlsEx);
1304#undef X
1305
1306 pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410);
1307}
1308
1309START_TEST(pager)
1310{
1311 INITCOMMONCONTROLSEX iccex;
1312
1313 init_functions();
1314
1315 iccex.dwSize = sizeof(iccex);
1316 iccex.dwICC = ICC_PAGESCROLLER_CLASS;
1317 pInitCommonControlsEx(&iccex);
1318
1319 init_msg_sequences(sequences, NUM_MSG_SEQUENCES);
1320
1321 parent_wnd = create_parent_window();
1322 ok(parent_wnd != NULL, "Failed to create parent window!\n");
1323
1324 test_pager();
1325 test_wm_notifyformat();
1326 test_wm_notify();
1327
1328 DestroyWindow(parent_wnd);
1329}
@ sent
Definition: SystemMenu.c:27
@ defwinproc
Definition: SystemMenu.c:32
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
@ optional
Definition: SystemMenu.c:34
#define add_message(msg)
Definition: SystemMenu.c:98
#define ok_sequence(exp, contx, todo)
Definition: SystemMenu.c:275
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
Arabic default style
Definition: afstyles.h:94
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define msg(x)
Definition: auth_time.c:54
const WCHAR * class
Definition: main.c:68
#define ARRAY_SIZE(A)
Definition: main.h:20
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:99
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const struct pixel_format_desc formats[]
Definition: util.c:59
@ CONVERT_RECEIVE
Definition: pager.c:102
@ ZERO_SEND
Definition: pager.c:108
@ SEND_EMPTY_IF_NULL
Definition: pager.c:104
@ SET_NULL_IF_NO_MASK
Definition: pager.c:106
@ CONVERT_SEND
Definition: pager.c:100
HANDLE HWND
Definition: compat.h:19
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4243
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4195
const WCHAR * text
Definition: package.c:1794
r parent
Definition: btrfs.c:3010
RECT rect2
Definition: edittest.c:51
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
GLenum GLsizei len
Definition: glext.h:6722
GLuint id
Definition: glext.h:5910
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
Definition: glfuncs.h:248
char hdr[14]
Definition: iptest.cpp:33
#define wine_dbgstr_w
Definition: kernel32.h:34
if(dx< 0)
Definition: linetemp.h:194
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define error(str)
Definition: mkdosfs.c:1605
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static LRESULT WINAPI test_notifyformat_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:510
static HWND create_parent_window(void)
Definition: pager.c:349
static void test_wm_notify_tooltip(HWND pager)
Definition: pager.c:1118
static const CHAR te_a[]
Definition: pager.c:36
static const WCHAR large_truncated_80_w[80]
Definition: pager.c:43
static void test_wm_notify_header(HWND pager)
Definition: pager.c:1088
#define CHILD1_ID
Definition: pager.c:201
static void notify_generic_text_handler(CHAR **text, INT *text_max)
Definition: pager.c:599
#define NUM_MSG_SEQUENCES
Definition: pager.c:27
static const struct notify_test_send test_convert_send_data[]
Definition: pager.c:121
static HWND child2_wnd
Definition: pager.c:30
static BOOL register_parent_wnd_class(void)
Definition: pager.c:332
static const struct notify_test_receive test_convert_receive_data[]
Definition: pager.c:131
static void test_wm_notifyformat(void)
Definition: pager.c:542
static BOOL register_notifyformat_class(void)
Definition: pager.c:530
handler_ids
Definition: pager.c:61
@ TVITEM_NEW_HANDLER
Definition: pager.c:62
@ TVITEM_OLD_HANDLER
Definition: pager.c:63
static const struct message set_child_seq[]
Definition: pager.c:209
static const struct notify_test_receive test_dont_convert_receive_data[]
Definition: pager.c:140
static BOOL notify_query_received
Definition: pager.c:32
static SUBCLASSPROC
Definition: pager.c:205
static LRESULT WINAPI pager_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:359
static DWORD_PTR
Definition: pager.c:205
static BOOL register_test_notify_class(void)
Definition: pager.c:908
static void test_wm_notify(void)
Definition: pager.c:1156
static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:686
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:278
static const struct message set_pos_seq[]
Definition: pager.c:241
static void notify_tooltip_handler(NMTTDISPINFOA *nm)
Definition: pager.c:661
static const struct notify_test_send test_dont_convert_send_data[]
Definition: pager.c:126
static const WCHAR test_w[]
Definition: pager.c:34
#define PAGER_SEQ_INDEX
Definition: pager.c:28
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: pager.c:207
static HWND child1_wnd
Definition: pager.c:30
static WCHAR buffer[64]
Definition: pager.c:45
static HWND parent_wnd
Definition: pager.c:30
static LRESULT WINAPI child_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:386
static const struct message switch_child_seq[]
Definition: pager.c:227
static const WCHAR large_w[]
Definition: pager.c:39
static CHAR * heap_strdup(const CHAR *str)
Definition: pager.c:270
static void notify_datetime_handler(NMDATETIMEFORMATA *nm)
Definition: pager.c:674
static const struct notify_test_datetime_format test_datetime_format_data[]
static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
Definition: pager.c:918
#define CHILD2_ID
Definition: pager.c:202
static UINT_PTR
Definition: pager.c:205
static void test_pager(void)
Definition: pager.c:432
static HWND create_pager_control(DWORD style)
Definition: pager.c:372
static const struct notify_test_tooltip test_tooltip_data[]
static const CHAR test_a[]
Definition: pager.c:33
static BOOL register_child_wnd_class(void)
Definition: pager.c:415
static void test_wm_notify_datetime(HWND pager)
Definition: pager.c:1064
static INT notify_format
Definition: pager.c:31
static const CHAR large_a[]
Definition: pager.c:37
static void test_wm_notify_comboboxex(HWND pager)
Definition: pager.c:1046
static const struct message set_pos_empty_seq[]
Definition: pager.c:265
static const WCHAR large_truncated_65_w[65]
Definition: pager.c:41
static void test_notify_generic_text_helper(HWND pager, const struct generic_text_helper_para *para)
Definition: pager.c:939
test_conversion_flags
Definition: pager.c:49
@ DONT_SEND_EMPTY_IF_NULL
Definition: pager.c:55
@ DONT_CONVERT_RECEIVE
Definition: pager.c:53
@ DONT_CONVERT_SEND
Definition: pager.c:51
static IHTMLWindow2 * window
Definition: events.c:77
static const struct access_res create[16]
Definition: package.c:7505
static HWND child
Definition: cursoricon.c:298
int notify
Definition: msacm.c:1366
static UINT array_size
Definition: msctf.c:67
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPED
Definition: pedump.c:615
#define WS_BORDER
Definition: pedump.c:625
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define TVN_ENDLABELEDITA
Definition: commctrl.h:3716
#define TTN_GETDISPINFOA
Definition: commctrl.h:1877
#define LVN_GETDISPINFOA
Definition: commctrl.h:3158
#define PGM_SETPOS
Definition: commctrl.h:4542
#define HDI_TEXT
Definition: commctrl.h:704
#define HDN_ITEMDBLCLICKA
Definition: commctrl.h:843
#define HDN_DROPDOWN
Definition: commctrl.h:863
#define HDN_BEGINTRACKA
Definition: commctrl.h:847
#define TVN_ITEMEXPANDINGA
Definition: commctrl.h:3704
#define TTN_GETDISPINFOW
Definition: commctrl.h:1878
#define HDN_ITEMCHANGEDW
Definition: commctrl.h:840
#define WC_PAGESCROLLERA
Definition: commctrl.h:4503
#define CBEN_ENDEDITW
Definition: commctrl.h:3881
#define TVN_BEGINLABELEDITA
Definition: commctrl.h:3714
#define TBN_SAVE
Definition: commctrl.h:1345
#define LVN_GETINFOTIPA
Definition: commctrl.h:3227
#define HDN_ITEMKEYDOWN
Definition: commctrl.h:862
#define CBEN_DRAGBEGINA
Definition: commctrl.h:3885
#define DTN_USERSTRINGA
Definition: commctrl.h:4378
#define HDN_OVERFLOWCLICK
Definition: commctrl.h:864
#define PGM_SETCHILD
Definition: commctrl.h:4521
#define TVN_BEGINRDRAGA
Definition: commctrl.h:3710
#define CBEN_ENDEDITA
Definition: commctrl.h:3880
#define HDN_BEGINDRAG
Definition: commctrl.h:855
#define HDN_ENDTRACKW
Definition: commctrl.h:850
#define TBN_GETDISPINFOW
Definition: commctrl.h:1340
#define PGN_CALCSIZE
Definition: commctrl.h:4585
#define HDN_ITEMSTATEICONCLICK
Definition: commctrl.h:861
#define TVN_ITEMEXPANDEDA
Definition: commctrl.h:3706
#define LVN_INCREMENTALSEARCHA
Definition: commctrl.h:3168
#define HDN_ITEMCHANGINGA
Definition: commctrl.h:837
#define LVN_BEGINLABELEDITA
Definition: commctrl.h:3140
#define HDN_ITEMCLICKA
Definition: commctrl.h:841
#define CBEN_GETDISPINFOA
Definition: commctrl.h:3876
#define HDN_ENDTRACKA
Definition: commctrl.h:849
#define HDN_ITEMDBLCLICKW
Definition: commctrl.h:844
#define DTN_WMKEYDOWNA
Definition: commctrl.h:4398
#define TVN_SELCHANGINGA
Definition: commctrl.h:3650
#define HDN_TRACKW
Definition: commctrl.h:852
#define HDN_ENDDRAG
Definition: commctrl.h:856
#define DTN_FORMATW
Definition: commctrl.h:4419
#define LVN_SETDISPINFOA
Definition: commctrl.h:3160
#define HDN_FILTERCHANGE
Definition: commctrl.h:857
#define HDN_ITEMCHANGINGW
Definition: commctrl.h:838
#define LVN_ENDLABELEDITA
Definition: commctrl.h:3142
#define TVN_DELETEITEMA
Definition: commctrl.h:3712
#define TBN_GETBUTTONINFOA
Definition: commctrl.h:1306
#define HDN_GETDISPINFOA
Definition: commctrl.h:853
#define TBN_GETINFOTIPA
Definition: commctrl.h:1341
#define HDN_ENDFILTEREDIT
Definition: commctrl.h:860
#define HDN_GETDISPINFOW
Definition: commctrl.h:854
#define CBEN_DELETEITEM
Definition: commctrl.h:3878
#define HDN_DIVIDERDBLCLICKW
Definition: commctrl.h:846
#define TVN_BEGINDRAGA
Definition: commctrl.h:3708
#define WC_PAGESCROLLERW
Definition: commctrl.h:4502
#define TVN_GETDISPINFOA
Definition: commctrl.h:3659
#define LVN_ODFINDITEMA
Definition: commctrl.h:3149
#define HDN_BEGINTRACKW
Definition: commctrl.h:848
#define HDI_FILTER
Definition: commctrl.h:711
#define CBEN_INSERTITEM
Definition: commctrl.h:3877
#define CCS_NORESIZE
Definition: commctrl.h:2250
#define PGF_CALCWIDTH
Definition: commctrl.h:4587
#define DTN_FORMATQUERYA
Definition: commctrl.h:4440
#define PGF_CALCHEIGHT
Definition: commctrl.h:4588
#define DTN_FORMATA
Definition: commctrl.h:4418
#define HDN_TRACKA
Definition: commctrl.h:851
#define TVN_SELCHANGEDA
Definition: commctrl.h:3652
#define HDN_ITEMCHANGEDA
Definition: commctrl.h:839
#define TVN_SETDISPINFOA
Definition: commctrl.h:3661
#define PGS_HORZ
Definition: commctrl.h:4508
#define HDN_ITEMCLICKW
Definition: commctrl.h:842
#define HDN_DIVIDERDBLCLICKA
Definition: commctrl.h:845
#define TBN_RESTORE
Definition: commctrl.h:1344
#define HDN_BEGINFILTEREDIT
Definition: commctrl.h:859
#define TVN_SINGLEEXPAND
Definition: commctrl.h:3721
#define TVN_GETINFOTIPA
Definition: commctrl.h:3719
#define CBEN_DRAGBEGINW
Definition: commctrl.h:3886
#define WM_NOTIFY
Definition: richedit.h:61
#define test
Definition: rosglue.h:37
const WCHAR * str
static int receive_data(SOCKET sock, SecBuffer *buf)
Definition: schannel.c:604
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
@ Failed
Definition: arc.h:79
#define memset(x, y, z)
Definition: compat.h:39
& rect
Definition: startmenu.cpp:1413
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3908
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3902
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3927
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3919
COMBOBOXEXITEMA ceItem
Definition: commctrl.h:3864
COMBOBOXEXITEMW ceItem
Definition: commctrl.h:3869
DWORD dwFlag
Definition: commctrl.h:4592
LPWSTR pszText
Definition: commctrl.h:1416
LPSTR pszText
Definition: commctrl.h:669
void * pvFilter
Definition: commctrl.h:677
UINT mask
Definition: commctrl.h:684
LPWSTR pszText
Definition: commctrl.h:686
void * pvFilter
Definition: commctrl.h:694
LPWSTR pszText
Definition: commctrl.h:658
INT_PTR iString
Definition: commctrl.h:959
HBRUSH hbrBackground
Definition: winuser.h:3173
HICON hIcon
Definition: winuser.h:3171
HINSTANCE hInstance
Definition: winuser.h:3170
HCURSOR hCursor
Definition: winuser.h:3172
int cbWndExtra
Definition: winuser.h:3169
UINT style
Definition: winuser.h:3166
LPCSTR lpszMenuName
Definition: winuser.h:3174
LPCSTR lpszClassName
Definition: winuser.h:3175
WNDPROC lpfnWndProc
Definition: winuser.h:3167
int cbClsExtra
Definition: winuser.h:3168
LPCWSTR lpszClassName
Definition: winuser.h:3188
HINSTANCE hInstance
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3180
Definition: tftpd.h:60
UINT message
Definition: SystemMenu.c:42
const WCHAR * send_pszformat
Definition: pager.c:181
const WCHAR * return_szdisplay
Definition: pager.c:189
const WCHAR * return_pszdisplay
Definition: pager.c:191
const CHAR * write_pszdisplay
Definition: pager.c:187
const CHAR * write_szdisplay
Definition: pager.c:185
const CHAR * expect_pszformat
Definition: pager.c:183
UINT handler_id
Definition: pager.c:76
HWND hwnd_from
Definition: pager.c:71
UINT sub_test_id
Definition: pager.c:75
DWORD flags
Definition: pager.c:78
UINT test_id
Definition: pager.c:74
BOOL received
Definition: pager.c:73
UINT_PTR id_from
Definition: pager.c:70
UINT unicode
Definition: pager.c:68
const void * return_text
Definition: pager.c:103
const CHAR * write_text
Definition: pager.c:99
const CHAR * write_pointer
Definition: pager.c:98
INT send_text_size
Definition: pager.c:95
const WCHAR * send_text
Definition: pager.c:94
const void * expect_text
Definition: pager.c:88
INT send_text_size
Definition: pager.c:85
const WCHAR * send_text
Definition: pager.c:84
INT send_text_max
Definition: pager.c:86
const CHAR * write_lpsztext
Definition: pager.c:151
const WCHAR * send_sztext
Definition: pager.c:161
INT write_sztext_size
Definition: pager.c:150
const WCHAR * return_lpsztext
Definition: pager.c:156
HMODULE write_hinst
Definition: pager.c:152
const WCHAR * send_lpsztext
Definition: pager.c:163
INT return_sztext_size
Definition: pager.c:155
INT send_sztext_size
Definition: pager.c:162
HMODULE return_hinst
Definition: pager.c:157
const CHAR * expect_sztext
Definition: pager.c:159
const CHAR * write_sztext
Definition: pager.c:149
const WCHAR * return_sztext
Definition: pager.c:154
LVITEMA item
Definition: commctrl.h:3179
int cchTextMax
Definition: commctrl.h:2354
LPSTR pszText
Definition: commctrl.h:2353
WCHAR szDisplay[64]
Definition: commctrl.h:4433
UINT code
Definition: winuser.h:3162
HWND hwndFrom
Definition: winuser.h:3160
HDITEMA * pitem
Definition: commctrl.h:884
HDITEMW * pitem
Definition: commctrl.h:891
LVFINDINFOA lvfi
Definition: commctrl.h:3100
TBBUTTON tbButton
Definition: commctrl.h:1373
TBBUTTON tbButton
Definition: commctrl.h:1362
LPSTR pszText
Definition: commctrl.h:1443
TVITEMA itemOld
Definition: commctrl.h:3634
TVITEMA itemNew
Definition: commctrl.h:3635
char szText[80]
Definition: commctrl.h:1903
HINSTANCE hinst
Definition: commctrl.h:1904
HINSTANCE hinst
Definition: commctrl.h:1913
WCHAR szText[80]
Definition: commctrl.h:1912
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
TVITEMA item
Definition: commctrl.h:3672
LPSTR pszText
Definition: commctrl.h:3312
int cchTextMax
Definition: commctrl.h:3313
#define GWLP_WNDPROC
Definition: treelist.c:66
#define GWLP_USERDATA
Definition: treelist.c:63
int32_t INT
Definition: typedefs.h:58
HANDLE HMODULE
Definition: typedefs.h:77
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define WHITE_BRUSH
Definition: wingdi.h:902
#define WM_PAINT
Definition: winuser.h:1623
#define WM_ERASEBKGND
Definition: winuser.h:1628
#define SetWindowLongPtrA
Definition: winuser.h:5357
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1664
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4318
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CHILDACTIVATE
Definition: winuser.h:1641
#define WM_SIZE
Definition: winuser.h:1614
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
#define WM_NCHITTEST
Definition: winuser.h:1689
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_GETTEXT
Definition: winuser.h:1621
#define GetWindowLongPtrA
Definition: winuser.h:4831
#define WM_DEVICECHANGE
Definition: winuser.h:1814
#define NF_REQUERY
Definition: winuser.h:2464
#define CreateWindow
Definition: winuser.h:5766
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4319
HWND WINAPI GetParent(_In_ HWND)
#define WM_MOVE
Definition: winuser.h:1613
#define NFR_ANSI
Definition: winuser.h:2461
#define WM_USER
Definition: winuser.h:1898
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2909
#define NFR_UNICODE
Definition: winuser.h:2462
#define WM_NCCALCSIZE
Definition: winuser.h:1688
#define GWL_STYLE
Definition: winuser.h:855
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1665
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NF_QUERY
Definition: winuser.h:2463
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2142
#define WM_NCPAINT
Definition: winuser.h:1690
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175