211{
215
217
219
222
223
226 {
227 skip(
"ShellExecuteExW failed\n");
228 return -1;
229 }
232
233
236 {
237 skip(
"ShellExecuteExW failed\n");
238 return -1;
239 }
242
246 trace(
"hwnd1: %p\n", hwnd1);
247 trace(
"hwnd2: %p\n", hwnd2);
249 ok(hwnd1 !=
NULL,
"hwnd1 was NULL\n");
250 ok(hwnd2 !=
NULL,
"hwnd2 was NULL\n");
251 ok(hwnd1 != hwnd2,
"hwnd1 == hwnd2\n");
252
255
259
264
267
268
271
273 trace(
"hwndMenu1: %p\n", hwndMenu1);
275
276 HWND hwndFore, hwndActive, hwndFocus, hwndCapture;
277
279 ok(hwndFore == hwnd1,
"hwndFore was %p\n", hwndFore);
280
284 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
285 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
286 ok(hwndCapture == hwnd1,
"hwndCapture was %p\n", hwndCapture);
287
288
291
293 trace(
"hwndMenu2: %p\n", hwndMenu2);
295 ok(hwndMenu1 != hwndMenu2,
"hwndMenu1 == hwndMenu2\n");
296
298 ok(hwndFore == hwnd2,
"hwndFore was %p\n", hwndFore);
299
303 ok(hwndActive == hwnd2,
"hwndActive was %p\n", hwndActive);
304 ok(hwndFocus == hwnd2,
"hwndFocus was %p\n", hwndFocus);
305 ok(hwndCapture == hwnd2,
"hwndCapture was %p\n", hwndCapture);
306
307
310
312 ok(hwndFore == hwnd2,
"hwndFore was %p\n", hwndFore);
313
317 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
318 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
319 ok(!hwndCapture,
"hwndCapture was %p\n", hwndCapture);
320
324 ok(hwndActive == hwnd2,
"hwndActive was %p\n", hwndActive);
325 ok(hwndFocus == hwnd2,
"hwndFocus was %p\n", hwndFocus);
326 ok(!hwndCapture,
"hwndCapture was %p\n", hwndCapture);
327
330 trace(
"hwndMenu0: %p\n", hwndMenu0);
332
333
336 trace(
"hwndMenu1: %p\n", hwndMenu1);
338
342
343
346 trace(
"hwndMenu1: %p\n", hwndMenu1);
348
351 trace(
"hwndMenu1: %p\n", hwndMenu1);
353
356 trace(
"hwndMenu1: %p\n", hwndMenu1);
358
361 trace(
"hwndMenu1: %p\n", hwndMenu1);
363
364
365 POINT pt1_3 = { ptMenu1.
x, (2 * rcMenu1.
top + 1 * rcMenu1.
bottom) / (1 + 2) };
368
372
373
377
381
384
388
389
393
397
400
404
406
407
414 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
415
419
424 ok(nMenuCount == 2,
"nMenuCount was %d\n", nMenuCount);
425
426
429 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
430
434
437
438
446
447
450
453
455 ok(hwndFore == hwnd1,
"hwndFore was %p\n", hwndFore);
456
460 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
461 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
462 ok(hwndCapture == hwnd1,
"hwndCapture was %p\n", hwndCapture);
463
464
467
471 ok(hwndMenu1 != hwndMenu2,
"hwndMenu1 == hwndMenu2\n");
472
474 ok(hwndFore == hwnd2,
"hwndFore was %p\n", hwndFore);
475
479 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
480 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
481 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
482
486 ok(hwndActive == hwnd2,
"hwndActive was %p\n", hwndActive);
487 ok(hwndFocus == hwnd2,
"hwndFocus was %p\n", hwndFocus);
488 ok(hwndCapture == hwnd2,
"hwndFocus was %p\n", hwndCapture);
489
490
493
496
498 ok(hwndFore == hwnd1,
"hwndFore was %p\n", hwndFore);
499
503 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
504 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
505 ok(hwndCapture == hwnd1,
"hwndCapture was %p\n", hwndCapture);
506
510 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
511 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
512 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
513
514
518
520 ok(hwndFore == hwnd2,
"hwndFore was %p\n", hwndFore);
521
525 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
526 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
527 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
528
532 ok(hwndActive == hwnd2,
"hwndActive was %p\n", hwndActive);
533 ok(hwndFocus == hwnd2,
"hwndFocus was %p\n", hwndFocus);
534 ok(hwndCapture == hwnd2,
"hwndFocus was %p\n", hwndCapture);
535
544
545
550
552 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
553
557
559 ok(nMenuCount == 2,
"nMenuCount was %d\n", nMenuCount);
560
563
565 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
566
569
571 ok(nMenuCount == 2,
"nMenuCount was %d\n", nMenuCount);
572
573
576
578 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
579
583
585
586
590
592 ok(hwndFore == hwnd1,
"hwndFore was %p\n", hwndFore);
593
597 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
598 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
599 ok(hwndCapture == hwnd1,
"hwndCapture was %p\n", hwndCapture);
600
604 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
605 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
606 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
607
610
611
614
616 ok(hwndFore == hwnd1,
"hwndFore was %p\n", hwndFore);
617
621 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
622 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
623 ok(hwndCapture == hwnd1,
"hwndCapture was %p\n", hwndCapture);
624
628 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
629 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
630 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
631
632
635
637 ok(hwndFore == hwnd2,
"hwndFore was %p\n", hwndFore);
638
642 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
643 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
644 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
645
649 ok(hwndActive == hwnd2,
"hwndActive was %p\n", hwndActive);
650 ok(hwndFocus == hwnd2,
"hwndFocus was %p\n", hwndFocus);
651 ok(hwndCapture == hwnd2,
"hwndFocus was %p\n", hwndCapture);
652
653
656
658 ok(hwndFore == hwnd1,
"hwndFore was %p\n", hwndFore);
659
663 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
664 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
665 ok(hwndCapture == hwnd1,
"hwndCapture was %p\n", hwndCapture);
666
670 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
671 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
672 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
673
674
676 RECT rcTitleBar1, rcTitleBar2;
683
684
687
691 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
692 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
693 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
694
698 ok(hwndActive == hwnd2,
"hwndActive was %p\n", hwndActive);
699 ok(hwndFocus == hwnd2,
"hwndFocus was %p\n", hwndFocus);
700 ok(hwndCapture == hwnd2,
"hwndFocus was %p\n", hwndCapture);
701
703 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
704
705
708
712 ok(hwndActive == hwnd1,
"hwndActive was %p\n", hwndActive);
713 ok(hwndFocus == hwnd1,
"hwndFocus was %p\n", hwndFocus);
714 ok(hwndCapture == hwnd1,
"hwndFocus was %p\n", hwndCapture);
715
719 ok(!hwndActive,
"hwndActive was %p\n", hwndActive);
720 ok(!hwndFocus,
"hwndFocus was %p\n", hwndFocus);
721 ok(!hwndCapture,
"hwndFocus was %p\n", hwndCapture);
722
724 ok(nMenuCount == 1,
"nMenuCount was %d\n", nMenuCount);
725
726
731
734 ok(nMenuCount == 0,
"nMenuCount was %d\n", nMenuCount);
735
738
741 return 0;
742}
#define SEE_MASK_NOCLOSEPROCESS
#define SEE_MASK_FLAG_NO_UI
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
BOOL WINAPI GetTitleBarInfo(_In_ HWND, _Inout_ PTITLEBARINFO)
HWND WINAPI GetForegroundWindow(void)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
DWORD WINAPI WaitForInputIdle(_In_ HANDLE, _In_ DWORD)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI GetMenuBarInfo(_In_ HWND, _In_ LONG, _In_ LONG, _Inout_ PMENUBARINFO)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)