ReactOS  0.4.14-dev-57-g333b8f1
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 
33 static WCHAR test_w[] = {'t', 'e', 's', 't', 0};
34 static CHAR test_a[] = {'t', 'e', 's', 't', 0};
35 /* Double zero so that it's safe to cast it to WCHAR * */
36 static CHAR te_a[] = {'t', 'e', 0, 0};
37 static WCHAR empty_w[] = {0};
38 static CHAR empty_a[] = {0};
39 static CHAR large_a[] = "You should have received a copy of the GNU Lesser General Public License along with this ...";
40 static WCHAR large_w[] =
41 {
42  'Y', 'o', 'u', ' ', 's', 'h', 'o', 'u', 'l', 'd', ' ', 'h', 'a', 'v', 'e', ' ', 'r', 'e', 'c', 'e', 'i', 'v', 'e',
43  'd', ' ', 'a', ' ', 'c', 'o', 'p', 'y', ' ', 'o', 'f', ' ', 't', 'h', 'e', ' ', 'G', 'N', 'U', ' ', 'L', 'e', 's',
44  's', 'e', 'r', ' ', 'G', 'e', 'n', 'e', 'r', 'a', 'l', ' ', 'P', 'u', 'b', 'l', 'i', 'c', ' ', 'L', 'i', 'c', 'e',
45  'n', 's', 'e', ' ', 'a', 'l', 'o', 'n', 'g', ' ', 'w', 'i', 't', 'h', ' ', 't', 'h', 'i', 's', ' ', '.', '.', '.', 0
46 };
48 {
49  'Y', 'o', 'u', ' ', 's', 'h', 'o', 'u', 'l', 'd', ' ', 'h', 'a', 'v', 'e', ' ', 'r', 'e', 'c', 'e', 'i', 'v',
50  'e', 'd', ' ', 'a', ' ', 'c', 'o', 'p', 'y', ' ', 'o', 'f', ' ', 't', 'h', 'e', ' ', 'G', 'N', 'U', ' ', 'L',
51  'e', 's', 's', 'e', 'r', ' ', 'G', 'e', 'n', 'e', 'r', 'a', 'l', ' ', 'P', 'u', 'b', 'l', 'i', 'c', 0
52 };
54 {
55  'Y', 'o', 'u', ' ', 's', 'h', 'o', 'u', 'l', 'd', ' ', 'h', 'a', 'v', 'e', ' ', 'r', 'e', 'c', 'e',
56  'i', 'v', 'e', 'd', ' ', 'a', ' ', 'c', 'o', 'p', 'y', ' ', 'o', 'f', ' ', 't', 'h', 'e', ' ', 'G',
57  'N', 'U', ' ', 'L', 'e', 's', 's', 'e', 'r', ' ', 'G', 'e', 'n', 'e', 'r', 'a', 'l', ' ', 'P', 'u',
58  'b', 'l', 'i', 'c', ' ', 'L', 'i', 'c', 'e', 'n', 's', 'e', ' ', 'a', 'l', 'o', 'n', 'g', ' ', 'w'
59 };
60 static WCHAR buffer[64];
61 
62 /* Text field conversion test behavior flags. */
64 {
65  CONVERT_SEND = 0x01,
72  ZERO_SEND = 0x80
73 };
74 
76 {
79 };
80 
81 static struct notify_test_info
82 {
87  /* Whether parent received notification */
92  /* Text field conversion test behavior flag */
95 
97 {
98  /* Data sent to pager */
102  /* Data expected by parent of pager */
103  void *expect_text;
104 };
105 
107 {
108  /* Data sent to pager */
112  /* Data for parent to write */
117  /* Data when message returned */
118  void *return_text;
120 };
121 
123 {
124  void *ptr;
125  size_t size;
134 };
135 
137 {
138  {test_w, sizeof(test_w), ARRAY_SIZE(buffer), test_a}
139 };
140 
142 {
143  {test_w, sizeof(test_w), ARRAY_SIZE(buffer), test_w}
144 };
145 
147 {
148  {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_w, ARRAY_SIZE(buffer)},
150  {NULL, sizeof(empty_w), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, NULL, ARRAY_SIZE(buffer)},
152  {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), empty_a, 0, 0, 1, empty_w, 1},
153 };
154 
156 {
157  {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_a, ARRAY_SIZE(buffer)},
159 };
160 
161 static const struct notify_test_tooltip
162 {
163  /* Data for parent to write */
168  /* Data when message returned */
173  /* Data expected by parent */
175  /* Data send to parent */
179 } test_tooltip_data[] =
180 {
181  {NULL, 0, NULL, NULL, empty_w, -1, empty_w},
182  {test_a, sizeof(test_a), NULL, NULL, test_w, -1, test_w},
183  {test_a, sizeof(test_a), test_a, NULL, test_w, -1, test_w},
184  {test_a, sizeof(test_a), (CHAR *)1, (HMODULE)0xdeadbeef, empty_w, -1, (WCHAR *)1, (HMODULE)0xdeadbeef},
185  {test_a, sizeof(test_a), test_a, (HMODULE)0xdeadbeef, test_w, -1, test_w, (HMODULE)0xdeadbeef},
186  {NULL, 0, test_a, NULL, test_w, -1, test_w},
187  {test_a, 2, test_a, NULL, test_w, -1, test_w},
188  {NULL, 0, NULL, NULL, test_w, -1, test_w, NULL, test_a, test_w, sizeof(test_w)},
189  {NULL, 0, NULL, NULL, empty_w, -1, empty_w, NULL, empty_a, NULL, 0, test_w},
191 };
192 
193 static const struct notify_test_datetime_format
194 {
195  /* Data send to parent */
197  /* Data expected by parent */
199  /* Data for parent to write */
203  /* Data when message returned */
208 {
209  {test_w, test_a},
210  {NULL, NULL, NULL, 0, test_a, empty_w, -1, test_w},
211  {NULL, NULL, test_a, sizeof(test_a), NULL, test_w, -1, test_w},
212  {NULL, NULL, test_a, 2, test_a, (WCHAR *)te_a, -1, test_w},
213  {NULL, NULL, NULL, 0, large_a, NULL, 0, large_w}
214 };
215 
216 #define CHILD1_ID 1
217 #define CHILD2_ID 2
218 
219 static BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*);
220 static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
221 
223 
224 static const struct message set_child_seq[] = {
225  { PGM_SETCHILD, sent },
228  { WM_NOTIFY, sent|id|parent, 0, 0, PGN_CALCSIZE },
232  { WM_CHILDACTIVATE, sent|id, 0, 0, CHILD1_ID },
233  { WM_WINDOWPOSCHANGED, sent|id, 0, 0, CHILD1_ID },
234  { WM_SIZE, sent|id|defwinproc|optional, 0, 0, CHILD1_ID },
235  { 0 }
236 };
237 
238 /* This differs from the above message list only in the child window that is
239  * expected to receive the child messages. No message is sent to the old child.
240  * Also child 2 is hidden while child 1 is visible. The pager does not make the
241  * hidden child visible. */
242 static const struct message switch_child_seq[] = {
243  { PGM_SETCHILD, sent },
246  { WM_NOTIFY, sent|id|parent, 0, 0, PGN_CALCSIZE },
250  { WM_CHILDACTIVATE, sent|id, 0, 0, CHILD2_ID },
251  { WM_WINDOWPOSCHANGED, sent|id, 0, 0, CHILD2_ID },
252  { WM_SIZE, sent|id|defwinproc, 0, 0, CHILD2_ID },
253  { 0 }
254 };
255 
256 static const struct message set_pos_seq[] = {
257  { PGM_SETPOS, sent },
260  { WM_NOTIFY, sent|id|parent, 0, 0, PGN_CALCSIZE },
262  { WM_MOVE, sent|optional },
263  /* The WM_SIZE handler sends WM_WINDOWPOSCHANGING, WM_CHILDACTIVATE
264  * and WM_WINDOWPOSCHANGED (which sends WM_MOVE) to the child.
265  * Another WM_WINDOWPOSCHANGING is sent afterwards.
266  *
267  * The 2nd WM_WINDOWPOSCHANGING is unconditional, but the comparison
268  * function is too simple to roll back an accepted message, so we have
269  * to mark the 2nd message optional. */
270  { WM_SIZE, sent|optional },
271  { WM_WINDOWPOSCHANGING, sent|id, 0, 0, CHILD1_ID }, /* Actually optional. */
272  { WM_CHILDACTIVATE, sent|id, 0, 0, CHILD1_ID }, /* Actually optional. */
274  { WM_MOVE, sent|id|optional|defwinproc, 0, 0, CHILD1_ID },
275  { WM_WINDOWPOSCHANGING, sent|id|optional, 0, 0, CHILD1_ID }, /* Actually not optional. */
276  { WM_CHILDACTIVATE, sent|id|optional, 0, 0, CHILD1_ID }, /* Actually not optional. */
277  { 0 }
278 };
279 
280 static const struct message set_pos_empty_seq[] = {
281  { PGM_SETPOS, sent },
282  { 0 }
283 };
284 
285 static CHAR *heap_strdup(const CHAR *str)
286 {
287  int len = lstrlenA(str) + 1;
288  CHAR *ret = heap_alloc(len * sizeof(CHAR));
289  lstrcpyA(ret, str);
290  return ret;
291 }
292 
294 {
295  static LONG defwndproc_counter = 0;
296  LRESULT ret;
297  struct message msg;
298 
299  /* log system messages, except for painting */
300  if (message < WM_USER &&
301  message != WM_PAINT &&
302  message != WM_ERASEBKGND &&
303  message != WM_NCPAINT &&
304  message != WM_NCHITTEST &&
305  message != WM_GETTEXT &&
306  message != WM_GETICON &&
308  {
309  msg.message = message;
310  msg.flags = sent|wparam|lparam|parent;
311  if (defwndproc_counter) msg.flags |= defwinproc;
312  msg.wParam = wParam;
313  msg.lParam = lParam;
314  if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code;
316  }
317 
318  if (message == WM_NOTIFY)
319  {
320  NMHDR *nmhdr = (NMHDR *)lParam;
321 
322  switch (nmhdr->code)
323  {
324  case PGN_CALCSIZE:
325  {
326  NMPGCALCSIZE *nmpgcs = (NMPGCALCSIZE *)lParam;
328 
329  if (style & PGS_HORZ)
330  ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
331  else
332  ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
333  break;
334  }
335  default:
336  ;
337  }
338  }
339 
340  defwndproc_counter++;
342  defwndproc_counter--;
343 
344  return ret;
345 }
346 
348 {
349  WNDCLASSA cls;
350 
351  cls.style = 0;
353  cls.cbClsExtra = 0;
354  cls.cbWndExtra = 0;
356  cls.hIcon = 0;
357  cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
359  cls.lpszMenuName = NULL;
360  cls.lpszClassName = "Pager test parent class";
361  return RegisterClassA(&cls);
362 }
363 
365 {
367  return NULL;
368 
369  return CreateWindowA("Pager test parent class", "Pager test parent window",
371  0, 0, 200, 200, 0, NULL, GetModuleHandleA(NULL), NULL );
372 }
373 
375 {
377  struct message msg = { 0 };
378 
379  msg.message = message;
380  msg.flags = sent|wparam|lparam;
381  msg.wParam = wParam;
382  msg.lParam = lParam;
384  return CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
385 }
386 
388 {
389  WNDPROC oldproc;
390  HWND hwnd;
391  RECT rect;
392 
395  0, 0, 100, 100, parent_wnd, 0, GetModuleHandleA(0), 0 );
398  return hwnd;
399 }
400 
402 {
403  static LONG defwndproc_counter;
404  struct message msg = { 0 };
405  LRESULT ret;
406 
407  msg.message = message;
408  msg.flags = sent | wparam | lparam;
409  if (defwndproc_counter)
410  msg.flags |= defwinproc;
411  msg.wParam = wParam;
412  msg.lParam = lParam;
413 
414  if (hwnd == child1_wnd)
415  msg.id = CHILD1_ID;
416  else if (hwnd == child2_wnd)
417  msg.id = CHILD2_ID;
418  else
419  msg.id = 0;
420 
422 
423  defwndproc_counter++;
425  defwndproc_counter--;
426 
427  return ret;
428 }
429 
431 {
432  WNDCLASSA cls;
433 
434  cls.style = 0;
435  cls.lpfnWndProc = child_proc;
436  cls.cbClsExtra = 0;
437  cls.cbWndExtra = 0;
439  cls.hIcon = 0;
440  cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
442  cls.lpszMenuName = NULL;
443  cls.lpszClassName = "Pager test child class";
444  return RegisterClassA(&cls);
445 }
446 
447 static void test_pager(void)
448 {
449  HWND pager;
450  RECT rect, rect2;
451 
452  pager = create_pager_control( PGS_HORZ );
453  ok(pager != NULL, "Fail to create pager\n");
454 
456 
457  child1_wnd = CreateWindowA( "Pager test child class", "button", WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 300, 300,
458  pager, 0, GetModuleHandleA(0), 0 );
459  child2_wnd = CreateWindowA("Pager test child class", "button", WS_CHILD | WS_BORDER, 0, 0, 300, 300,
460  pager, 0, GetModuleHandleA(0), 0);
461 
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 
471  ok_sequence(sequences, PAGER_SEQ_INDEX, switch_child_seq, "switch to invisible child", FALSE);
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  ok(!IsWindowVisible(child2_wnd), "Child window 2 is visible\n");
476 
479  ok_sequence(sequences, PAGER_SEQ_INDEX, set_child_seq, "switch to visible child", FALSE);
480  GetWindowRect(pager, &rect);
481  ok(rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
482  "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top);
483 
485  SendMessageA( pager, PGM_SETPOS, 0, 10 );
487  GetWindowRect( pager, &rect );
488  ok( rect.right - rect.left == 100 && rect.bottom - rect.top == 100,
489  "pager resized %dx%d\n", rect.right - rect.left, rect.bottom - rect.top );
490 
492  SendMessageA( pager, PGM_SETPOS, 0, 10 );
494 
496  SendMessageA( pager, PGM_SETPOS, 0, 9 );
498 
499  DestroyWindow( pager );
500 
501  /* Test if resizing works */
503  ok(pager != NULL, "failed to create pager control\n");
504 
505  GetWindowRect( pager, &rect );
506  MoveWindow( pager, 0, 0, 200, 100, TRUE );
507  GetWindowRect( pager, &rect2 );
508  ok(rect2.right - rect2.left > rect.right - rect.left, "expected pager window to resize, %s\n",
509  wine_dbgstr_rect( &rect2 ));
510 
511  DestroyWindow( pager );
512 
514  ok(pager != NULL, "failed to create pager control\n");
515 
516  GetWindowRect( pager, &rect );
517  MoveWindow( pager, 0, 0, 100, 200, TRUE );
518  GetWindowRect( pager, &rect2 );
519  ok(rect2.bottom - rect2.top > rect.bottom - rect.top, "expected pager window to resize, %s\n",
520  wine_dbgstr_rect( &rect2 ));
521 
522  DestroyWindow( pager );
523 }
524 
526 {
527  switch (message)
528  {
529  case WM_NOTIFYFORMAT:
530  if (lParam == NF_QUERY)
531  {
533  return notify_format;
534  }
535  else if (lParam == NF_REQUERY)
536  return SendMessageA(GetParent(hwnd), WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
537  else
538  return 0;
539  default:
542  }
543 }
544 
546 {
547  static const WCHAR class_w[] = {'P', 'a', 'g', 'e', 'r', ' ', 'n', 'o', 't', 'i', 'f', 'y', 'f',
548  'o', 'r', 'm', 'a', 't', ' ', 'c', 'l', 'a', 's', 's', 0};
549  WNDCLASSW cls = {0};
550 
553  cls.lpszClassName = class_w;
554  return RegisterClassW(&cls);
555 }
556 
557 static void test_wm_notifyformat(void)
558 {
559  static const WCHAR class_w[] = {'P', 'a', 'g', 'e', 'r', ' ', 'n', 'o', 't', 'i', 'f', 'y', 'f',
560  'o', 'r', 'm', 'a', 't', ' ', 'c', 'l', 'a', 's', 's', 0};
561  static const WCHAR parent_w[] = {'p', 'a', 'r', 'e', 'n', 't', 0};
562  static const WCHAR pager_w[] = {'p', 'a', 'g', 'e', 'r', 0};
563  static const WCHAR child_w[] = {'c', 'h', 'i', 'l', 'd', 0};
564  static const INT formats[] = {NFR_UNICODE, NFR_ANSI};
565  HWND parent, pager, child;
566  LRESULT ret;
567  INT i;
568 
569  ok(register_notifyformat_class(), "Register test class failed, error 0x%08x\n", GetLastError());
570 
571  for (i = 0; i < ARRAY_SIZE(formats); i++)
572  {
574  parent = CreateWindowW(class_w, parent_w, WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleW(0), 0);
575  ok(parent != NULL, "CreateWindow failed\n");
576  pager = CreateWindowW(WC_PAGESCROLLERW, pager_w, WS_CHILD, 0, 0, 100, 100, parent, 0, GetModuleHandleW(0), 0);
577  ok(pager != NULL, "CreateWindow failed\n");
578  child = CreateWindowW(class_w, child_w, WS_CHILD, 0, 0, 100, 100, pager, 0, GetModuleHandleW(0), 0);
579  ok(child != NULL, "CreateWindow failed\n");
580  SendMessageW(pager, PGM_SETCHILD, 0, (LPARAM)child);
581 
582  /* Test parent */
584  ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent, NF_REQUERY);
585  ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
586  ok(notify_query_received, "Didn't receive notify\n");
587 
588  /* Send NF_QUERY directly to parent */
590  ret = SendMessageW(parent, WM_NOTIFYFORMAT, (WPARAM)pager, NF_QUERY);
591  ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
592  ok(notify_query_received, "Didn't receive notify\n");
593 
594  /* Pager send notifications to its parent regardless of wParam */
596  ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent_wnd, NF_REQUERY);
597  ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
598  ok(notify_query_received, "Didn't receive notify\n");
599 
600  /* Pager always wants Unicode notifications from children */
601  ret = SendMessageW(child, WM_NOTIFYFORMAT, (WPARAM)pager, NF_REQUERY);
602  ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
603  ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)child, NF_QUERY);
604  ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
605 
607  }
608 
610 }
611 
612 static void notify_generic_text_handler(CHAR **text, INT *text_max)
613 {
614  const struct notify_test_send *send_data;
615  const struct notify_test_receive *receive_data;
616 
617  switch (notify_test_info.test_id)
618  {
619  case CONVERT_SEND:
620  case DONT_CONVERT_SEND:
621  {
625  ok(!lstrcmpA(*text, empty_a), "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n",
628  ok(!lstrcmpA(send_data->expect_text, *text), "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n",
630  (CHAR *)send_data->expect_text, *text);
631  else
632  ok(!lstrcmpW((WCHAR *)send_data->expect_text, (WCHAR *)*text),
633  "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n", notify_test_info.unicode,
635  wine_dbgstr_w((WCHAR *)*text));
636  if (text_max)
637  ok(*text_max == send_data->send_text_max, "Code 0x%08x test 0x%08x sub test %d expect %d, got %d\n",
639  send_data->send_text_max, *text_max);
640  break;
641  }
642  case CONVERT_RECEIVE:
644  {
647  if (text_max)
648  ok(*text_max == receive_data->send_text_max, "Code 0x%08x test 0x%08x sub test %d expect %d, got %d\n",
650  receive_data->send_text_max, *text_max);
651 
652  if (receive_data->write_text)
653  memcpy(*text, receive_data->write_text, receive_data->write_text_size);
654  /* 64bit Windows will try to free the text pointer even if it's application provided when handling
655  * HDN_GETDISPINFOW. Deliberate leak here. */
657  *text = heap_strdup(receive_data->write_pointer);
658  else
659  *text = receive_data->write_pointer;
660  if (text_max && receive_data->write_text_max != -1) *text_max = receive_data->write_text_max;
661  break;
662  }
663  case SEND_EMPTY_IF_NULL:
664  ok(!lstrcmpA(*text, empty_a), "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n",
666  break;
668  ok(!*text, "Code 0x%08x test 0x%08x sub test %d expect null text\n", notify_test_info.unicode,
670  break;
671  }
672 }
673 
675 {
677  ok(nm->lpszText == nm->szText, "Sub test %d expect %p, got %p\n", notify_test_info.sub_test_id, nm->szText,
678  nm->lpszText);
679  if (data->expect_sztext)
680  ok(!lstrcmpA(data->expect_sztext, nm->szText), "Sub test %d expect %s, got %s\n", notify_test_info.sub_test_id,
681  data->expect_sztext, nm->szText);
682  if (data->write_sztext) memcpy(nm->szText, data->write_sztext, data->write_sztext_size);
683  if (data->write_lpsztext) nm->lpszText = data->write_lpsztext;
684  if (data->write_hinst) nm->hinst = data->write_hinst;
685 }
686 
688 {
690  if (data->expect_pszformat)
691  ok(!lstrcmpA(data->expect_pszformat, nm->pszFormat), "Sub test %d expect %s, got %s\n",
692  notify_test_info.sub_test_id, data->expect_pszformat, nm->pszFormat);
693  ok(nm->pszDisplay == nm->szDisplay, "Test %d expect %p, got %p\n", notify_test_info.sub_test_id, nm->szDisplay,
694  nm->pszDisplay);
695  if (data->write_szdisplay) memcpy(nm->szDisplay, data->write_szdisplay, data->write_szdisplay_size);
696  if (data->write_pszdisplay) nm->pszDisplay = data->write_pszdisplay;
697 }
698 
700 {
701  static const WCHAR test[] = {'t', 'e', 's', 't', 0};
702  switch (message)
703  {
704  case WM_NOTIFY:
705  {
706  NMHDR *hdr = (NMHDR *)lParam;
707 
708  /* Not notifications we want to test */
709  if (!notify_test_info.unicode) break;
710  ok(!notify_test_info.received, "Extra notification received\n");
711 
712  ok(wParam == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
713  ok(hdr->code == notify_test_info.ansi, "Expect 0x%08x, got 0x%08x\n", notify_test_info.ansi, hdr->code);
714  ok(hdr->idFrom == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
715  ok(hdr->hwndFrom == notify_test_info.hwnd_from, "Expect %p, got %p\n", notify_test_info.hwnd_from, hdr->hwndFrom);
716 
717  if (hdr->code != notify_test_info.ansi)
718  {
719  skip("Notification code mismatch, skipping lParam check\n");
720  return 0;
721  }
722  switch (hdr->code)
723  {
724  /* ComboBoxEx */
725  case CBEN_INSERTITEM:
726  case CBEN_DELETEITEM:
727  {
728  NMCOMBOBOXEXW *nmcbe = (NMCOMBOBOXEXW *)hdr;
730  break;
731  }
732  case CBEN_DRAGBEGINA:
733  {
734  NMCBEDRAGBEGINA *nmcbedb = (NMCBEDRAGBEGINA *)hdr;
735  ok(!lstrcmpA(nmcbedb->szText, test_a), "Expect %s, got %s\n", nmcbedb->szText, test_a);
736  break;
737  }
738  case CBEN_ENDEDITA:
739  {
740  NMCBEENDEDITA *nmcbeed = (NMCBEENDEDITA *)hdr;
741  ok(!lstrcmpA(nmcbeed->szText, test_a), "Expect %s, got %s\n", nmcbeed->szText, test_a);
742  break;
743  }
744  case CBEN_GETDISPINFOA:
745  {
746  NMCOMBOBOXEXA *nmcbe = (NMCOMBOBOXEXA *)hdr;
748  break;
749  }
750  /* Date and Time Picker */
751  case DTN_FORMATA:
752  {
754  break;
755  }
756  case DTN_FORMATQUERYA:
757  {
760  break;
761  }
762  case DTN_WMKEYDOWNA:
763  {
766  break;
767  }
768  case DTN_USERSTRINGA:
769  {
772  break;
773  }
774  /* Header */
775  case HDN_BEGINDRAG:
776  case HDN_ENDDRAG:
777  case HDN_BEGINFILTEREDIT:
778  case HDN_ENDFILTEREDIT:
779  case HDN_DROPDOWN:
780  case HDN_FILTERCHANGE:
781  case HDN_ITEMKEYDOWN:
783  case HDN_OVERFLOWCLICK:
784  {
785  NMHEADERW *nmhd = (NMHEADERW *)hdr;
786  ok(!lstrcmpW(nmhd->pitem->pszText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w),
787  wine_dbgstr_w(nmhd->pitem->pszText));
788  ok(!lstrcmpW(((HD_TEXTFILTERW *)nmhd->pitem->pvFilter)->pszText, test_w), "Expect %s, got %s\n",
790  break;
791  }
792  case HDN_BEGINTRACKA:
794  case HDN_ENDTRACKA:
795  case HDN_ITEMCHANGEDA:
796  case HDN_ITEMCHANGINGA:
797  case HDN_ITEMCLICKA:
798  case HDN_ITEMDBLCLICKA:
799  case HDN_TRACKA:
800  {
801  NMHEADERA *nmhd = (NMHEADERA *)hdr;
802  ok(!lstrcmpA(nmhd->pitem->pszText, test_a), "Expect %s, got %s\n", test_a, nmhd->pitem->pszText);
803  ok(!lstrcmpA(((HD_TEXTFILTERA *)nmhd->pitem->pvFilter)->pszText, test_a), "Expect %s, got %s\n", test_a,
804  ((HD_TEXTFILTERA *)nmhd->pitem->pvFilter)->pszText);
805  break;
806  }
807  case HDN_GETDISPINFOA:
808  {
809  NMHDDISPINFOA *nmhddi = (NMHDDISPINFOA *)hdr;
810  notify_generic_text_handler(&nmhddi->pszText, &nmhddi->cchTextMax);
811  break;
812  }
813  /* List View */
814  case LVN_BEGINLABELEDITA:
815  case LVN_ENDLABELEDITA:
816  case LVN_GETDISPINFOA:
817  case LVN_SETDISPINFOA:
818  {
819  NMLVDISPINFOA *nmlvdi = (NMLVDISPINFOA *)hdr;
821  break;
822  }
823  case LVN_GETINFOTIPA:
824  {
825  NMLVGETINFOTIPA *nmlvgit = (NMLVGETINFOTIPA *)hdr;
826  notify_generic_text_handler(&nmlvgit->pszText, &nmlvgit->cchTextMax);
827  break;
828  }
830  case LVN_ODFINDITEMA:
831  {
832  NMLVFINDITEMA *nmlvfi = (NMLVFINDITEMA *)hdr;
834  break;
835  }
836  /* Toolbar */
837  case TBN_SAVE:
838  {
839  NMTBSAVE *nmtbs = (NMTBSAVE *)hdr;
841  break;
842  }
843  case TBN_RESTORE:
844  {
845  NMTBRESTORE *nmtbr = (NMTBRESTORE *)hdr;
847  break;
848  }
849  case TBN_GETBUTTONINFOA:
850  {
851  NMTOOLBARA *nmtb = (NMTOOLBARA *)hdr;
853  break;
854  }
855  case TBN_GETDISPINFOW:
856  {
857  NMTBDISPINFOW *nmtbdi = (NMTBDISPINFOW *)hdr;
858  notify_generic_text_handler((CHAR **)&nmtbdi->pszText, &nmtbdi->cchText);
859  break;
860  }
861  case TBN_GETINFOTIPA:
862  {
863  NMTBGETINFOTIPA *nmtbgit = (NMTBGETINFOTIPA *)hdr;
864  notify_generic_text_handler(&nmtbgit->pszText, &nmtbgit->cchTextMax);
865  break;
866  }
867  /* Tooltip */
868  case TTN_GETDISPINFOA:
869  {
871  break;
872  }
873  /* Tree View */
874  case TVN_BEGINLABELEDITA:
875  case TVN_ENDLABELEDITA:
876  case TVN_GETDISPINFOA:
877  case TVN_SETDISPINFOA:
878  {
879  NMTVDISPINFOA *nmtvdi = (NMTVDISPINFOA *)hdr;
881  break;
882  }
883  case TVN_GETINFOTIPA:
884  {
885  NMTVGETINFOTIPA *nmtvgit = (NMTVGETINFOTIPA *)hdr;
886  notify_generic_text_handler(&nmtvgit->pszText, &nmtvgit->cchTextMax);
887  break;
888  }
889  case TVN_SINGLEEXPAND:
890  case TVN_BEGINDRAGA:
891  case TVN_BEGINRDRAGA:
892  case TVN_ITEMEXPANDEDA:
893  case TVN_ITEMEXPANDINGA:
894  case TVN_DELETEITEMA:
895  case TVN_SELCHANGINGA:
896  case TVN_SELCHANGEDA:
897  {
898  NMTREEVIEWA *nmtv = (NMTREEVIEWA *)hdr;
901  else
903  break;
904  }
905 
906  default:
907  ok(0, "Unexpected message 0x%08x\n", hdr->code);
908  }
910  ok(!lstrcmpA(test_a, "test"), "test_a got modified\n");
911  ok(!lstrcmpW(test_w, test), "test_w got modified\n");
912  return 0;
913  }
914  case WM_NOTIFYFORMAT:
915  if (lParam == NF_QUERY) return NFR_ANSI;
916  break;
917  }
919 }
920 
922 {
923  WNDCLASSA cls = {0};
924 
927  cls.lpszClassName = "Pager notify class";
928  return RegisterClassA(&cls);
929 }
930 
931 static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
932 {
933  NMHDR *hdr = (NMHDR *)lParam;
934 
935  notify_test_info.unicode = unicode;
938  notify_test_info.ansi = ansi;
940 
941  hdr->code = unicode;
942  hdr->idFrom = 1;
943  hdr->hwndFrom = child1_wnd;
944 
945  SendMessageW(pager, WM_NOTIFY, hdr->idFrom, lParam);
946  ok(notify_test_info.received, "Expect notification received\n");
947  ok(hdr->code == code_change ? ansi : unicode, "Expect 0x%08x, got 0x%08x\n", hdr->code,
948  code_change ? ansi : unicode);
949 }
950 
951 /* Send notify to test text field conversion. In parent proc notify_generic_text_handler() handles these messages */
952 static void test_notify_generic_text_helper(HWND pager, const struct generic_text_helper_para *para)
953 {
954  const struct notify_test_send *send_data;
955  const struct notify_test_receive *receive_data;
956  INT array_size;
957  INT i;
958 
959  notify_test_info.flags = para->flags;
961 
962  if (para->flags & (CONVERT_SEND | DONT_CONVERT_SEND))
963  {
964  if (para->flags & CONVERT_SEND)
965  {
967  send_data = test_convert_send_data;
969  }
970  else
971  {
973  send_data = test_dont_convert_send_data;
975  }
976 
977  for (i = 0; i < array_size; i++)
978  {
979  const struct notify_test_send *data = send_data + i;
981 
982  memset(para->ptr, 0, para->size);
983  if (para->mask) *para->mask = para->required_mask;
984  if (data->send_text)
985  {
986  memcpy(buffer, data->send_text, data->send_text_size);
987  *para->text = buffer;
988  }
989  if (para->text_max) *para->text_max = data->send_text_max;
990  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
991  }
992  }
993 
995  {
996  if (para->flags & CONVERT_RECEIVE)
997  {
1001  }
1002  else
1003  {
1007  }
1008 
1009  for (i = 0; i < array_size; i++)
1010  {
1011  const struct notify_test_receive *data = receive_data + i;
1013 
1014  memset(para->ptr, 0, para->size);
1015  if (para->mask) *para->mask = para->required_mask;
1016  if (data->send_text)
1017  {
1018  memcpy(buffer, data->send_text, data->send_text_size);
1019  *para->text = buffer;
1020  }
1021  if (para->text_max) *para->text_max = data->send_text_max;
1022  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1023  if (data->return_text)
1024  {
1025  if (para->flags & CONVERT_RECEIVE)
1026  ok(!lstrcmpW(data->return_text, *para->text), "Code 0x%08x sub test %d expect %s, got %s\n",
1027  para->code_unicode, i, wine_dbgstr_w((WCHAR *)data->return_text), wine_dbgstr_w(*para->text));
1028  else
1029  ok(!lstrcmpA(data->return_text, (CHAR *)*para->text), "Code 0x%08x sub test %d expect %s, got %s\n",
1030  para->code_unicode, i, (CHAR *)data->return_text, (CHAR *)*para->text);
1031  }
1032  if (para->text_max)
1033  ok(data->return_text_max == *para->text_max, "Code 0x%08x sub test %d expect %d, got %d\n",
1034  para->code_unicode, i, data->return_text_max, *para->text_max);
1035  }
1036  }
1037 
1038  /* Extra tests for other behavior flags that are not worth it to create their own test arrays */
1039  memset(para->ptr, 0, para->size);
1040  if (para->mask) *para->mask = para->required_mask;
1041  if (para->text_max) *para->text_max = 1;
1042  if (para->flags & SEND_EMPTY_IF_NULL)
1044  else
1046  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1047 
1049  memset(para->ptr, 0, para->size);
1050  memset(buffer, 0, sizeof(buffer));
1051  *para->text = buffer;
1052  if (para->text_max) *para->text_max = ARRAY_SIZE(buffer);
1053  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1054  if(para->flags & SET_NULL_IF_NO_MASK)
1055  ok(!*para->text, "Expect null text\n");
1056 }
1057 
1059 {
1060  static NMCBEDRAGBEGINW nmcbedb;
1061  static NMCBEENDEDITW nmcbeed;
1062 
1063  /* CBEN_DRAGBEGIN */
1064  memset(&nmcbedb, 0, sizeof(nmcbedb));
1065  memcpy(nmcbedb.szText, test_w, sizeof(test_w));
1067  ok(!lstrcmpW(nmcbedb.szText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(nmcbedb.szText));
1068 
1069  /* CBEN_ENDEDIT */
1070  memset(&nmcbeed, 0, sizeof(nmcbeed));
1071  memcpy(nmcbeed.szText, test_w, sizeof(test_w));
1072  send_notify(pager, CBEN_ENDEDITW, CBEN_ENDEDITA, (LPARAM)&nmcbeed, FALSE);
1073  ok(!lstrcmpW(nmcbeed.szText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(nmcbeed.szText));
1074 }
1075 
1076 static void test_wm_notify_datetime(HWND pager)
1077 {
1078  const struct notify_test_datetime_format *data;
1079  NMDATETIMEFORMATW nmdtf;
1080  INT i;
1081 
1082  for (i = 0; i < ARRAY_SIZE(test_datetime_format_data); i++)
1083  {
1086 
1087  memset(&nmdtf, 0, sizeof(nmdtf));
1088  if(data->send_pszformat) nmdtf.pszFormat = data->send_pszformat;
1089  nmdtf.pszDisplay = nmdtf.szDisplay;
1090  send_notify(pager, DTN_FORMATW, DTN_FORMATA, (LPARAM)&nmdtf, TRUE);
1091  if (data->return_szdisplay)
1092  ok(!lstrcmpW(nmdtf.szDisplay, data->return_szdisplay), "Sub test %d expect %s, got %s\n", i,
1093  wine_dbgstr_w(data->return_szdisplay), wine_dbgstr_w(nmdtf.szDisplay));
1094  if (data->return_pszdisplay)
1095  ok(!lstrcmpW(nmdtf.pszDisplay, data->return_pszdisplay), "Sub test %d expect %s, got %s\n", i,
1096  wine_dbgstr_w(data->return_pszdisplay), wine_dbgstr_w(nmdtf.pszDisplay));
1097  }
1098 }
1099 
1100 static void test_wm_notify_header(HWND pager)
1101 {
1102  NMHEADERW nmh = {{0}};
1103  HDITEMW hdi = {0};
1104  HD_TEXTFILTERW hdtf = {0};
1105 
1106  hdi.mask = HDI_TEXT | HDI_FILTER;
1107  hdi.pszText = test_w;
1108  hdtf.pszText = test_w;
1109  nmh.pitem = &hdi;
1110  nmh.pitem->pvFilter = &hdtf;
1112  send_notify(pager, HDN_ENDDRAG, HDN_ENDDRAG, (LPARAM)&nmh, TRUE);
1115  send_notify(pager, HDN_DROPDOWN, HDN_DROPDOWN, (LPARAM)&nmh, TRUE);
1127  send_notify(pager, HDN_TRACKW, HDN_TRACKA, (LPARAM)&nmh, TRUE);
1128 }
1129 
1130 static void test_wm_notify_tooltip(HWND pager)
1131 {
1132  NMTTDISPINFOW nmttdi;
1133  const struct notify_test_tooltip *data;
1134  INT i;
1135 
1136  for (i = 0; i < ARRAY_SIZE(test_tooltip_data); i++)
1137  {
1138  data = test_tooltip_data + i;
1140 
1141  memset(&nmttdi, 0, sizeof(nmttdi));
1142  if (data->send_sztext) memcpy(nmttdi.szText, data->send_sztext, data->send_sztext_size);
1143  if (data->send_lpsztext) nmttdi.lpszText = data->send_lpsztext;
1145  if (data->return_sztext)
1146  {
1147  if (data->return_sztext_size == -1)
1148  ok(!lstrcmpW(nmttdi.szText, data->return_sztext), "Sub test %d expect %s, got %s\n", i,
1149  wine_dbgstr_w(data->return_sztext), wine_dbgstr_w(nmttdi.szText));
1150  else
1151  ok(!memcmp(nmttdi.szText, data->return_sztext, data->return_sztext_size), "Wrong szText content\n");
1152  }
1153  if (data->return_lpsztext)
1154  {
1155  if (IS_INTRESOURCE(data->return_lpsztext))
1156  ok(nmttdi.lpszText == data->return_lpsztext, "Sub test %d expect %s, got %s\n", i,
1157  wine_dbgstr_w(data->return_lpsztext), wine_dbgstr_w(nmttdi.lpszText));
1158  else
1159  ok(!lstrcmpW(nmttdi.lpszText, data->return_lpsztext), "Test %d expect %s, got %s\n", i,
1160  wine_dbgstr_w(data->return_lpsztext), wine_dbgstr_w(nmttdi.lpszText));
1161  }
1162  if (data->return_hinst)
1163  ok(nmttdi.hinst == data->return_hinst, "Sub test %d expect %p, got %p\n", i, data->return_hinst,
1164  nmttdi.hinst);
1165  }
1166 }
1167 
1168 static void test_wm_notify(void)
1169 {
1170  static const CHAR *class = "Pager notify class";
1171  HWND parent, pager;
1172  /* Combo Box Ex */
1173  static NMCOMBOBOXEXW nmcbe;
1174  /* Date and Time Picker */
1175  static NMDATETIMEFORMATQUERYW nmdtfq;
1176  static NMDATETIMEWMKEYDOWNW nmdtkd;
1177  static NMDATETIMESTRINGW nmdts;
1178  /* Header */
1179  static NMHDDISPINFOW nmhddi;
1180  /* List View */
1181  static NMLVDISPINFOW nmlvdi;
1182  static NMLVGETINFOTIPW nmlvgit;
1183  static NMLVFINDITEMW nmlvfi;
1184  /* Tool Bar */
1185  static NMTBRESTORE nmtbr;
1186  static NMTBSAVE nmtbs;
1187  static NMTOOLBARW nmtb;
1188  static NMTBDISPINFOW nmtbdi;
1189  static NMTBGETINFOTIPW nmtbgit;
1190  /* Tree View */
1191  static NMTVDISPINFOW nmtvdi;
1192  static NMTVGETINFOTIPW nmtvgit;
1193  static NMTREEVIEWW nmtv;
1194  static const struct generic_text_helper_para paras[] =
1195  {
1196  /* Combo Box Ex */
1197  {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1199  {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1201  {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1203  /* Date and Time Picker */
1204  {&nmdtfq, sizeof(nmdtfq), NULL, 0, (WCHAR **)&nmdtfq.pszFormat, NULL, DTN_FORMATQUERYW, DTN_FORMATQUERYA,
1205  CONVERT_SEND},
1206  {&nmdtkd, sizeof(nmdtkd), NULL, 0, (WCHAR **)&nmdtkd.pszFormat, NULL, DTN_WMKEYDOWNW, DTN_WMKEYDOWNA,
1207  CONVERT_SEND},
1208  {&nmdts, sizeof(nmdts), NULL, 0, (WCHAR **)&nmdts.pszUserString, NULL, DTN_USERSTRINGW, DTN_USERSTRINGA,
1209  CONVERT_SEND},
1210  /* Header */
1211  {&nmhddi, sizeof(nmhddi), &nmhddi.mask, HDI_TEXT, &nmhddi.pszText, &nmhddi.cchTextMax, HDN_GETDISPINFOW,
1213  /* List View */
1214  {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_STRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL,
1216  {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_SUBSTRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL, LVN_ODFINDITEMW,
1218  {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1220  {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1222  {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1224  {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1226  {&nmlvgit, sizeof(nmlvgit), NULL, 0, &nmlvgit.pszText, &nmlvgit.cchTextMax, LVN_GETINFOTIPW, LVN_GETINFOTIPA,
1228  /* Tool Bar */
1229  {&nmtbs, sizeof(nmtbs), NULL, 0, (WCHAR **)&nmtbs.tbButton.iString, NULL, TBN_SAVE, TBN_SAVE,
1231  {&nmtbr, sizeof(nmtbr), NULL, 0, (WCHAR **)&nmtbr.tbButton.iString, NULL, TBN_RESTORE, TBN_RESTORE,
1233  {&nmtbdi, sizeof(nmtbdi), &nmtbdi.dwMask, TBNF_TEXT, &nmtbdi.pszText, &nmtbdi.cchText, TBN_GETDISPINFOW,
1235  {&nmtb, sizeof(nmtb), NULL, 0, &nmtb.pszText, &nmtb.cchText, TBN_GETBUTTONINFOW, TBN_GETBUTTONINFOA,
1237  {&nmtbgit, sizeof(nmtbgit), NULL, 0, &nmtbgit.pszText, &nmtbgit.cchTextMax, TBN_GETINFOTIPW, TBN_GETINFOTIPA,
1239  /* Tree View */
1240  {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1242  {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1244  {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1246  {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1248  {&nmtvgit, sizeof(nmtvgit), NULL, 0, &nmtvgit.pszText, &nmtvgit.cchTextMax, TVN_GETINFOTIPW, TVN_GETINFOTIPA,
1250  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1252  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1254  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1256  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1258  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1260  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1262  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1264  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1266  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1268  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1270  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1272  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1274  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1276  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1278  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1280  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1282  };
1283  INT i;
1284 
1285  ok(register_test_notify_class(), "Register test class failed, error 0x%08x\n", GetLastError());
1286 
1287  parent = CreateWindowA(class, "parent", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), 0);
1288  ok(parent != NULL, "CreateWindow failed\n");
1289  pager = CreateWindowA(WC_PAGESCROLLERA, "pager", WS_CHILD, 0, 0, 100, 100, parent, 0, GetModuleHandleA(0), 0);
1290  ok(pager != NULL, "CreateWindow failed\n");
1291  child1_wnd = CreateWindowA(class, "child", WS_CHILD, 0, 0, 100, 100, pager, (HMENU)1, GetModuleHandleA(0), 0);
1292  ok(child1_wnd != NULL, "CreateWindow failed\n");
1294 
1295  for (i = 0; i < ARRAY_SIZE(paras); i++)
1296  test_notify_generic_text_helper(pager, paras + i);
1297 
1298  /* Tests for those that can't be covered by generic text test helper */
1300  test_wm_notify_datetime(pager);
1301  test_wm_notify_header(pager);
1302  test_wm_notify_tooltip(pager);
1303 
1306 }
1307 
1308 static void init_functions(void)
1309 {
1310  HMODULE mod = LoadLibraryA("comctl32.dll");
1311 
1312 #define X(f) p##f = (void*)GetProcAddress(mod, #f);
1314 #undef X
1315 
1316  pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410);
1317 }
1318 
1320 {
1321  INITCOMMONCONTROLSEX iccex;
1322 
1323  init_functions();
1324 
1325  iccex.dwSize = sizeof(iccex);
1326  iccex.dwICC = ICC_PAGESCROLLER_CLASS;
1327  pInitCommonControlsEx(&iccex);
1328 
1330 
1332  ok(parent_wnd != NULL, "Failed to create parent window!\n");
1333 
1334  test_pager();
1336  test_wm_notify();
1337 
1339 }
#define CBEN_GETDISPINFOW
Definition: commctrl.h:3850
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define DTN_WMKEYDOWNA
Definition: commctrl.h:4365
#define HDN_GETDISPINFOA
Definition: commctrl.h:838
#define HDN_ITEMSTATEICONCLICK
Definition: commctrl.h:846
#define CBEN_DELETEITEM
Definition: commctrl.h:3845
RECT rect2
Definition: edittest.c:51
static const struct message set_pos_seq[]
Definition: pager.c:256
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TBNF_TEXT
Definition: commctrl.h:1369
#define LVN_INCREMENTALSEARCHA
Definition: commctrl.h:3135
static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
Definition: pager.c:931
int cchTextMax
Definition: commctrl.h:3293
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3869
#define WC_PAGESCROLLERA
Definition: commctrl.h:4470
Definition: tftpd.h:59
#define TVN_SELCHANGINGW
Definition: commctrl.h:3618
#define TRUE
Definition: types.h:120
START_TEST(pager)
Definition: pager.c:1319
static BOOL(WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX *)
#define TBN_GETINFOTIPA
Definition: commctrl.h:1313
#define HDN_BEGINTRACKA
Definition: commctrl.h:832
TVITEMA itemNew
Definition: commctrl.h:3602
char hdr[14]
Definition: iptest.cpp:33
#define HDN_ITEMCLICKW
Definition: commctrl.h:827
TVITEMW itemOld
Definition: commctrl.h:3609
#define TVN_GETDISPINFOA
Definition: commctrl.h:3626
#define TVN_ITEMEXPANDEDW
Definition: commctrl.h:3674
HMODULE return_hinst
Definition: pager.c:172
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
CHAR * expect_sztext
Definition: pager.c:174
#define HDN_FILTERCHANGE
Definition: commctrl.h:842
INT send_text_max
Definition: pager.c:101
INT return_sztext_size
Definition: pager.c:170
#define HDN_ITEMCHANGINGA
Definition: commctrl.h:822
static void notify_datetime_handler(NMDATETIMEFORMATA *nm)
Definition: pager.c:687
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define DTN_USERSTRINGW
Definition: commctrl.h:4346
#define TVN_BEGINDRAGA
Definition: commctrl.h:3675
UINT handler_id
Definition: pager.c:91
#define TVN_BEGINRDRAGW
Definition: commctrl.h:3678
static LRESULT WINAPI pager_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:374
#define TVN_DELETEITEMA
Definition: commctrl.h:3679
#define PAGER_SEQ_INDEX
Definition: pager.c:28
#define TVN_ITEMEXPANDEDA
Definition: commctrl.h:3673
DWORD dwMask
Definition: commctrl.h:1384
static CHAR * heap_strdup(const CHAR *str)
Definition: pager.c:285
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
const WCHAR * text
Definition: package.c:1827
#define WM_NCCALCSIZE
Definition: winuser.h:1667
#define LVN_GETDISPINFOA
Definition: commctrl.h:3125
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define HDN_ITEMCHANGEDA
Definition: commctrl.h:824
char CHAR
Definition: xmlstorage.h:175
#define WM_GETTEXT
Definition: winuser.h:1600
Definition: msg.h:39
int notify
Definition: msacm.c:1353
static const struct pixel_format_desc formats[]
Definition: util.c:57
static BOOL notify_query_received
Definition: pager.c:32
LVFINDINFOW lvfi
Definition: commctrl.h:3073
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
LPWSTR pszText
Definition: commctrl.h:671
#define LVN_SETDISPINFOW
Definition: commctrl.h:3128
static CHAR empty_a[]
Definition: pager.c:38
#define X(f)
LONG top
Definition: windef.h:292
#define LVN_GETDISPINFOW
Definition: commctrl.h:3126
HANDLE HWND
Definition: compat.h:13
static struct notify_test_info notify_test_info
int cbClsExtra
Definition: winuser.h:3139
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define WM_MOVE
Definition: winuser.h:1592
LPCSTR lpszMenuName
Definition: winuser.h:3145
LPWSTR pszText
Definition: commctrl.h:643
GLuint buffer
Definition: glext.h:5915
INT send_text_size
Definition: pager.c:100
#define WHITE_BRUSH
Definition: wingdi.h:901
static HWND create_parent_window(void)
Definition: pager.c:364
WCHAR * send_text
Definition: pager.c:109
static HWND create_pager_control(DWORD style)
Definition: pager.c:387
#define PGF_CALCHEIGHT
Definition: commctrl.h:4555
static WCHAR large_truncated_80_w[80]
Definition: pager.c:53
#define WM_NCHITTEST
Definition: winuser.h:1668
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3875
#define test
Definition: rosglue.h:37
UINT_PTR WPARAM
Definition: windef.h:207
static const struct notify_test_receive test_dont_convert_receive_data[]
Definition: pager.c:155
HBRUSH hbrBackground
Definition: winuser.h:3144
static BOOL register_child_wnd_class(void)
Definition: pager.c:430
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:291
CHAR * write_sztext
Definition: pager.c:164
UINT mask
Definition: commctrl.h:3288
WCHAR szText[80]
Definition: commctrl.h:1879
char * LPSTR
Definition: xmlstorage.h:182
UINT unicode
Definition: pager.c:83
#define HDI_TEXT
Definition: commctrl.h:689
static const struct message switch_child_seq[]
Definition: pager.c:242
LONG right
Definition: windef.h:293
BOOL WINAPI DestroyWindow(_In_ HWND)
#define PGM_SETCHILD
Definition: commctrl.h:4488
LPWSTR pszText
Definition: commctrl.h:3292
#define HDN_ITEMCHANGINGW
Definition: commctrl.h:823
INT send_sztext_size
Definition: pager.c:177
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4217
int32_t INT
Definition: typedefs.h:56
LPWSTR pszText
Definition: commctrl.h:886
static HWND child
Definition: cursoricon.c:298
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
LPWSTR pszText
Definition: commctrl.h:1388
#define CBEN_GETDISPINFOA
Definition: commctrl.h:3843
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define CHILD2_ID
Definition: pager.c:217
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static UINT array_size
Definition: msctf.c:69
TVITEMA item
Definition: commctrl.h:3639
static CHAR test_a[]
Definition: pager.c:34
#define HDN_OVERFLOWCLICK
Definition: commctrl.h:849
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static LRESULT WINAPI child_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:401
#define ICC_PAGESCROLLER_CLASS
Definition: commctrl.h:71
COMBOBOXEXITEMA ceItem
Definition: commctrl.h:3831
#define TVN_SELCHANGEDA
Definition: commctrl.h:3619
#define LVIF_TEXT
Definition: commctrl.h:2281
int cchTextMax
Definition: commctrl.h:2338
UINT code
Definition: winuser.h:3133
#define WM_NCPAINT
Definition: winuser.h:1669
#define TVN_ENDLABELEDITW
Definition: commctrl.h:3684
#define PGN_CALCSIZE
Definition: commctrl.h:4552
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
static const struct notify_test_datetime_format test_datetime_format_data[]
int cbWndExtra
Definition: winuser.h:3140
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3894
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
static void test_wm_notify_header(HWND pager)
Definition: pager.c:1100
static void test_wm_notify_tooltip(HWND pager)
Definition: pager.c:1130
#define TBN_GETBUTTONINFOA
Definition: commctrl.h:1278
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define TVN_GETINFOTIPA
Definition: commctrl.h:3686
DWORD flags
Definition: pager.c:93
WCHAR * return_lpsztext
Definition: pager.c:171
#define PGM_SETPOS
Definition: commctrl.h:4509
COMBOBOXEXITEMW ceItem
Definition: commctrl.h:3836
#define WM_CHILDACTIVATE
Definition: winuser.h:1620
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static WCHAR empty_w[]
Definition: pager.c:37
#define CBEIF_TEXT
Definition: commctrl.h:3758
static HWND child1_wnd
Definition: pager.c:30
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
WNDPROC lpfnWndProc
Definition: winuser.h:3151
LPSTR pszText
Definition: commctrl.h:1415
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: pager.c:222
#define DTN_FORMATA
Definition: commctrl.h:4385
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4216
#define HDN_GETDISPINFOW
Definition: commctrl.h:839
HCURSOR hCursor
Definition: winuser.h:3143
static const struct notify_test_tooltip test_tooltip_data[]
static void init_msg_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:391
LPSTR pszText
Definition: commctrl.h:654
#define GWLP_USERDATA
Definition: treelist.c:63
const WCHAR * str
WCHAR * return_sztext
Definition: pager.c:169
smooth NULL
Definition: ftsmooth.c:416
#define PGF_CALCWIDTH
Definition: commctrl.h:4554
static void test_wm_notify_datetime(HWND pager)
Definition: pager.c:1076
LPCWSTR lpszClassName
Definition: winuser.h:3159
LONG_PTR LPARAM
Definition: windef.h:208
#define TTN_GETDISPINFOA
Definition: commctrl.h:1844
void * return_text
Definition: pager.c:118
static void notify_tooltip_handler(NMTTDISPINFOA *nm)
Definition: pager.c:674
#define PGS_HORZ
Definition: commctrl.h:4475
#define TVN_ITEMEXPANDINGW
Definition: commctrl.h:3672
DWORD dwFlag
Definition: commctrl.h:4559
static void test_wm_notify(void)
Definition: pager.c:1168
const char * LPCSTR
Definition: xmlstorage.h:183
#define CBEN_DRAGBEGINA
Definition: commctrl.h:3852
INT_PTR iString
Definition: commctrl.h:931
#define TVN_SELCHANGEDW
Definition: commctrl.h:3620
#define LVN_GETINFOTIPW
Definition: commctrl.h:3195
CHAR * write_text
Definition: pager.c:114
#define WC_PAGESCROLLERW
Definition: commctrl.h:4469
Definition: msg.h:41
static BOOL register_test_notify_class(void)
Definition: pager.c:921
#define HDN_ITEMDBLCLICKW
Definition: commctrl.h:829
UINT sub_test_id
Definition: pager.c:90
#define TBN_GETBUTTONINFOW
Definition: commctrl.h:1315
#define TVN_DELETEITEMW
Definition: commctrl.h:3680
static WCHAR buffer[64]
Definition: pager.c:60
#define LVN_BEGINLABELEDITW
Definition: commctrl.h:3108
#define CBEN_ENDEDITA
Definition: commctrl.h:3847
#define CBEN_ENDEDITW
Definition: commctrl.h:3848
#define GetWindowLongPtrA
Definition: winuser.h:4729
TBBUTTON tbButton
Definition: commctrl.h:1345
static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:699
TVITEMW itemNew
Definition: commctrl.h:3610
#define LVN_ODFINDITEMW
Definition: commctrl.h:3117
BOOL received
Definition: pager.c:88
HDITEMW * pitem
Definition: commctrl.h:876
INT write_sztext_size
Definition: pager.c:165
static BOOL register_parent_wnd_class(void)
Definition: pager.c:347
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define WS_OVERLAPPED
Definition: pedump.c:615
LPSTR pszText
Definition: commctrl.h:2320
r parent
Definition: btrfs.c:2897
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define TVN_SETDISPINFOW
Definition: commctrl.h:3629
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NFR_UNICODE
Definition: winuser.h:2434
#define WM_SIZE
Definition: winuser.h:1593
#define TVN_ENDLABELEDITA
Definition: commctrl.h:3683
static CHAR large_a[]
Definition: pager.c:39
#define HDN_ENDTRACKA
Definition: commctrl.h:834
#define HDN_TRACKW
Definition: commctrl.h:837
LPWSTR pszText
Definition: commctrl.h:2337
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define HDN_ITEMCLICKA
Definition: commctrl.h:826
#define NF_REQUERY
Definition: winuser.h:2436
void * expect_text
Definition: pager.c:103
WCHAR szDisplay[64]
Definition: commctrl.h:4400
#define WINAPI
Definition: msvc.h:8
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
LPCWSTR psz
Definition: commctrl.h:2429
const char * wine_dbgstr_rect(const RECT *rect)
#define DTN_FORMATW
Definition: commctrl.h:4386
unsigned long DWORD
Definition: ntddk_ex.h:95
#define HDN_BEGINFILTEREDIT
Definition: commctrl.h:844
#define TBN_GETINFOTIPW
Definition: commctrl.h:1314
#define LVFI_SUBSTRING
Definition: commctrl.h:2410
HDITEMA * pitem
Definition: commctrl.h:869
handler_ids
Definition: pager.c:75
LPWSTR pszText
Definition: commctrl.h:1424
static WCHAR large_truncated_65_w[65]
Definition: pager.c:47
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define HDN_ENDTRACKW
Definition: commctrl.h:835
static void test_notify_generic_text_helper(HWND pager, const struct generic_text_helper_para *para)
Definition: pager.c:952
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define DTN_USERSTRINGA
Definition: commctrl.h:4345
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
static const struct message set_child_seq[]
Definition: pager.c:224
#define LVN_ODFINDITEMA
Definition: commctrl.h:3116
static DWORD_PTR
Definition: pager.c:220
#define WM_PAINT
Definition: winuser.h:1602
UINT mask
Definition: commctrl.h:2332
#define CCS_NORESIZE
Definition: commctrl.h:2217
#define TVN_SELCHANGINGA
Definition: commctrl.h:3617
int ret
UINT test_id
Definition: pager.c:89
Definition: msg.h:34
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
CHAR * write_pointer
Definition: pager.c:113
void * pvFilter
Definition: commctrl.h:679
static WCHAR large_w[]
Definition: pager.c:40
#define TBN_SAVE
Definition: commctrl.h:1317
int cchTextMax
Definition: commctrl.h:2321
static void test_wm_notify_comboboxex(HWND pager)
Definition: pager.c:1058
static const struct notify_test_send test_convert_send_data[]
Definition: pager.c:136
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define HDN_TRACKA
Definition: commctrl.h:836
#define SetWindowLongPtrA
Definition: winuser.h:5246
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
static void notify_generic_text_handler(CHAR **text, INT *text_max)
Definition: pager.c:612
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:293
WCHAR * send_lpsztext
Definition: pager.c:178
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define HDN_ENDFILTEREDIT
Definition: commctrl.h:845
LPCSTR lpszClassName
Definition: winuser.h:3146
HWND hwndFrom
Definition: winuser.h:3131
#define TVN_SINGLEEXPAND
Definition: commctrl.h:3688
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define TVN_BEGINDRAGW
Definition: commctrl.h:3676
#define TVN_BEGINLABELEDITW
Definition: commctrl.h:3682
#define WM_USER
Definition: winuser.h:1877
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
#define GWLP_WNDPROC
Definition: treelist.c:66
#define NF_QUERY
Definition: winuser.h:2435
static void test_pager(void)
Definition: pager.c:447
UINT style
Definition: winuser.h:3137
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2880
WCHAR * send_sztext
Definition: pager.c:176
#define GWL_STYLE
Definition: winuser.h:846
HANDLE HMODULE
Definition: typedefs.h:75
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define HDN_DROPDOWN
Definition: commctrl.h:848
HWND WINAPI GetParent(_In_ HWND)
#define CBEN_DRAGBEGINW
Definition: commctrl.h:3853
#define HDN_ENDDRAG
Definition: commctrl.h:841
#define WS_BORDER
Definition: pedump.c:625
#define HDN_DIVIDERDBLCLICKA
Definition: commctrl.h:830
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define TVN_GETDISPINFOW
Definition: commctrl.h:3627
static SUBCLASSPROC
Definition: pager.c:220
static WCHAR test_w[]
Definition: pager.c:33
#define DTN_FORMATQUERYW
Definition: commctrl.h:4408
HINSTANCE hInstance
Definition: winuser.h:3141
HWND hwnd_from
Definition: pager.c:86
#define TVIF_TEXT
Definition: commctrl.h:3238
#define add_message(msg)
Definition: msg.c:2142
#define ARRAY_SIZE(a)
Definition: main.h:24
#define CHILD1_ID
Definition: pager.c:216
UINT_PTR id_from
Definition: pager.c:85
#define TBN_RESTORE
Definition: commctrl.h:1316
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ok(value,...)
Definition: atltest.h:57
#define LVN_ENDLABELEDITW
Definition: commctrl.h:3110
#define LVN_ENDLABELEDITA
Definition: commctrl.h:3109
#define HDN_BEGINDRAG
Definition: commctrl.h:840
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define HDN_ITEMKEYDOWN
Definition: commctrl.h:847
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define TVN_GETINFOTIPW
Definition: commctrl.h:3687
#define CBEN_INSERTITEM
Definition: commctrl.h:3844
unsigned int UINT
Definition: ndis.h:50
#define LVN_BEGINLABELEDITA
Definition: commctrl.h:3107
static INT notify_format
Definition: pager.c:31
#define HDN_BEGINTRACKW
Definition: commctrl.h:833
char szText[80]
Definition: commctrl.h:1870
#define LVN_SETDISPINFOA
Definition: commctrl.h:3127
TBBUTTON tbButton
Definition: commctrl.h:1334
#define HDN_DIVIDERDBLCLICKW
Definition: commctrl.h:831
#define WM_DEVICECHANGE
Definition: winuser.h:1793
#define NFR_ANSI
Definition: winuser.h:2433
int cchTextMax
Definition: commctrl.h:3280
WNDPROC lpfnWndProc
Definition: winuser.h:3138
static HWND parent_wnd
Definition: pager.c:30
static HWND child2_wnd
Definition: pager.c:30
#define HDI_FILTER
Definition: commctrl.h:696
#define TVN_SETDISPINFOA
Definition: commctrl.h:3628
static CHAR te_a[]
Definition: pager.c:36
HINSTANCE hInstance
Definition: winuser.h:3154
#define skip(...)
Definition: atltest.h:64
WCHAR * send_text
Definition: pager.c:99
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
UINT mask
Definition: commctrl.h:669
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
static void test_wm_notifyformat(void)
Definition: pager.c:557
#define LVFI_STRING
Definition: commctrl.h:2409
LVFINDINFOA lvfi
Definition: commctrl.h:3067
void * pvFilter
Definition: commctrl.h:662
const WCHAR * class
Definition: main.c:68
TVITEMW item
Definition: commctrl.h:3644
#define TVN_BEGINLABELEDITA
Definition: commctrl.h:3681
LVITEMW item
Definition: commctrl.h:3151
GLenum GLuint id
Definition: glext.h:5579
BOOL WINAPI IsWindowVisible(_In_ HWND)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:847
static int receive_data(SOCKET sock, SecBuffer *buf)
Definition: schannel.c:601
LONG bottom
Definition: windef.h:294
#define TVN_BEGINRDRAGA
Definition: commctrl.h:3677
#define DTN_WMKEYDOWNW
Definition: commctrl.h:4366
#define GetProcAddress(x, y)
Definition: compat.h:410
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
TVITEMA itemOld
Definition: commctrl.h:3601
#define DTN_FORMATQUERYA
Definition: commctrl.h:4407
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
static void init_functions(void)
Definition: pager.c:1308
#define TTN_GETDISPINFOW
Definition: commctrl.h:1845
#define WM_ERASEBKGND
Definition: winuser.h:1607
test_conversion_flags
Definition: pager.c:63
CHAR * write_lpsztext
Definition: pager.c:166
LONG_PTR LRESULT
Definition: windef.h:209
#define LVN_INCREMENTALSEARCHW
Definition: commctrl.h:3136
#define TBN_GETDISPINFOW
Definition: commctrl.h:1312
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
HMODULE write_hinst
Definition: pager.c:167
#define memset(x, y, z)
Definition: compat.h:39
#define HDN_ITEMDBLCLICKA
Definition: commctrl.h:828
#define LVN_GETINFOTIPA
Definition: commctrl.h:3194
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3886
LPARAM lParam
Definition: combotst.c:139
LPSTR pszText
Definition: commctrl.h:3279
static BOOL register_notifyformat_class(void)
Definition: pager.c:545
static const struct notify_test_receive test_convert_receive_data[]
Definition: pager.c:146
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
HINSTANCE hinst
Definition: commctrl.h:1871
static UINT_PTR
Definition: pager.c:220
#define WM_NOTIFY
Definition: richedit.h:61
static LRESULT WINAPI test_notifyformat_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:525
#define NUM_MSG_SEQUENCES
Definition: pager.c:27
static UINT WPARAM wparam
Definition: combo.c:716
#define HDN_ITEMCHANGEDW
Definition: commctrl.h:825
static const struct notify_test_send test_dont_convert_send_data[]
Definition: pager.c:141
#define TVN_ITEMEXPANDINGA
Definition: commctrl.h:3671
static int mod
Definition: i386-dis.c:1273
HICON hIcon
Definition: winuser.h:3142
static const struct message set_pos_empty_seq[]
Definition: pager.c:280
LVITEMA item
Definition: commctrl.h:3146