ReactOS 0.4.15-dev-7961-gdcf9eb0
pager.c
Go to the documentation of this file.
1/*
2 * Unit tests for the pager control
3 *
4 * Copyright 2012 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <windows.h>
22#include <commctrl.h>
23
24#include "wine/test.h"
25#include "msg.h"
26
27#define NUM_MSG_SEQUENCES 1
28#define PAGER_SEQ_INDEX 0
29
33static WCHAR test_w[] = {'t', 'e', 's', 't', 0};
34static CHAR test_a[] = {'t', 'e', 's', 't', 0};
35/* Double zero so that it's safe to cast it to WCHAR * */
36static CHAR te_a[] = {'t', 'e', 0, 0};
37static WCHAR empty_w[] = {0};
38static CHAR empty_a[] = {0};
39static CHAR large_a[] = "You should have received a copy of the GNU Lesser General Public License along with this ...";
40static 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};
60static WCHAR buffer[64];
61
62/* Text field conversion test behavior flags. */
64{
72 ZERO_SEND = 0x80
73};
74
76{
79};
80
81static 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 */
104};
105
107{
108 /* Data sent to pager */
112 /* Data for parent to write */
117 /* Data when message returned */
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
161static 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 */
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},
192
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}
215
216#define CHILD1_ID 1
217#define CHILD2_ID 2
218
219static BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*);
220static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
221
223
224static 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 },
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. */
242static 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 },
252 { WM_SIZE, sent|id|defwinproc, 0, 0, CHILD2_ID },
253 { 0 }
254};
255
256static 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. */
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
280static const struct message set_pos_empty_seq[] = {
281 { PGM_SETPOS, sent },
282 { 0 }
283};
284
285static 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 &&
303 message != WM_NCPAINT &&
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;
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;
436 cls.cbClsExtra = 0;
437 cls.cbWndExtra = 0;
439 cls.hIcon = 0;
442 cls.lpszMenuName = NULL;
443 cls.lpszClassName = "Pager test child class";
444 return RegisterClassA(&cls);
445}
446
447static void test_pager(void)
448{
449 HWND pager;
450 RECT rect, rect2;
451
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",
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",
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
557static 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");
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
614static 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
620 {
621 case 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,
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 }
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 }
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:
781 case HDN_DROPDOWN:
782 case HDN_FILTERCHANGE:
783 case HDN_ITEMKEYDOWN:
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:
799 case HDN_ITEMCLICKA:
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;
813 break;
814 }
815 /* List View */
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 }
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 */
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:
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
933static 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 */
955{
956 const struct notify_test_send *send_data;
957 const struct notify_test_receive *receive_data;
959 INT i;
960
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
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
1102static 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;
1129 send_notify(pager, HDN_TRACKW, HDN_TRACKA, (LPARAM)&nmh, TRUE);
1130}
1131
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 {
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
1170static 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,
1200 CBEN_INSERTITEM, CBEN_INSERTITEM, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1201 {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1202 CBEN_DELETEITEM, CBEN_DELETEITEM, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1203 {&nmcbe, sizeof(nmcbe), &nmcbe.ceItem.mask, CBEIF_TEXT, &nmcbe.ceItem.pszText, &nmcbe.ceItem.cchTextMax,
1204 CBEN_GETDISPINFOW, CBEN_GETDISPINFOA, ZERO_SEND | SET_NULL_IF_NO_MASK | DONT_CONVERT_SEND | CONVERT_RECEIVE},
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,
1214 HDN_GETDISPINFOA, SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE},
1215 /* List View */
1216 {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_STRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL,
1217 LVN_INCREMENTALSEARCHW, LVN_INCREMENTALSEARCHA, CONVERT_SEND},
1218 {&nmlvfi, sizeof(nmlvfi), &nmlvfi.lvfi.flags, LVFI_SUBSTRING, (WCHAR **)&nmlvfi.lvfi.psz, NULL, LVN_ODFINDITEMW,
1219 LVN_ODFINDITEMA, CONVERT_SEND},
1220 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1221 LVN_BEGINLABELEDITW, LVN_BEGINLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1222 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1223 LVN_ENDLABELEDITW, LVN_ENDLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1224 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1225 LVN_GETDISPINFOW, LVN_GETDISPINFOA, DONT_CONVERT_SEND | CONVERT_RECEIVE},
1226 {&nmlvdi, sizeof(nmlvdi), &nmlvdi.item.mask, LVIF_TEXT, &nmlvdi.item.pszText, &nmlvdi.item.cchTextMax,
1227 LVN_SETDISPINFOW, LVN_SETDISPINFOA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1228 {&nmlvgit, sizeof(nmlvgit), NULL, 0, &nmlvgit.pszText, &nmlvgit.cchTextMax, LVN_GETINFOTIPW, LVN_GETINFOTIPA,
1229 CONVERT_SEND | CONVERT_RECEIVE},
1230 /* Tool Bar */
1231 {&nmtbs, sizeof(nmtbs), NULL, 0, (WCHAR **)&nmtbs.tbButton.iString, NULL, TBN_SAVE, TBN_SAVE,
1232 DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1233 {&nmtbr, sizeof(nmtbr), NULL, 0, (WCHAR **)&nmtbr.tbButton.iString, NULL, TBN_RESTORE, TBN_RESTORE,
1234 DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1235 {&nmtbdi, sizeof(nmtbdi), &nmtbdi.dwMask, TBNF_TEXT, &nmtbdi.pszText, &nmtbdi.cchText, TBN_GETDISPINFOW,
1236 TBN_GETDISPINFOW, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE},
1237 {&nmtb, sizeof(nmtb), NULL, 0, &nmtb.pszText, &nmtb.cchText, TBN_GETBUTTONINFOW, TBN_GETBUTTONINFOA,
1238 SEND_EMPTY_IF_NULL | CONVERT_SEND | CONVERT_RECEIVE},
1239 {&nmtbgit, sizeof(nmtbgit), NULL, 0, &nmtbgit.pszText, &nmtbgit.cchTextMax, TBN_GETINFOTIPW, TBN_GETINFOTIPA,
1240 DONT_CONVERT_SEND | CONVERT_RECEIVE},
1241 /* Tree View */
1242 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1243 TVN_BEGINLABELEDITW, TVN_BEGINLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1244 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1245 TVN_ENDLABELEDITW, TVN_ENDLABELEDITA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1246 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1247 TVN_GETDISPINFOW, TVN_GETDISPINFOA, ZERO_SEND | DONT_CONVERT_SEND| CONVERT_RECEIVE},
1248 {&nmtvdi, sizeof(nmtvdi), &nmtvdi.item.mask, TVIF_TEXT, &nmtvdi.item.pszText, &nmtvdi.item.cchTextMax,
1249 TVN_SETDISPINFOW, TVN_SETDISPINFOA, SET_NULL_IF_NO_MASK | CONVERT_SEND | CONVERT_RECEIVE},
1250 {&nmtvgit, sizeof(nmtvgit), NULL, 0, &nmtvgit.pszText, &nmtvgit.cchTextMax, TVN_GETINFOTIPW, TVN_GETINFOTIPA,
1251 DONT_CONVERT_SEND | CONVERT_RECEIVE},
1252 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1253 TVN_SINGLEEXPAND, TVN_SINGLEEXPAND, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE, TVITEM_NEW_HANDLER},
1254 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1255 TVN_SINGLEEXPAND, TVN_SINGLEEXPAND, DONT_CONVERT_SEND | DONT_CONVERT_RECEIVE, TVITEM_OLD_HANDLER},
1256 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1257 TVN_BEGINDRAGW, TVN_BEGINDRAGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1258 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1259 TVN_BEGINDRAGW, TVN_BEGINDRAGA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1260 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1261 TVN_BEGINRDRAGW, TVN_BEGINRDRAGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1262 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1263 TVN_BEGINRDRAGW, TVN_BEGINRDRAGA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1264 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1265 TVN_ITEMEXPANDEDW, TVN_ITEMEXPANDEDA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1266 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1267 TVN_ITEMEXPANDEDW, TVN_ITEMEXPANDEDA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1268 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1269 TVN_ITEMEXPANDINGW, TVN_ITEMEXPANDINGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1270 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1271 TVN_ITEMEXPANDINGW, TVN_ITEMEXPANDINGA, DONT_CONVERT_SEND, TVITEM_OLD_HANDLER},
1272 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1273 TVN_DELETEITEMW, TVN_DELETEITEMA, DONT_CONVERT_SEND, TVITEM_NEW_HANDLER},
1274 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1275 TVN_DELETEITEMW, TVN_DELETEITEMA, CONVERT_SEND, TVITEM_OLD_HANDLER},
1276 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1277 TVN_SELCHANGINGW, TVN_SELCHANGINGA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1278 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1279 TVN_SELCHANGINGW, TVN_SELCHANGINGA, CONVERT_SEND, TVITEM_OLD_HANDLER},
1280 {&nmtv, sizeof(nmtv), &nmtv.itemNew.mask, TVIF_TEXT, &nmtv.itemNew.pszText, &nmtv.itemNew.cchTextMax,
1281 TVN_SELCHANGEDW, TVN_SELCHANGEDA, CONVERT_SEND, TVITEM_NEW_HANDLER},
1282 {&nmtv, sizeof(nmtv), &nmtv.itemOld.mask, TVIF_TEXT, &nmtv.itemOld.pszText, &nmtv.itemOld.cchTextMax,
1283 TVN_SELCHANGEDW, TVN_SELCHANGEDA, CONVERT_SEND, TVITEM_OLD_HANDLER}
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");
1297 SendMessageW(pager, PGM_SETCHILD, 0, (LPARAM)child1_wnd);
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 */
1303 test_wm_notify_comboboxex(pager);
1304 test_wm_notify_datetime(pager);
1305 test_wm_notify_header(pager);
1306 test_wm_notify_tooltip(pager);
1307
1308 DestroyWindow(parent);
1309 UnregisterClassA(class, GetModuleHandleA(NULL));
1310}
1311
1312static void init_functions(void)
1313{
1314 HMODULE mod = LoadLibraryA("comctl32.dll");
1315
1316#define X(f) p##f = (void*)GetProcAddress(mod, #f);
1317 X(InitCommonControlsEx);
1318#undef X
1319
1320 pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410);
1321}
1322
1323START_TEST(pager)
1324{
1325 INITCOMMONCONTROLSEX iccex;
1326
1327 init_functions();
1328
1329 iccex.dwSize = sizeof(iccex);
1330 iccex.dwICC = ICC_PAGESCROLLER_CLASS;
1331 pInitCommonControlsEx(&iccex);
1332
1333 init_msg_sequences(sequences, NUM_MSG_SEQUENCES);
1334
1335 parent_wnd = create_parent_window();
1336 ok(parent_wnd != NULL, "Failed to create parent window!\n");
1337
1338 test_pager();
1339 test_wm_notifyformat();
1340 test_wm_notify();
1341
1342 DestroyWindow(parent_wnd);
1343}
@ sent
Definition: SystemMenu.c:27
@ defwinproc
Definition: SystemMenu.c:32
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
@ optional
Definition: SystemMenu.c:34
#define add_message(msg)
Definition: SystemMenu.c:98
#define ok_sequence(exp, contx, todo)
Definition: SystemMenu.c:275
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
Arabic default style
Definition: afstyles.h:94
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define msg(x)
Definition: auth_time.c:54
const WCHAR * class
Definition: main.c:68
#define ARRAY_SIZE(A)
Definition: main.h:33
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const struct pixel_format_desc formats[]
Definition: util.c:59
HANDLE HWND
Definition: compat.h:19
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
const WCHAR * text
Definition: package.c:1799
r parent
Definition: btrfs.c:3010
RECT rect2
Definition: edittest.c:51
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
GLenum GLsizei len
Definition: glext.h:6722
GLuint id
Definition: glext.h:5910
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
char hdr[14]
Definition: iptest.cpp:33
#define wine_dbgstr_w
Definition: kernel32.h:34
if(dx< 0)
Definition: linetemp.h:194
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define error(str)
Definition: mkdosfs.c:1605
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static LRESULT WINAPI test_notifyformat_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:525
static CHAR empty_a[]
Definition: pager.c:38
static WCHAR large_truncated_80_w[80]
Definition: pager.c:53
static HWND create_parent_window(void)
Definition: pager.c:364
static void test_wm_notify_tooltip(HWND pager)
Definition: pager.c:1132
static CHAR test_a[]
Definition: pager.c:34
static void test_wm_notify_header(HWND pager)
Definition: pager.c:1102
#define CHILD1_ID
Definition: pager.c:216
static void notify_generic_text_handler(CHAR **text, INT *text_max)
Definition: pager.c:614
#define NUM_MSG_SEQUENCES
Definition: pager.c:27
static const struct notify_test_send test_convert_send_data[]
Definition: pager.c:136
static HWND child2_wnd
Definition: pager.c:30
static BOOL register_parent_wnd_class(void)
Definition: pager.c:347
static const struct notify_test_receive test_convert_receive_data[]
Definition: pager.c:146
static void test_wm_notifyformat(void)
Definition: pager.c:557
static BOOL register_notifyformat_class(void)
Definition: pager.c:545
handler_ids
Definition: pager.c:76
@ TVITEM_NEW_HANDLER
Definition: pager.c:77
@ TVITEM_OLD_HANDLER
Definition: pager.c:78
static const struct message set_child_seq[]
Definition: pager.c:224
static const struct notify_test_receive test_dont_convert_receive_data[]
Definition: pager.c:155
static BOOL notify_query_received
Definition: pager.c:32
static SUBCLASSPROC
Definition: pager.c:220
static LRESULT WINAPI pager_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:374
static WCHAR test_w[]
Definition: pager.c:33
static DWORD_PTR
Definition: pager.c:220
static CHAR large_a[]
Definition: pager.c:39
static BOOL register_test_notify_class(void)
Definition: pager.c:923
static void test_wm_notify(void)
Definition: pager.c:1170
static LRESULT WINAPI test_notify_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:701
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:293
static const struct message set_pos_seq[]
Definition: pager.c:256
static void notify_tooltip_handler(NMTTDISPINFOA *nm)
Definition: pager.c:676
static CHAR te_a[]
Definition: pager.c:36
static const struct notify_test_send test_dont_convert_send_data[]
Definition: pager.c:141
#define PAGER_SEQ_INDEX
Definition: pager.c:28
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: pager.c:222
static HWND child1_wnd
Definition: pager.c:30
static WCHAR buffer[64]
Definition: pager.c:60
static WCHAR large_w[]
Definition: pager.c:40
static HWND parent_wnd
Definition: pager.c:30
static LRESULT WINAPI child_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: pager.c:401
static const struct message switch_child_seq[]
Definition: pager.c:242
static CHAR * heap_strdup(const CHAR *str)
Definition: pager.c:285
static void notify_datetime_handler(NMDATETIMEFORMATA *nm)
Definition: pager.c:689
static const struct notify_test_datetime_format test_datetime_format_data[]
static void send_notify(HWND pager, UINT unicode, UINT ansi, LPARAM lParam, BOOL code_change)
Definition: pager.c:933
static WCHAR empty_w[]
Definition: pager.c:37
#define CHILD2_ID
Definition: pager.c:217
static UINT_PTR
Definition: pager.c:220
static void test_pager(void)
Definition: pager.c:447
static WCHAR large_truncated_65_w[65]
Definition: pager.c:47
static HWND create_pager_control(DWORD style)
Definition: pager.c:387
static const struct notify_test_tooltip test_tooltip_data[]
static BOOL register_child_wnd_class(void)
Definition: pager.c:430
static void test_wm_notify_datetime(HWND pager)
Definition: pager.c:1078
static INT notify_format
Definition: pager.c:31
static void test_wm_notify_comboboxex(HWND pager)
Definition: pager.c:1060
static const struct message set_pos_empty_seq[]
Definition: pager.c:280
static void test_notify_generic_text_helper(HWND pager, const struct generic_text_helper_para *para)
Definition: pager.c:954
test_conversion_flags
Definition: pager.c:64
@ CONVERT_RECEIVE
Definition: pager.c:67
@ ZERO_SEND
Definition: pager.c:72
@ DONT_SEND_EMPTY_IF_NULL
Definition: pager.c:70
@ SEND_EMPTY_IF_NULL
Definition: pager.c:69
@ SET_NULL_IF_NO_MASK
Definition: pager.c:71
@ CONVERT_SEND
Definition: pager.c:65
@ DONT_CONVERT_RECEIVE
Definition: pager.c:68
@ DONT_CONVERT_SEND
Definition: pager.c:66
static IHTMLWindow2 * window
Definition: events.c:77
static const struct access_res create[16]
Definition: package.c:7644
static HWND child
Definition: cursoricon.c:298
int notify
Definition: msacm.c:1366
static UINT array_size
Definition: msctf.c:67
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPED
Definition: pedump.c:615
#define WS_BORDER
Definition: pedump.c:625
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define TVN_ENDLABELEDITA
Definition: commctrl.h:3711
#define TTN_GETDISPINFOA
Definition: commctrl.h:1872
#define LVN_GETDISPINFOA
Definition: commctrl.h:3153
#define PGM_SETPOS
Definition: commctrl.h:4537
#define HDI_TEXT
Definition: commctrl.h:704
#define HDN_ITEMDBLCLICKA
Definition: commctrl.h:843
#define HDN_DROPDOWN
Definition: commctrl.h:863
#define HDN_BEGINTRACKA
Definition: commctrl.h:847
#define TVN_ITEMEXPANDINGA
Definition: commctrl.h:3699
#define TTN_GETDISPINFOW
Definition: commctrl.h:1873
#define HDN_ITEMCHANGEDW
Definition: commctrl.h:840
#define WC_PAGESCROLLERA
Definition: commctrl.h:4498
#define CBEN_ENDEDITW
Definition: commctrl.h:3876
#define TVN_BEGINLABELEDITA
Definition: commctrl.h:3709
#define TBN_SAVE
Definition: commctrl.h:1345
#define LVN_GETINFOTIPA
Definition: commctrl.h:3222
#define HDN_ITEMKEYDOWN
Definition: commctrl.h:862
#define CBEN_DRAGBEGINA
Definition: commctrl.h:3880
#define DTN_USERSTRINGA
Definition: commctrl.h:4373
#define HDN_OVERFLOWCLICK
Definition: commctrl.h:864
#define PGM_SETCHILD
Definition: commctrl.h:4516
#define TVN_BEGINRDRAGA
Definition: commctrl.h:3705
#define CBEN_ENDEDITA
Definition: commctrl.h:3875
#define HDN_BEGINDRAG
Definition: commctrl.h:855
#define HDN_ENDTRACKW
Definition: commctrl.h:850
#define TBN_GETDISPINFOW
Definition: commctrl.h:1340
#define PGN_CALCSIZE
Definition: commctrl.h:4580
#define HDN_ITEMSTATEICONCLICK
Definition: commctrl.h:861
#define TVN_ITEMEXPANDEDA
Definition: commctrl.h:3701
#define LVN_INCREMENTALSEARCHA
Definition: commctrl.h:3163
#define HDN_ITEMCHANGINGA
Definition: commctrl.h:837
#define LVN_BEGINLABELEDITA
Definition: commctrl.h:3135
#define HDN_ITEMCLICKA
Definition: commctrl.h:841
#define CBEN_GETDISPINFOA
Definition: commctrl.h:3871
#define HDN_ENDTRACKA
Definition: commctrl.h:849
#define HDN_ITEMDBLCLICKW
Definition: commctrl.h:844
#define DTN_WMKEYDOWNA
Definition: commctrl.h:4393
#define TVN_SELCHANGINGA
Definition: commctrl.h:3645
#define HDN_TRACKW
Definition: commctrl.h:852
#define HDN_ENDDRAG
Definition: commctrl.h:856
#define DTN_FORMATW
Definition: commctrl.h:4414
#define LVN_SETDISPINFOA
Definition: commctrl.h:3155
#define HDN_FILTERCHANGE
Definition: commctrl.h:857
#define HDN_ITEMCHANGINGW
Definition: commctrl.h:838
#define LVN_ENDLABELEDITA
Definition: commctrl.h:3137
#define TVN_DELETEITEMA
Definition: commctrl.h:3707
#define TBN_GETBUTTONINFOA
Definition: commctrl.h:1306
#define HDN_GETDISPINFOA
Definition: commctrl.h:853
#define TBN_GETINFOTIPA
Definition: commctrl.h:1341
#define HDN_ENDFILTEREDIT
Definition: commctrl.h:860
#define HDN_GETDISPINFOW
Definition: commctrl.h:854
#define CBEN_DELETEITEM
Definition: commctrl.h:3873
#define HDN_DIVIDERDBLCLICKW
Definition: commctrl.h:846
#define TVN_BEGINDRAGA
Definition: commctrl.h:3703
#define WC_PAGESCROLLERW
Definition: commctrl.h:4497
#define TVN_GETDISPINFOA
Definition: commctrl.h:3654
#define LVN_ODFINDITEMA
Definition: commctrl.h:3144
#define HDN_BEGINTRACKW
Definition: commctrl.h:848
#define HDI_FILTER
Definition: commctrl.h:711
#define CBEN_INSERTITEM
Definition: commctrl.h:3872
#define CCS_NORESIZE
Definition: commctrl.h:2245
#define PGF_CALCWIDTH
Definition: commctrl.h:4582
#define DTN_FORMATQUERYA
Definition: commctrl.h:4435
#define PGF_CALCHEIGHT
Definition: commctrl.h:4583
#define DTN_FORMATA
Definition: commctrl.h:4413
#define HDN_TRACKA
Definition: commctrl.h:851
#define TVN_SELCHANGEDA
Definition: commctrl.h:3647
#define HDN_ITEMCHANGEDA
Definition: commctrl.h:839
#define TVN_SETDISPINFOA
Definition: commctrl.h:3656
#define PGS_HORZ
Definition: commctrl.h:4503
#define HDN_ITEMCLICKW
Definition: commctrl.h:842
#define HDN_DIVIDERDBLCLICKA
Definition: commctrl.h:845
#define TBN_RESTORE
Definition: commctrl.h:1344
#define HDN_BEGINFILTEREDIT
Definition: commctrl.h:859
#define TVN_SINGLEEXPAND
Definition: commctrl.h:3716
#define TVN_GETINFOTIPA
Definition: commctrl.h:3714
#define CBEN_DRAGBEGINW
Definition: commctrl.h:3881
#define WM_NOTIFY
Definition: richedit.h:61
#define test
Definition: rosglue.h:37
const WCHAR * str
static int receive_data(SOCKET sock, SecBuffer *buf)
Definition: schannel.c:604
@ Failed
Definition: arc.h:79
#define memset(x, y, z)
Definition: compat.h:39
& rect
Definition: startmenu.cpp:1413
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3903
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3897
char szText[CBEMAXSTRLEN]
Definition: commctrl.h:3922
WCHAR szText[CBEMAXSTRLEN]
Definition: commctrl.h:3914
COMBOBOXEXITEMA ceItem
Definition: commctrl.h:3859
COMBOBOXEXITEMW ceItem
Definition: commctrl.h:3864
DWORD dwFlag
Definition: commctrl.h:4587
LPWSTR pszText
Definition: commctrl.h:1416
LPSTR pszText
Definition: commctrl.h:669
void * pvFilter
Definition: commctrl.h:677
UINT mask
Definition: commctrl.h:684
LPWSTR pszText
Definition: commctrl.h:686
void * pvFilter
Definition: commctrl.h:694
LPWSTR pszText
Definition: commctrl.h:658
INT_PTR iString
Definition: commctrl.h:959
HBRUSH hbrBackground
Definition: winuser.h:3170
HICON hIcon
Definition: winuser.h:3168
HINSTANCE hInstance
Definition: winuser.h:3167
HCURSOR hCursor
Definition: winuser.h:3169
int cbWndExtra
Definition: winuser.h:3166
UINT style
Definition: winuser.h:3163
LPCSTR lpszMenuName
Definition: winuser.h:3171
LPCSTR lpszClassName
Definition: winuser.h:3172
WNDPROC lpfnWndProc
Definition: winuser.h:3164
int cbClsExtra
Definition: winuser.h:3165
LPCWSTR lpszClassName
Definition: winuser.h:3185
HINSTANCE hInstance
Definition: winuser.h:3180
WNDPROC lpfnWndProc
Definition: winuser.h:3177
Definition: tftpd.h:60
UINT message
Definition: SystemMenu.c:42
UINT handler_id
Definition: pager.c:91
HWND hwnd_from
Definition: pager.c:86
UINT sub_test_id
Definition: pager.c:90
DWORD flags
Definition: pager.c:93
UINT test_id
Definition: pager.c:89
BOOL received
Definition: pager.c:88
UINT_PTR id_from
Definition: pager.c:85
UINT unicode
Definition: pager.c:83
CHAR * write_pointer
Definition: pager.c:113
CHAR * write_text
Definition: pager.c:114
WCHAR * send_text
Definition: pager.c:109
void * return_text
Definition: pager.c:118
void * expect_text
Definition: pager.c:103
WCHAR * send_text
Definition: pager.c:99
INT send_text_size
Definition: pager.c:100
INT send_text_max
Definition: pager.c:101
WCHAR * send_sztext
Definition: pager.c:176
INT write_sztext_size
Definition: pager.c:165
HMODULE write_hinst
Definition: pager.c:167
INT return_sztext_size
Definition: pager.c:170
CHAR * expect_sztext
Definition: pager.c:174
WCHAR * send_lpsztext
Definition: pager.c:178
CHAR * write_sztext
Definition: pager.c:164
INT send_sztext_size
Definition: pager.c:177
WCHAR * return_sztext
Definition: pager.c:169
HMODULE return_hinst
Definition: pager.c:172
WCHAR * return_lpsztext
Definition: pager.c:171
CHAR * write_lpsztext
Definition: pager.c:166
LVITEMA item
Definition: commctrl.h:3174
int cchTextMax
Definition: commctrl.h:2349
LPSTR pszText
Definition: commctrl.h:2348
WCHAR szDisplay[64]
Definition: commctrl.h:4428
UINT code
Definition: winuser.h:3159
HWND hwndFrom
Definition: winuser.h:3157
HDITEMA * pitem
Definition: commctrl.h:884
HDITEMW * pitem
Definition: commctrl.h:891
LVFINDINFOA lvfi
Definition: commctrl.h:3095
TBBUTTON tbButton
Definition: commctrl.h:1373
TBBUTTON tbButton
Definition: commctrl.h:1362
LPSTR pszText
Definition: commctrl.h:1443
TVITEMA itemOld
Definition: commctrl.h:3629
TVITEMA itemNew
Definition: commctrl.h:3630
char szText[80]
Definition: commctrl.h:1898
HINSTANCE hinst
Definition: commctrl.h:1899
WCHAR szText[80]
Definition: commctrl.h:1907
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
TVITEMA item
Definition: commctrl.h:3667
LPSTR pszText
Definition: commctrl.h:3307
int cchTextMax
Definition: commctrl.h:3308
#define GWLP_WNDPROC
Definition: treelist.c:66
#define GWLP_USERDATA
Definition: treelist.c:63
int32_t INT
Definition: typedefs.h:58
HANDLE HMODULE
Definition: typedefs.h:77
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define WHITE_BRUSH
Definition: wingdi.h:902
#define WM_PAINT
Definition: winuser.h:1620
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define SetWindowLongPtrA
Definition: winuser.h:5345
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1661
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_CHILDACTIVATE
Definition: winuser.h:1638
#define WM_SIZE
Definition: winuser.h:1611
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
#define WM_NCHITTEST
Definition: winuser.h:1686
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_GETTEXT
Definition: winuser.h:1618
#define GetWindowLongPtrA
Definition: winuser.h:4828
#define WM_DEVICECHANGE
Definition: winuser.h:1811
#define NF_REQUERY
Definition: winuser.h:2461
#define CreateWindow
Definition: winuser.h:5754
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
HWND WINAPI GetParent(_In_ HWND)
#define WM_MOVE
Definition: winuser.h:1610
#define NFR_ANSI
Definition: winuser.h:2458
#define WM_USER
Definition: winuser.h:1895
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2906
#define NFR_UNICODE
Definition: winuser.h:2459
#define WM_NCCALCSIZE
Definition: winuser.h:1685
#define GWL_STYLE
Definition: winuser.h:852
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1662
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NF_QUERY
Definition: winuser.h:2460
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2090
#define WM_NCPAINT
Definition: winuser.h:1687
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175