Huw Davies : comctl32/tests: Post a key-down message rather than use keybd_event.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 3 07:21:47 CST 2014


Module: wine
Branch: master
Commit: dd856be316f7aac99bd70400e6d5b927177d1343
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dd856be316f7aac99bd70400e6d5b927177d1343

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Oct 31 11:55:18 2014 +0000

comctl32/tests: Post a key-down message rather than use keybd_event.

---

 dlls/comctl32/tests/propsheet.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/tests/propsheet.c b/dlls/comctl32/tests/propsheet.c
index 2797e94..815b8ad 100644
--- a/dlls/comctl32/tests/propsheet.c
+++ b/dlls/comctl32/tests/propsheet.c
@@ -524,7 +524,7 @@ page_with_custom_default_button_dlg_proc(HWND hdlg, UINT msg, WPARAM wparam, LPA
 
 static void test_custom_default_button(void)
 {
-    HWND hdlg;
+    HWND hdlg, page;
     PROPSHEETPAGEA psp[1];
     PROPSHEETHEADERA psh;
     MSG msg;
@@ -568,7 +568,8 @@ static void test_custom_default_button(void)
 
     /* At this point, the combobox should have keyboard focus, so we press ENTER.
      * Pull the lever, Kronk! */
-    keybd_event(VK_RETURN, 0, 0, 0);
+    page = (HWND)SendMessageW(hdlg, PSM_GETCURRENTPAGEHWND, 0, 0);
+    PostMessageW(GetDlgItem(page, IDC_PS_COMBO1), WM_KEYDOWN, VK_RETURN, 0);
 
     /* Process all the messages in the queue for this thread. */
     while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE))




More information about the wine-cvs mailing list