ReactOS  0.4.14-dev-554-g2f8d847
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  BOOL bret;
568  INT i;
569 
571  ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
572 
573  for (i = 0; i < ARRAY_SIZE(formats); i++)
574  {
576  parent = CreateWindowW(class_w, parent_w, WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleW(0), 0);
577  ok(parent != NULL, "CreateWindow failed\n");
578  pager = CreateWindowW(WC_PAGESCROLLERW, pager_w, WS_CHILD, 0, 0, 100, 100, parent, 0, GetModuleHandleW(0), 0);
579  ok(pager != NULL, "CreateWindow failed\n");
580  child = CreateWindowW(class_w, child_w, WS_CHILD, 0, 0, 100, 100, pager, 0, GetModuleHandleW(0), 0);
581  ok(child != NULL, "CreateWindow failed\n");
582  SendMessageW(pager, PGM_SETCHILD, 0, (LPARAM)child);
583 
584  /* Test parent */
586  ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent, NF_REQUERY);
587  ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
588  ok(notify_query_received, "Didn't receive notify\n");
589 
590  /* Send NF_QUERY directly to parent */
592  ret = SendMessageW(parent, WM_NOTIFYFORMAT, (WPARAM)pager, NF_QUERY);
593  ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
594  ok(notify_query_received, "Didn't receive notify\n");
595 
596  /* Pager send notifications to its parent regardless of wParam */
598  ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)parent_wnd, NF_REQUERY);
599  ok(ret == notify_format, "Expect %d, got %ld\n", notify_format, ret);
600  ok(notify_query_received, "Didn't receive notify\n");
601 
602  /* Pager always wants Unicode notifications from children */
603  ret = SendMessageW(child, WM_NOTIFYFORMAT, (WPARAM)pager, NF_REQUERY);
604  ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
605  ret = SendMessageW(pager, WM_NOTIFYFORMAT, (WPARAM)child, NF_QUERY);
606  ok(ret == NFR_UNICODE, "Expect %d, got %ld\n", NFR_UNICODE, ret);
607 
609  }
610 
612 }
613 
614 static void notify_generic_text_handler(CHAR **text, INT *text_max)
615 {
616  const struct notify_test_send *send_data;
617  const struct notify_test_receive *receive_data;
618 
619  switch (notify_test_info.test_id)
620  {
621  case CONVERT_SEND:
622  case DONT_CONVERT_SEND:
623  {
627  ok(!lstrcmpA(*text, empty_a), "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n",
630  ok(!lstrcmpA(send_data->expect_text, *text), "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n",
632  (CHAR *)send_data->expect_text, *text);
633  else
634  ok(!lstrcmpW((WCHAR *)send_data->expect_text, (WCHAR *)*text),
635  "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n", notify_test_info.unicode,
637  wine_dbgstr_w((WCHAR *)*text));
638  if (text_max)
639  ok(*text_max == send_data->send_text_max, "Code 0x%08x test 0x%08x sub test %d expect %d, got %d\n",
641  send_data->send_text_max, *text_max);
642  break;
643  }
644  case CONVERT_RECEIVE:
646  {
649  if (text_max)
650  ok(*text_max == receive_data->send_text_max, "Code 0x%08x test 0x%08x sub test %d expect %d, got %d\n",
652  receive_data->send_text_max, *text_max);
653 
654  if (receive_data->write_text)
655  memcpy(*text, receive_data->write_text, receive_data->write_text_size);
656  /* 64bit Windows will try to free the text pointer even if it's application provided when handling
657  * HDN_GETDISPINFOW. Deliberate leak here. */
659  *text = heap_strdup(receive_data->write_pointer);
660  else
661  *text = receive_data->write_pointer;
662  if (text_max && receive_data->write_text_max != -1) *text_max = receive_data->write_text_max;
663  break;
664  }
665  case SEND_EMPTY_IF_NULL:
666  ok(!lstrcmpA(*text, empty_a), "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n",
668  break;
670  ok(!*text, "Code 0x%08x test 0x%08x sub test %d expect null text\n", notify_test_info.unicode,
672  break;
673  }
674 }
675 
677 {
679  ok(nm->lpszText == nm->szText, "Sub test %d expect %p, got %p\n", notify_test_info.sub_test_id, nm->szText,
680  nm->lpszText);
681  if (data->expect_sztext)
682  ok(!lstrcmpA(data->expect_sztext, nm->szText), "Sub test %d expect %s, got %s\n", notify_test_info.sub_test_id,
683  data->expect_sztext, nm->szText);
684  if (data->write_sztext) memcpy(nm->szText, data->write_sztext, data->write_sztext_size);
685  if (data->write_lpsztext) nm->lpszText = data->write_lpsztext;
686  if (data->write_hinst) nm->hinst = data->write_hinst;
687 }
688 
690 {
692  if (data->expect_pszformat)
693  ok(!lstrcmpA(data->expect_pszformat, nm->pszFormat), "Sub test %d expect %s, got %s\n",
694  notify_test_info.sub_test_id, data->expect_pszformat, nm->pszFormat);
695  ok(nm->pszDisplay == nm->szDisplay, "Test %d expect %p, got %p\n", notify_test_info.sub_test_id, nm->szDisplay,
696  nm->pszDisplay);
697  if (data->write_szdisplay) memcpy(nm->szDisplay, data->write_szdisplay, data->write_szdisplay_size);
698  if (data->write_pszdisplay) nm->pszDisplay = data->write_pszdisplay;
699 }
700 
702 {
703  static const WCHAR test[] = {'t', 'e', 's', 't', 0};
704  switch (message)
705  {
706  case WM_NOTIFY:
707  {
708  NMHDR *hdr = (NMHDR *)lParam;
709 
710  /* Not notifications we want to test */
711  if (!notify_test_info.unicode) break;
712  ok(!notify_test_info.received, "Extra notification received\n");
713 
714  ok(wParam == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
715  ok(hdr->code == notify_test_info.ansi, "Expect 0x%08x, got 0x%08x\n", notify_test_info.ansi, hdr->code);
716  ok(hdr->idFrom == notify_test_info.id_from, "Expect %ld, got %ld\n", notify_test_info.id_from, wParam);
717  ok(hdr->hwndFrom == notify_test_info.hwnd_from, "Expect %p, got %p\n", notify_test_info.hwnd_from, hdr->hwndFrom);
718 
719  if (hdr->code != notify_test_info.ansi)
720  {
721  skip("Notification code mismatch, skipping lParam check\n");
722  return 0;
723  }
724  switch (hdr->code)
725  {
726  /* ComboBoxEx */
727  case CBEN_INSERTITEM:
728  case CBEN_DELETEITEM:
729  {
730  NMCOMBOBOXEXW *nmcbe = (NMCOMBOBOXEXW *)hdr;
732  break;
733  }
734  case CBEN_DRAGBEGINA:
735  {
736  NMCBEDRAGBEGINA *nmcbedb = (NMCBEDRAGBEGINA *)hdr;
737  ok(!lstrcmpA(nmcbedb->szText, test_a), "Expect %s, got %s\n", nmcbedb->szText, test_a);
738  break;
739  }
740  case CBEN_ENDEDITA:
741  {
742  NMCBEENDEDITA *nmcbeed = (NMCBEENDEDITA *)hdr;
743  ok(!lstrcmpA(nmcbeed->szText, test_a), "Expect %s, got %s\n", nmcbeed->szText, test_a);
744  break;
745  }
746  case CBEN_GETDISPINFOA:
747  {
748  NMCOMBOBOXEXA *nmcbe = (NMCOMBOBOXEXA *)hdr;
750  break;
751  }
752  /* Date and Time Picker */
753  case DTN_FORMATA:
754  {
756  break;
757  }
758  case DTN_FORMATQUERYA:
759  {
762  break;
763  }
764  case DTN_WMKEYDOWNA:
765  {
768  break;
769  }
770  case DTN_USERSTRINGA:
771  {
774  break;
775  }
776  /* Header */
777  case HDN_BEGINDRAG:
778  case HDN_ENDDRAG:
779  case HDN_BEGINFILTEREDIT:
780  case HDN_ENDFILTEREDIT:
781  case HDN_DROPDOWN:
782  case HDN_FILTERCHANGE:
783  case HDN_ITEMKEYDOWN:
785  case HDN_OVERFLOWCLICK:
786  {
787  NMHEADERW *nmhd = (NMHEADERW *)hdr;
788  ok(!lstrcmpW(nmhd->pitem->pszText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w),
789  wine_dbgstr_w(nmhd->pitem->pszText));
790  ok(!lstrcmpW(((HD_TEXTFILTERW *)nmhd->pitem->pvFilter)->pszText, test_w), "Expect %s, got %s\n",
792  break;
793  }
794  case HDN_BEGINTRACKA:
796  case HDN_ENDTRACKA:
797  case HDN_ITEMCHANGEDA:
798  case HDN_ITEMCHANGINGA:
799  case HDN_ITEMCLICKA:
800  case HDN_ITEMDBLCLICKA:
801  case HDN_TRACKA:
802  {
803  NMHEADERA *nmhd = (NMHEADERA *)hdr;
804  ok(!lstrcmpA(nmhd->pitem->pszText, test_a), "Expect %s, got %s\n", test_a, nmhd->pitem->pszText);
805  ok(!lstrcmpA(((HD_TEXTFILTERA *)nmhd->pitem->pvFilter)->pszText, test_a), "Expect %s, got %s\n", test_a,
806  ((HD_TEXTFILTERA *)nmhd->pitem->pvFilter)->pszText);
807  break;
808  }
809  case HDN_GETDISPINFOA:
810  {
811  NMHDDISPINFOA *nmhddi = (NMHDDISPINFOA *)hdr;
812  notify_generic_text_handler(&nmhddi->pszText, &nmhddi->cchTextMax);
813  break;
814  }
815  /* List View */
816  case LVN_BEGINLABELEDITA:
817  case LVN_ENDLABELEDITA:
818  case LVN_GETDISPINFOA:
819  case LVN_SETDISPINFOA:
820  {
821  NMLVDISPINFOA *nmlvdi = (NMLVDISPINFOA *)hdr;
823  break;
824  }
825  case LVN_GETINFOTIPA:
826  {
827  NMLVGETINFOTIPA *nmlvgit = (NMLVGETINFOTIPA *)hdr;
828  notify_generic_text_handler(&nmlvgit->pszText, &nmlvgit->cchTextMax);
829  break;
830  }
832  case LVN_ODFINDITEMA:
833  {
834  NMLVFINDITEMA *nmlvfi = (NMLVFINDITEMA *)hdr;
836  break;
837  }
838  /* Toolbar */
839  case TBN_SAVE:
840  {
841  NMTBSAVE *nmtbs = (NMTBSAVE *)hdr;
843  break;
844  }
845  case TBN_RESTORE:
846  {
847  NMTBRESTORE *nmtbr = (NMTBRESTORE *)hdr;
849  break;
850  }
851  case TBN_GETBUTTONINFOA:
852  {
853  NMTOOLBARA *nmtb = (NMTOOLBARA *)hdr;
855  break;
856  }
857  case TBN_GETDISPINFOW:
858  {
859  NMTBDISPINFOW *nmtbdi = (NMTBDISPINFOW *)hdr;
860  notify_generic_text_handler((CHAR **)&nmtbdi->pszText, &nmtbdi->cchText);
861  break;
862  }
863  case TBN_GETINFOTIPA:
864  {
865  NMTBGETINFOTIPA *nmtbgit = (NMTBGETINFOTIPA *)hdr;
866  notify_generic_text_handler(&nmtbgit->pszText, &nmtbgit->cchTextMax);
867  break;
868  }
869  /* Tooltip */
870  case TTN_GETDISPINFOA:
871  {
873  break;
874  }
875  /* Tree View */
876  case TVN_BEGINLABELEDITA:
877  case TVN_ENDLABELEDITA:
878  case TVN_GETDISPINFOA:
879  case TVN_SETDISPINFOA:
880  {
881  NMTVDISPINFOA *nmtvdi = (NMTVDISPINFOA *)hdr;
883  break;
884  }
885  case TVN_GETINFOTIPA:
886  {
887  NMTVGETINFOTIPA *nmtvgit = (NMTVGETINFOTIPA *)hdr;
888  notify_generic_text_handler(&nmtvgit->pszText, &nmtvgit->cchTextMax);
889  break;
890  }
891  case TVN_SINGLEEXPAND:
892  case TVN_BEGINDRAGA:
893  case TVN_BEGINRDRAGA:
894  case TVN_ITEMEXPANDEDA:
895  case TVN_ITEMEXPANDINGA:
896  case TVN_DELETEITEMA:
897  case TVN_SELCHANGINGA:
898  case TVN_SELCHANGEDA:
899  {
900  NMTREEVIEWA *nmtv = (NMTREEVIEWA *)hdr;
903  else
905  break;
906  }
907 
908  default:
909  ok(0, "Unexpected message 0x%08x\n", hdr->code);
910  }
912  ok(!lstrcmpA(test_a, "test"), "test_a got modified\n");
913  ok(!lstrcmpW(test_w, test), "test_w got modified\n");
914  return 0;
915  }
916  case WM_NOTIFYFORMAT:
917  if (lParam == NF_QUERY) return NFR_ANSI;
918  break;
919  }
921 }
922 
924 {
925  WNDCLASSA cls = {0};
926 
929  cls.lpszClassName = "Pager notify class";
930  return RegisterClassA(&cls);
931 }
932 
933 static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
934 {
935  NMHDR *hdr = (NMHDR *)lParam;
936 
937  notify_test_info.unicode = unicode;
940  notify_test_info.ansi = ansi;
942 
943  hdr->code = unicode;
944  hdr->idFrom = 1;
945  hdr->hwndFrom = child1_wnd;
946 
947  SendMessageW(pager, WM_NOTIFY, hdr->idFrom, lParam);
948  ok(notify_test_info.received, "Expect notification received\n");
949  ok(hdr->code == code_change ? ansi : unicode, "Expect 0x%08x, got 0x%08x\n", hdr->code,
950  code_change ? ansi : unicode);
951 }
952 
953 /* Send notify to test text field conversion. In parent proc notify_generic_text_handler() handles these messages */
954 static void test_notify_generic_text_helper(HWND pager, const struct generic_text_helper_para *para)
955 {
956  const struct notify_test_send *send_data;
957  const struct notify_test_receive *receive_data;
958  INT array_size;
959  INT i;
960 
961  notify_test_info.flags = para->flags;
963 
964  if (para->flags & (CONVERT_SEND | DONT_CONVERT_SEND))
965  {
966  if (para->flags & CONVERT_SEND)
967  {
969  send_data = test_convert_send_data;
971  }
972  else
973  {
975  send_data = test_dont_convert_send_data;
977  }
978 
979  for (i = 0; i < array_size; i++)
980  {
981  const struct notify_test_send *data = send_data + i;
983 
984  memset(para->ptr, 0, para->size);
985  if (para->mask) *para->mask = para->required_mask;
986  if (data->send_text)
987  {
988  memcpy(buffer, data->send_text, data->send_text_size);
989  *para->text = buffer;
990  }
991  if (para->text_max) *para->text_max = data->send_text_max;
992  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
993  }
994  }
995 
997  {
998  if (para->flags & CONVERT_RECEIVE)
999  {
1003  }
1004  else
1005  {
1009  }
1010 
1011  for (i = 0; i < array_size; i++)
1012  {
1013  const struct notify_test_receive *data = receive_data + i;
1015 
1016  memset(para->ptr, 0, para->size);
1017  if (para->mask) *para->mask = para->required_mask;
1018  if (data->send_text)
1019  {
1020  memcpy(buffer, data->send_text, data->send_text_size);
1021  *para->text = buffer;
1022  }
1023  if (para->text_max) *para->text_max = data->send_text_max;
1024  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1025  if (data->return_text)
1026  {
1027  if (para->flags & CONVERT_RECEIVE)
1028  ok(!lstrcmpW(data->return_text, *para->text), "Code 0x%08x sub test %d expect %s, got %s\n",
1029  para->code_unicode, i, wine_dbgstr_w((WCHAR *)data->return_text), wine_dbgstr_w(*para->text));
1030  else
1031  ok(!lstrcmpA(data->return_text, (CHAR *)*para->text), "Code 0x%08x sub test %d expect %s, got %s\n",
1032  para->code_unicode, i, (CHAR *)data->return_text, (CHAR *)*para->text);
1033  }
1034  if (para->text_max)
1035  ok(data->return_text_max == *para->text_max, "Code 0x%08x sub test %d expect %d, got %d\n",
1036  para->code_unicode, i, data->return_text_max, *para->text_max);
1037  }
1038  }
1039 
1040  /* Extra tests for other behavior flags that are not worth it to create their own test arrays */
1041  memset(para->ptr, 0, para->size);
1042  if (para->mask) *para->mask = para->required_mask;
1043  if (para->text_max) *para->text_max = 1;
1044  if (para->flags & SEND_EMPTY_IF_NULL)
1046  else
1048  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1049 
1051  memset(para->ptr, 0, para->size);
1052  memset(buffer, 0, sizeof(buffer));
1053  *para->text = buffer;
1054  if (para->text_max) *para->text_max = ARRAY_SIZE(buffer);
1055  send_notify(pager, para->code_unicode, para->code_ansi, (LPARAM)para->ptr, TRUE);
1056  if(para->flags & SET_NULL_IF_NO_MASK)
1057  ok(!*para->text, "Expect null text\n");
1058 }
1059 
1061 {
1062  static NMCBEDRAGBEGINW nmcbedb;
1063  static NMCBEENDEDITW nmcbeed;
1064 
1065  /* CBEN_DRAGBEGIN */
1066  memset(&nmcbedb, 0, sizeof(nmcbedb));
1067  memcpy(nmcbedb.szText, test_w, sizeof(test_w));
1069  ok(!lstrcmpW(nmcbedb.szText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(nmcbedb.szText));
1070 
1071  /* CBEN_ENDEDIT */
1072  memset(&nmcbeed, 0, sizeof(nmcbeed));
1073  memcpy(nmcbeed.szText, test_w, sizeof(test_w));
1074  send_notify(pager, CBEN_ENDEDITW, CBEN_ENDEDITA, (LPARAM)&nmcbeed, FALSE);
1075  ok(!lstrcmpW(nmcbeed.szText, test_w), "Expect %s, got %s\n", wine_dbgstr_w(test_w), wine_dbgstr_w(nmcbeed.szText));
1076 }
1077 
1078 static void test_wm_notify_datetime(HWND pager)
1079 {
1080  const struct notify_test_datetime_format *data;
1081  NMDATETIMEFORMATW nmdtf;
1082  INT i;
1083 
1084  for (i = 0; i < ARRAY_SIZE(test_datetime_format_data); i++)
1085  {
1088 
1089  memset(&nmdtf, 0, sizeof(nmdtf));
1090  if(data->send_pszformat) nmdtf.pszFormat = data->send_pszformat;
1091  nmdtf.pszDisplay = nmdtf.szDisplay;
1092  send_notify(pager, DTN_FORMATW, DTN_FORMATA, (LPARAM)&nmdtf, TRUE);
1093  if (data->return_szdisplay)
1094  ok(!lstrcmpW(nmdtf.szDisplay, data->return_szdisplay), "Sub test %d expect %s, got %s\n", i,
1095  wine_dbgstr_w(data->return_szdisplay), wine_dbgstr_w(nmdtf.szDisplay));
1096  if (data->return_pszdisplay)
1097  ok(!lstrcmpW(nmdtf.pszDisplay, data->return_pszdisplay), "Sub test %d expect %s, got %s\n", i,
1098  wine_dbgstr_w(data->return_pszdisplay), wine_dbgstr_w(nmdtf.pszDisplay));
1099  }
1100 }
1101 
1102 static void test_wm_notify_header(HWND pager)
1103 {
1104  NMHEADERW nmh = {{0}};
1105  HDITEMW hdi = {0};
1106  HD_TEXTFILTERW hdtf = {0};
1107 
1108  hdi.mask = HDI_TEXT | HDI_FILTER;
1109  hdi.pszText = test_w;
1110  hdtf.pszText = test_w;
1111  nmh.pitem = &hdi;
1112  nmh.pitem->pvFilter = &hdtf;
1114  send_notify(pager, HDN_ENDDRAG, HDN_ENDDRAG, (LPARAM)&nmh, TRUE);
1117  send_notify(pager, HDN_DROPDOWN, HDN_DROPDOWN, (LPARAM)&nmh, TRUE);
1129  send_notify(pager, HDN_TRACKW, HDN_TRACKA, (LPARAM)&nmh, TRUE);
1130 }
1131 
1132 static void test_wm_notify_tooltip(HWND pager)
1133 {
1134  NMTTDISPINFOW nmttdi;
1135  const struct notify_test_tooltip *data;
1136  INT i;
1137 
1138  for (i = 0; i < ARRAY_SIZE(test_tooltip_data); i++)
1139  {
1140  data = test_tooltip_data + i;
1142 
1143  memset(&nmttdi, 0, sizeof(nmttdi));
1144  if (data->send_sztext) memcpy(nmttdi.szText, data->send_sztext, data->send_sztext_size);
1145  if (data->send_lpsztext) nmttdi.lpszText = data->send_lpsztext;
1147  if (data->return_sztext)
1148  {
1149  if (data->return_sztext_size == -1)
1150  ok(!lstrcmpW(nmttdi.szText, data->return_sztext), "Sub test %d expect %s, got %s\n", i,
1151  wine_dbgstr_w(data->return_sztext), wine_dbgstr_w(nmttdi.szText));
1152  else
1153  ok(!memcmp(nmttdi.szText, data->return_sztext, data->return_sztext_size), "Wrong szText content\n");
1154  }
1155  if (data->return_lpsztext)
1156  {
1157  if (IS_INTRESOURCE(data->return_lpsztext))
1158  ok(nmttdi.lpszText == data->return_lpsztext, "Sub test %d expect %s, got %s\n", i,
1159  wine_dbgstr_w(data->return_lpsztext), wine_dbgstr_w(nmttdi.lpszText));
1160  else
1161  ok(!lstrcmpW(nmttdi.lpszText, data->return_lpsztext), "Test %d expect %s, got %s\n", i,
1162  wine_dbgstr_w(data->return_lpsztext), wine_dbgstr_w(nmttdi.lpszText));
1163  }
1164  if (data->return_hinst)
1165  ok(nmttdi.hinst == data->return_hinst, "Sub test %d expect %p, got %p\n", i, data->return_hinst,
1166  nmttdi.hinst);
1167  }
1168 }
1169 
1170 static void test_wm_notify(void)
1171 {
1172  static const CHAR *class = "Pager notify class";
1173  HWND parent, pager;
1174  /* Combo Box Ex */
1175  static NMCOMBOBOXEXW nmcbe;
1176  /* Date and Time Picker */
1177  static NMDATETIMEFORMATQUERYW nmdtfq;
1178  static NMDATETIMEWMKEYDOWNW nmdtkd;
1179  static NMDATETIMESTRINGW nmdts;
1180  /* Header */
1181  static NMHDDISPINFOW nmhddi;
1182  /* List View */
1183  static NMLVDISPINFOW nmlvdi;
1184  static NMLVGETINFOTIPW nmlvgit;
1185  static NMLVFINDITEMW nmlvfi;
1186  /* Tool Bar */
1187  static NMTBRESTORE nmtbr;
1188  static NMTBSAVE nmtbs;
1189  static NMTOOLBARW nmtb;
1190  static NMTBDISPINFOW nmtbdi;
1191  static NMTBGETINFOTIPW nmtbgit;
1192  /* Tree View */
1193  static NMTVDISPINFOW nmtvdi;
1194  static NMTVGETINFOTIPW nmtvgit;
1195  static NMTREEVIEWW nmtv;
1196  static const struct generic_text_helper_para paras[] =
1197  {
1198  /* Combo Box Ex */
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  {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1205  /* Date and Time Picker */
1206  {&nmdtfq, sizeof(nmdtfq), NULL, 0, (WCHAR **)&nmdtfq.pszFormat, NULL, DTN_FORMATQUERYW, DTN_FORMATQUERYA,
1207  CONVERT_SEND},
1208  {&nmdtkd, sizeof(nmdtkd), NULL, 0, (WCHAR **)&nmdtkd.pszFormat, NULL, DTN_WMKEYDOWNW, DTN_WMKEYDOWNA,
1209  CONVERT_SEND},
1210  {&nmdts, sizeof(nmdts), NULL, 0, (WCHAR **)&nmdts.pszUserString, NULL, DTN_USERSTRINGW, DTN_USERSTRINGA,
1211  CONVERT_SEND},
1212  /* Header */
1213  {&nmhddi, sizeof(nmhddi), &nmhddi.mask, HDI_TEXT, &nmhddi.pszText, &nmhddi.cchTextMax, HDN_GETDISPINFOW,
1215  /* List View */
1216  {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_STRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL,
1218  {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_SUBSTRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL, LVN_ODFINDITEMW,
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  {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1228  {&nmlvgit, sizeof(nmlvgit), NULL, 0, &nmlvgit.pszText, &nmlvgit.cchTextMax, LVN_GETINFOTIPW, LVN_GETINFOTIPA,
1230  /* Tool Bar */
1231  {&nmtbs, sizeof(nmtbs), NULL, 0, (WCHAR **)&nmtbs.tbButton.iString, NULL, TBN_SAVE, TBN_SAVE,
1233  {&nmtbr, sizeof(nmtbr), NULL, 0, (WCHAR **)&nmtbr.tbButton.iString, NULL, TBN_RESTORE, TBN_RESTORE,
1235  {&nmtbdi, sizeof(nmtbdi), &nmtbdi.dwMask, TBNF_TEXT, &nmtbdi.pszText, &nmtbdi.cchText, TBN_GETDISPINFOW,
1237  {&nmtb, sizeof(nmtb), NULL, 0, &nmtb.pszText, &nmtb.cchText, TBN_GETBUTTONINFOW, TBN_GETBUTTONINFOA,
1239  {&nmtbgit, sizeof(nmtbgit), NULL, 0, &nmtbgit.pszText, &nmtbgit.cchTextMax, TBN_GETINFOTIPW, TBN_GETINFOTIPA,
1241  /* Tree View */
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  {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1250  {&nmtvgit, sizeof(nmtvgit), NULL, 0, &nmtvgit.pszText, &nmtvgit.cchTextMax, TVN_GETINFOTIPW, TVN_GETINFOTIPA,
1252  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1254  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1256  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1258  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1260  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1262  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1264  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1266  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1268  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1270  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1272  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1274  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1276  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1278  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1280  {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1282  {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1284  };
1285  BOOL bret;
1286  INT i;
1287 
1288  bret = register_test_notify_class();
1289  ok(bret, "Register test class failed, error 0x%08x\n", GetLastError());
1290 
1291  parent = CreateWindowA(class, "parent", WS_OVERLAPPED, 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), 0);
1292  ok(parent != NULL, "CreateWindow failed\n");
1293  pager = CreateWindowA(WC_PAGESCROLLERA, "pager", WS_CHILD, 0, 0, 100, 100, parent, 0, GetModuleHandleA(0), 0);
1294  ok(pager != NULL, "CreateWindow failed\n");
1295  child1_wnd = CreateWindowA(class, "child", WS_CHILD, 0, 0, 100, 100, pager, (HMENU)1, GetModuleHandleA(0), 0);
1296  ok(child1_wnd != NULL, "CreateWindow failed\n");
1298 
1299  for (i = 0; i < ARRAY_SIZE(paras); i++)
1300  test_notify_generic_text_helper(pager, paras + i);
1301 
1302  /* Tests for those that can't be covered by generic text test helper */
1304  test_wm_notify_datetime(pager);
1305  test_wm_notify_header(pager);
1306  test_wm_notify_tooltip(pager);
1307 
1310 }
1311 
1312 static void init_functions(void)
1313 {
1314  HMODULE mod = LoadLibraryA("comctl32.dll");
1315 
1316 #define X(f) p##f = (void*)GetProcAddress(mod, #f);
1318 #undef X
1319 
1320  pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410);
1321 }
1322 
1324 {
1325  INITCOMMONCONTROLSEX iccex;
1326 
1327  init_functions();
1328 
1329  iccex.dwSize = sizeof(iccex);
1330  iccex.dwICC = ICC_PAGESCROLLER_CLASS;
1331  pInitCommonControlsEx(&iccex);
1332 
1334 
1336  ok(parent_wnd != NULL, "Failed to create parent window!\n");
1337 
1338  test_pager();
1340  test_wm_notify();
1341 
1343 }
#define CBEN_GETDISPINFOW
Definition: commctrl.h:3874
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define DTN_WMKEYDOWNA
Definition: commctrl.h:4389
#define HDN_GETDISPINFOA
Definition: commctrl.h:849
#define HDN_ITEMSTATEICONCLICK
Definition: commctrl.h:857
#define CBEN_DELETEITEM
Definition: commctrl.h:3869
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:1393
#define LVN_INCREMENTALSEARCHA
Definition: commctrl.h:3159
static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
Definition: pager.c:933
int cchTextMax
Definition: commctrl.h:3317
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3893
#define WC_PAGESCROLLERA
Definition: commctrl.h:4494
Definition: tftpd.h:59
#define TVN_SELCHANGINGW
Definition: commctrl.h:3642
#define TRUE
Definition: types.h:120
START_TEST(pager)
Definition: pager.c:1323
static BOOL(WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX *)
#define TBN_GETINFOTIPA
Definition: commctrl.h:1337
#define HDN_BEGINTRACKA
Definition: commctrl.h:843
TVITEMA itemNew
Definition: commctrl.h:3626
char hdr[14]
Definition: iptest.cpp:33
#define HDN_ITEMCLICKW
Definition: commctrl.h:838
TVITEMW itemOld
Definition: commctrl.h:3633
#define TVN_GETDISPINFOA
Definition: commctrl.h:3650
#define TVN_ITEMEXPANDEDW
Definition: commctrl.h:3698
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:853
INT send_text_max
Definition: pager.c:101
INT return_sztext_size
Definition: pager.c:170
#define HDN_ITEMCHANGINGA
Definition: commctrl.h:833
static void notify_datetime_handler(NMDATETIMEFORMATA *nm)
Definition: pager.c:689
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define DTN_USERSTRINGW
Definition: commctrl.h:4370
#define TVN_BEGINDRAGA
Definition: commctrl.h:3699
UINT handler_id
Definition: pager.c:91
#define TVN_BEGINRDRAGW
Definition: commctrl.h:3702
static LRESULT WINAPI pager_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:374
#define TVN_DELETEITEMA
Definition: commctrl.h:3703
#define PAGER_SEQ_INDEX
Definition: pager.c:28
#define TVN_ITEMEXPANDEDA
Definition: commctrl.h:3697
DWORD dwMask
Definition: commctrl.h:1408
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:3149
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define HDN_ITEMCHANGEDA
Definition: commctrl.h:835
char CHAR
Definition: xmlstorage.h:175
#define WM_GETTEXT
Definition: winuser.h:1600
Definition: msg.h:39
int notify
Definition: msacm.c:1365
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:3097
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
LPWSTR pszText
Definition: commctrl.h:682
#define LVN_SETDISPINFOW
Definition: commctrl.h:3152
static CHAR empty_a[]
Definition: pager.c:38
#define X(f)
LONG top
Definition: windef.h:307
#define LVN_GETDISPINFOW
Definition: commctrl.h:3150
HANDLE HWND
Definition: compat.h:13
static struct notify_test_info notify_test_info
int cbClsExtra
Definition: winuser.h:3140
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:3146
LPWSTR pszText
Definition: commctrl.h:654
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:4579
static WCHAR large_truncated_80_w[80]
Definition: pager.c:53
#define WM_NCHITTEST
Definition: winuser.h:1668
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3899
#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:3145
static BOOL register_child_wnd_class(void)
Definition: pager.c:430
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:306
CHAR * write_sztext
Definition: pager.c:164
UINT mask
Definition: commctrl.h:3312
WCHAR szText[80]
Definition: commctrl.h:1903
char * LPSTR
Definition: xmlstorage.h:182
UINT unicode
Definition: pager.c:83
#define HDI_TEXT
Definition: commctrl.h:700
static const struct message switch_child_seq[]
Definition: pager.c:242
LONG right
Definition: windef.h:308
BOOL WINAPI DestroyWindow(_In_ HWND)
#define PGM_SETCHILD
Definition: commctrl.h:4512
LPWSTR pszText
Definition: commctrl.h:3316
#define HDN_ITEMCHANGINGW
Definition: commctrl.h:834
INT send_sztext_size
Definition: pager.c:177
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4291
int32_t INT
Definition: typedefs.h:56
LPWSTR pszText
Definition: commctrl.h:897
static HWND child
Definition: cursoricon.c:298
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
LPWSTR pszText
Definition: commctrl.h:1412
#define CBEN_GETDISPINFOA
Definition: commctrl.h:3867
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:67
TVITEMA item
Definition: commctrl.h:3663
static CHAR test_a[]
Definition: pager.c:34
#define HDN_OVERFLOWCLICK
Definition: commctrl.h:860
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:3855
#define TVN_SELCHANGEDA
Definition: commctrl.h:3643
#define LVIF_TEXT
Definition: commctrl.h:2305
int cchTextMax
Definition: commctrl.h:2362
UINT code
Definition: winuser.h:3134
#define WM_NCPAINT
Definition: winuser.h:1669
#define TVN_ENDLABELEDITW
Definition: commctrl.h:3708
#define PGN_CALCSIZE
Definition: commctrl.h:4576
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
static const struct notify_test_datetime_format test_datetime_format_data[]
int cbWndExtra
Definition: winuser.h:3141
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3918
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:1102
static void test_wm_notify_tooltip(HWND pager)
Definition: pager.c:1132
#define TBN_GETBUTTONINFOA
Definition: commctrl.h:1302
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define TVN_GETINFOTIPA
Definition: commctrl.h:3710
DWORD flags
Definition: pager.c:93
WCHAR * return_lpsztext
Definition: pager.c:171
#define PGM_SETPOS
Definition: commctrl.h:4533
COMBOBOXEXITEMW ceItem
Definition: commctrl.h:3860
#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:3782
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:3152
LPSTR pszText
Definition: commctrl.h:1439
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: pager.c:222
#define DTN_FORMATA
Definition: commctrl.h:4409
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4290
#define HDN_GETDISPINFOW
Definition: commctrl.h:850
HCURSOR hCursor
Definition: winuser.h:3144
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:665
#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:4578
static void test_wm_notify_datetime(HWND pager)
Definition: pager.c:1078
LPCWSTR lpszClassName
Definition: winuser.h:3160
LONG_PTR LPARAM
Definition: windef.h:208
#define TTN_GETDISPINFOA
Definition: commctrl.h:1868
void * return_text
Definition: pager.c:118
static void notify_tooltip_handler(NMTTDISPINFOA *nm)
Definition: pager.c:676
#define PGS_HORZ
Definition: commctrl.h:4499
#define TVN_ITEMEXPANDINGW
Definition: commctrl.h:3696
DWORD dwFlag
Definition: commctrl.h:4583
static void test_wm_notify(void)
Definition: pager.c:1170
const char * LPCSTR
Definition: xmlstorage.h:183
#define CBEN_DRAGBEGINA
Definition: commctrl.h:3876
INT_PTR iString
Definition: commctrl.h:955
#define TVN_SELCHANGEDW
Definition: commctrl.h:3644
#define LVN_GETINFOTIPW
Definition: commctrl.h:3219
CHAR * write_text
Definition: pager.c:114
#define WC_PAGESCROLLERW
Definition: commctrl.h:4493
Definition: msg.h:41
static BOOL register_test_notify_class(void)
Definition: pager.c:923
#define HDN_ITEMDBLCLICKW
Definition: commctrl.h:840
UINT sub_test_id
Definition: pager.c:90
#define TBN_GETBUTTONINFOW
Definition: commctrl.h:1339
#define TVN_DELETEITEMW
Definition: commctrl.h:3704
static WCHAR buffer[64]
Definition: pager.c:60
#define LVN_BEGINLABELEDITW
Definition: commctrl.h:3132
#define CBEN_ENDEDITA
Definition: commctrl.h:3871
#define CBEN_ENDEDITW
Definition: commctrl.h:3872
#define GetWindowLongPtrA
Definition: winuser.h:4803
TBBUTTON tbButton
Definition: commctrl.h:1369
static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:701
TVITEMW itemNew
Definition: commctrl.h:3634
#define LVN_ODFINDITEMW
Definition: commctrl.h:3141
BOOL received
Definition: pager.c:88
HDITEMW * pitem
Definition: commctrl.h:887
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:2344
r parent
Definition: btrfs.c:2869
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define TVN_SETDISPINFOW
Definition: commctrl.h:3653
__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:3707
static CHAR large_a[]
Definition: pager.c:39
#define HDN_ENDTRACKA
Definition: commctrl.h:845
#define HDN_TRACKW
Definition: commctrl.h:848
LPWSTR pszText
Definition: commctrl.h:2361
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define HDN_ITEMCLICKA
Definition: commctrl.h:837
#define NF_REQUERY
Definition: winuser.h:2436
void * expect_text
Definition: pager.c:103
WCHAR szDisplay[64]
Definition: commctrl.h:4424
#define WINAPI
Definition: msvc.h:8
#define ok_sequence(seq, index, exp, contx, todo)
Definition: msg.h:387
LPCWSTR psz
Definition: commctrl.h:2453
const char * wine_dbgstr_rect(const RECT *rect)
#define DTN_FORMATW
Definition: commctrl.h:4410
unsigned long DWORD
Definition: ntddk_ex.h:95
#define HDN_BEGINFILTEREDIT
Definition: commctrl.h:855
#define TBN_GETINFOTIPW
Definition: commctrl.h:1338
#define LVFI_SUBSTRING
Definition: commctrl.h:2434
HDITEMA * pitem
Definition: commctrl.h:880
handler_ids
Definition: pager.c:75
LPWSTR pszText
Definition: commctrl.h:1448
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:846
static void test_notify_generic_text_helper(HWND pager, const struct generic_text_helper_para *para)
Definition: pager.c:954
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define DTN_USERSTRINGA
Definition: commctrl.h:4369
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:3140
static DWORD_PTR
Definition: pager.c:220
#define WM_PAINT
Definition: winuser.h:1602
UINT mask
Definition: commctrl.h:2356
#define CCS_NORESIZE
Definition: commctrl.h:2241
#define TVN_SELCHANGINGA
Definition: commctrl.h:3641
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:690
static WCHAR large_w[]
Definition: pager.c:40
#define TBN_SAVE
Definition: commctrl.h:1341
int cchTextMax
Definition: commctrl.h:2345
static void test_wm_notify_comboboxex(HWND pager)
Definition: pager.c:1060
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:847
#define SetWindowLongPtrA
Definition: winuser.h:5320
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:614
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:856
LPCSTR lpszClassName
Definition: winuser.h:3147
HWND hwndFrom
Definition: winuser.h:3132
#define TVN_SINGLEEXPAND
Definition: commctrl.h:3712
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define TVN_BEGINDRAGW
Definition: commctrl.h:3700
#define TVN_BEGINLABELEDITW
Definition: commctrl.h:3706
#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:3138
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
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:859
HWND WINAPI GetParent(_In_ HWND)
#define CBEN_DRAGBEGINW
Definition: commctrl.h:3877
#define HDN_ENDDRAG
Definition: commctrl.h:852
#define WS_BORDER
Definition: pedump.c:625
#define HDN_DIVIDERDBLCLICKA
Definition: commctrl.h:841
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define TVN_GETDISPINFOW
Definition: commctrl.h:3651
static SUBCLASSPROC
Definition: pager.c:220
static WCHAR test_w[]
Definition: pager.c:33
#define DTN_FORMATQUERYW
Definition: commctrl.h:4432
HINSTANCE hInstance
Definition: winuser.h:3142
HWND hwnd_from
Definition: pager.c:86
#define TVIF_TEXT
Definition: commctrl.h:3262
#define add_message(msg)
Definition: msg.c:2113
#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:1340
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ok(value,...)
Definition: atltest.h:57
#define LVN_ENDLABELEDITW
Definition: commctrl.h:3134
#define LVN_ENDLABELEDITA
Definition: commctrl.h:3133
#define HDN_BEGINDRAG
Definition: commctrl.h:851
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define HDN_ITEMKEYDOWN
Definition: commctrl.h:858
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define TVN_GETINFOTIPW
Definition: commctrl.h:3711
#define CBEN_INSERTITEM
Definition: commctrl.h:3868
unsigned int UINT
Definition: ndis.h:50
#define LVN_BEGINLABELEDITA
Definition: commctrl.h:3131
static INT notify_format
Definition: pager.c:31
#define HDN_BEGINTRACKW
Definition: commctrl.h:844
char szText[80]
Definition: commctrl.h:1894
#define LVN_SETDISPINFOA
Definition: commctrl.h:3151
TBBUTTON tbButton
Definition: commctrl.h:1358
#define HDN_DIVIDERDBLCLICKW
Definition: commctrl.h:842
#define WM_DEVICECHANGE
Definition: winuser.h:1793
#define NFR_ANSI
Definition: winuser.h:2433
int cchTextMax
Definition: commctrl.h:3304
WNDPROC lpfnWndProc
Definition: winuser.h:3139
static HWND parent_wnd
Definition: pager.c:30
static HWND child2_wnd
Definition: pager.c:30
#define HDI_FILTER
Definition: commctrl.h:707
#define TVN_SETDISPINFOA
Definition: commctrl.h:3652
static CHAR te_a[]
Definition: pager.c:36
HINSTANCE hInstance
Definition: winuser.h:3155
#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:680
#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:2433
LVFINDINFOA lvfi
Definition: commctrl.h:3091
void * pvFilter
Definition: commctrl.h:673
const WCHAR * class
Definition: main.c:68
TVITEMW item
Definition: commctrl.h:3668
#define TVN_BEGINLABELEDITA
Definition: commctrl.h:3705
LVITEMW item
Definition: commctrl.h:3175
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:604
LONG bottom
Definition: windef.h:309
#define TVN_BEGINRDRAGA
Definition: commctrl.h:3701
#define DTN_WMKEYDOWNW
Definition: commctrl.h:4390
#define GetProcAddress(x, y)
Definition: compat.h:418
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
TVITEMA itemOld
Definition: commctrl.h:3625
#define DTN_FORMATQUERYA
Definition: commctrl.h:4431
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
static void init_functions(void)
Definition: pager.c:1312
#define TTN_GETDISPINFOW
Definition: commctrl.h:1869
#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:3160
#define TBN_GETDISPINFOW
Definition: commctrl.h:1336
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:839
#define LVN_GETINFOTIPA
Definition: commctrl.h:3218
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:3910
LPARAM lParam
Definition: combotst.c:139
LPSTR pszText
Definition: commctrl.h:3303
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:1895
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:836
static const struct notify_test_send test_dont_convert_send_data[]
Definition: pager.c:141
#define TVN_ITEMEXPANDINGA
Definition: commctrl.h:3695
static int mod
Definition: i386-dis.c:1273
HICON hIcon
Definition: winuser.h:3143
static const struct message set_pos_empty_seq[]
Definition: pager.c:280
LVITEMA item
Definition: commctrl.h:3170