ReactOS  0.4.12-dev-918-g6c6e7b8
msg.c File Reference
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "dbt.h"
#include "wine/test.h"
Include dependency graph for msg.c:

Go to the source code of this file.

Classes

struct  DRAW_ITEM_STRUCT
 
struct  MEASURE_ITEM_STRUCT
 
struct  message
 
struct  recvd_message
 
struct  wnd_event
 
struct  timer_info
 
struct  sendmsg_info
 
struct  peekmsg_info
 
struct  rbuttonup_thread_data
 
struct  layered_window_info
 

Macros

#define _WIN32_WINNT   0x0600 /* For WM_CHANGEUISTATE,QS_RAWINPUT,WM_DWMxxxx */
 
#define WINVER   0x0600 /* for WM_GETTITLEBARINFOEX */
 
#define MDI_FIRST_CHILD_ID   2004
 
#define SWP_NOCLIENTSIZE   0x0800
 
#define SWP_NOCLIENTMOVE   0x1000
 
#define SWP_STATECHANGED   0x8000
 
#define SW_NORMALNA   0xCC /* undoc. flag in MinMaximize */
 
#define WM_KEYF1   0x004d
 
#define WM_SYSTIMER   0x0118
 
#define WND_PARENT_ID   1
 
#define WND_POPUP_ID   2
 
#define WND_CHILD_ID   3
 
#define WM_LBTRACKPOINT   0x0131
 
#define ARCH   "none"
 
#define GET_PROC(dll, func)
 
#define DUMP(flag)   do { if (flags & flag) { strcat( buffer, "|" #flag ); flags &= ~flag; } } while(0)
 
#define add_message(msg)   add_message_(__LINE__,msg);
 
#define ok_sequence(exp, contx, todo)   ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__)
 
#define expect(EXPECTED, GOT)   ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))
 
#define test_msg_setpos(expected_list, flags, todo)   test_msg_setpos_( (expected_list), (flags), (todo), __FILE__, __LINE__)
 
#define ID_BUTTON   0x000e
 
#define ID_RADIO1   501
 
#define ID_RADIO2   502
 
#define ID_RADIO3   503
 
#define ID_TEXT   504
 
#define test_radio(r1, s1, r2, s2, r3, s3)   test_radio_dbg(r1, s1, r2, s2, r3, s3, __LINE__)
 
#define ID_COMBOBOX   0x000f
 
#define TIMER_ID   0x19
 
#define TIMER_COUNT_EXPECTED   100
 
#define TIMER_COUNT_TOLERANCE   10
 
#define ID_EDIT   0x1234
 
#define EV_STOP   0
 
#define EV_SENDMSG   1
 
#define EV_ACK   2
 
#define STEP   5
 
#define track_hover(track_hwnd, track_hover_time)
 
#define track_query(expected_track_flags, expected_track_hwnd, expected_hover_time)
 
#define track_hover_cancel(track_hwnd)
 
#define WS_BASE   (WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_POPUP|WS_CLIPSIBLINGS)
 
#define set_selection(hctl, start, end)
 
#define check_selection(hctl, start, end)
 
#define ID_LISTBOX   0x000f
 
#define check_lb_state(a1, a2, a3, a4, a5)   check_lb_state_dbg(a1, a2, a3, a4, a5, __LINE__)
 
#define clear_clipboard(hwnd)   clear_clipboard_(__LINE__, (hwnd))
 
#define expect_HWND(expected, got)   expect_HWND_(__LINE__, (expected), (got))
 
#define X(f)   p##f = (void*)GetProcAddress(hKernel32, #f)
 

Typedefs

typedef BOOL(WINAPIIS_WINEVENT_HOOK_INSTALLED) (DWORD)
 

Enumerations

enum  msg_flags_t {
  sent = 0x1, posted = 0x2, parent = 0x4, wparam = 0x8,
  lparam = 0x10, defwinproc = 0x20, beginpaint = 0x40, optional = 0x80,
  hook = 0x100, winevent_hook =0x200, id = 0x400, custdraw = 0x800,
  sent = 0x1, posted = 0x2, parent = 0x4, wparam = 0x8,
  lparam = 0x10, defwinproc = 0x20, beginpaint = 0x40, optional = 0x80,
  hook = 0x100, winevent_hook =0x200, id = 0x400, sent =0x1,
  posted =0x2, parent =0x4, wparam =0x8, lparam =0x10,
  defwinproc =0x20, beginpaint =0x40, optional =0x80, hook =0x100,
  winevent_hook =0x200, sent =0x1, posted =0x2, parent =0x4,
  wparam =0x8, lparam =0x10, defwinproc =0x20, beginpaint =0x40,
  optional =0x80, hook =0x100, winevent_hook =0x200, kbd_hook =0x400
}
 

Functions

static BOOL (WINAPI *pActivateActCtx)(HANDLE
 
static ULONG_PTR *static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW)
 
static void void SIZE_T *static void (WINAPI *pReleaseActCtx)(HANDLE)
 
static LRESULT WINAPI ParentMsgCheckProcA (HWND, UINT, WPARAM, LPARAM)
 
static HWND (WINAPI *pGetAncestor)(HWND
 
static HWINEVENTHOOK (WINAPI *pSetWinEventHook)(DWORD
 
static HMONITOR (WINAPI *pMonitorFromPoint)(POINT
 
static UINT_PTR (WINAPI *pSetSystemTimer)(HWND
 
static void init_procs (void)
 
static const charget_winpos_flags (UINT flags)
 
static BOOL ignore_message (UINT message)
 
static unsigned hash_Ly_W (const WCHAR *str)
 
static unsigned hash_Ly (const char *str)
 
static void add_message_ (int line, const struct recvd_message *msg)
 
static void flush_events (void)
 
static void flush_sequence (void)
 
static void dump_sequence (const struct message *expected, const char *context, const char *file, int line)
 
static void ok_sequence_ (const struct message *expected_list, const char *context, BOOL todo, const char *file, int line)
 
static LRESULT WINAPI mdi_client_hook_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI mdi_child_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI mdi_frame_wnd_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static BOOL mdi_RegisterWindowClasses (void)
 
static void test_mdi_messages (void)
 
static void test_WM_SETREDRAW (HWND hwnd)
 
static INT_PTR CALLBACK TestModalDlgProcA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK TestModalDlgProc2 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_hv_scroll_1 (HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min, INT max)
 
static void test_hv_scroll_2 (HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min, INT max)
 
static void test_scroll_messages (HWND hwnd)
 
static void test_showwindow (void)
 
static void test_sys_menu (void)
 
static void CALLBACK apc_test_proc (ULONG_PTR param)
 
static void test_MsgWaitForMultipleObjects (HWND hwnd)
 
static void test_WM_DEVICECHANGE (HWND hwnd)
 
static DWORD CALLBACK show_window_thread (LPVOID arg)
 
static void test_msg_setpos_ (const struct message *expected_list, UINT flags, BOOL todo, const char *file, int line)
 
static void test_messages (void)
 
static void test_setwindowpos (void)
 
static void invisible_parent_tests (void)
 
static LRESULT CALLBACK button_hook_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void subclass_button (void)
 
static void test_button_messages (void)
 
static INT_PTR WINAPI radio_test_dlg_proc (HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
 
static void test_autoradio_BM_CLICK (void)
 
static void test_radio_dbg (HWND radio1, int state1, HWND radio2, int state2, HWND radio3, int state3, int line)
 
static void set_radio (HWND radio1, int state1, HWND radio2, int state2, HWND radio3, int state3)
 
static void test_autoradio_kbd_move (void)
 
static LRESULT CALLBACK static_hook_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void subclass_static (void)
 
static void test_static_messages (void)
 
static LRESULT CALLBACK combobox_edit_subclass_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK combobox_lbox_subclass_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK combobox_hook_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void subclass_combobox (void)
 
static void test_combobox_messages (void)
 
static LRESULT WINAPI wmime_keydown_procA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void register_wmime_keydown_class (void)
 
static void test_wmime_keydown_message (void)
 
void dump_region (HRGN hrgn)
 
static void check_update_rgn (HWND hwnd, HRGN hrgn)
 
static void test_paint_messages (void)
 
static DWORD WINAPI thread_proc (void *param)
 
static DWORD CALLBACK create_grand_child_thread (void *param)
 
static DWORD CALLBACK create_child_thread (void *param)
 
static void create_manifest_file (const char *filename, const char *manifest)
 
static HANDLE test_create (const char *file)
 
static void test_interthread_messages (void)
 
static void pump_msg_loop (HWND hwnd, HACCEL hAccel)
 
static void test_accelerators (void)
 
static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI MsgCheckProcA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI MsgCheckProcW (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI PopupMsgCheckProcA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK StopQuitMsgCheckProcA (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 
static LRESULT WINAPI TestDlgProcA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI ShowWindowProcA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI PaintLoopProcA (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI HotkeyMsgCheckProcA (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static BOOL RegisterWindowClasses (void)
 
static BOOL is_our_logged_class (HWND hwnd)
 
static LRESULT CALLBACK cbt_hook_proc (int nCode, WPARAM wParam, LPARAM lParam)
 
static void CALLBACK win_event_proc (HWINEVENTHOOK hevent, DWORD event, HWND hwnd, LONG object_id, LONG child_id, DWORD thread_id, DWORD event_time)
 
static LRESULT CALLBACK MsgConversionProcW (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK get_text_len_proc (HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
 
static void test_message_conversion (void)
 
static VOID CALLBACK tfunc (HWND hwnd, UINT uMsg, UINT_PTR id, DWORD dwTime)
 
static void CALLBACK callback_count (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
 
static void CALLBACK callback_exception (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
 
static DWORD WINAPI timer_thread_proc (LPVOID x)
 
static void test_timers (void)
 
static void test_timers_no_wnd (void)
 
static void test_timers_exception (DWORD code)
 
static void test_timers_exceptions (void)
 
static void CALLBACK win_event_global_hook_proc (HWINEVENTHOOK hevent, DWORD event, HWND hwnd, LONG object_id, LONG child_id, DWORD thread_id, DWORD event_time)
 
static LRESULT CALLBACK cbt_global_hook_proc (int nCode, WPARAM wParam, LPARAM lParam)
 
static DWORD WINAPI win_event_global_thread_proc (void *param)
 
static DWORD WINAPI cbt_global_hook_thread_proc (void *param)
 
static DWORD WINAPI mouse_ll_global_thread_proc (void *param)
 
static void test_winevents (void)
 
static void test_set_hook (void)
 
static LRESULT WINAPI rec_get_message_hook (int code, WPARAM w, LPARAM l)
 
static void test_recursive_hook (void)
 
static void test_scrollwindowex (void)
 
static void test_DestroyWindow (void)
 
static LRESULT WINAPI DispatchMessageCheckProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_DispatchMessage (void)
 
static DWORD CALLBACK send_msg_thread (LPVOID arg)
 
static void wait_for_thread (HANDLE thread)
 
static LRESULT WINAPI send_msg_delay_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_SendMessageTimeout (void)
 
static LRESULT CALLBACK edit_hook_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void subclass_edit (void)
 
static void test_edit_messages (void)
 
static DWORD CALLBACK send_msg_thread_2 (void *param)
 
static void test_PeekMessage (void)
 
static void wait_move_event (HWND hwnd, int x, int y)
 
static void test_PeekMessage2 (void)
 
static void test_PeekMessage3 (void)
 
static INT_PTR CALLBACK wm_quit_dlg_proc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 
static void test_quit_message (void)
 
static void test_notify_message (void)
 
static void pump_msg_loop_timeout (DWORD timeout, BOOL inject_mouse_move)
 
static void test_TrackMouseEvent (void)
 
static void test_SetWindowRgn (void)
 
static void test_ShowWindow (void)
 
static INT_PTR WINAPI test_dlg_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI dlg_creation_edit_proc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 
static INT_PTR WINAPI test_dlg_proc2 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static INT_PTR WINAPI test_dlg_proc3 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI test_dlg_proc4 (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_dialog_messages (void)
 
static void test_enddialog_seq (HWND dialog, HWND owner)
 
static void test_enddialog_seq2 (HWND dialog, HWND owner)
 
static void test_EndDialog (void)
 
static void test_nullCallback (void)
 
static void test_SetActiveWindow (void)
 
static void test_SetForegroundWindow (void)
 
static DWORD get_input_codepage (void)
 
static void test_dbcs_wm_char (void)
 
static void test_unicode_wm_char (void)
 
static LRESULT (WINAPI *listbox_orig_proc)(HWND
 
static LRESULT WINAPI listbox_hook_proc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 
static void check_lb_state_dbg (HWND listbox, int count, int cur_sel, int caret_index, int top_index, int line)
 
static void test_listbox_messages (void)
 
static LRESULT WINAPI parent_menu_proc (HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
 
static void set_menu_style (HMENU hmenu, DWORD style)
 
static DWORD get_menu_style (HMENU hmenu)
 
static void test_menu_messages (void)
 
static void test_paintingloop (void)
 
static DWORD CALLBACK post_rbuttonup_msg (void *arg)
 
static void test_defwinproc (void)
 
static void clear_clipboard_ (int line, HWND hWnd)
 
static void expect_HWND_ (int line, HWND expected, HWND got)
 
static LRESULT CALLBACK recursive_viewer_proc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_clipboard_viewers (void)
 
static void test_PostMessage (void)
 
static LRESULT WINAPI broadcast_test_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_broadcast (void)
 
static DWORD CALLBACK do_wait_idle_child_thread (void *arg)
 
static void do_wait_idle_child (int arg)
 
static LRESULT CALLBACK wait_idle_proc (HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
 
static DWORD CALLBACK wait_idle_thread (void *arg)
 
static void test_WaitForInputIdle (char *argv0)
 
static void test_SetParent (void)
 
static void test_keyflags (void)
 
static LRESULT CALLBACK KeyboardHookProc (int nCode, WPARAM wParam, LPARAM lParam)
 
static void test_hotkey (void)
 
static void test_SetFocus (void)
 
static DWORD CALLBACK update_layered_proc (void *param)
 
static void test_layered_window (void)
 
static LRESULT WINAPI cancel_popup_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI cancel_init_proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static void test_TrackPopupMenu (void)
 
static void test_TrackPopupMenuEmpty (void)
 
static DWORD WINAPI SendMessage_thread_1 (void *param)
 
static DWORD WINAPI SendMessage_thread_2 (void *param)
 
static void test_SendMessage_other_thread (int thread_n)
 
static LRESULT CALLBACK insendmessage_wnd_proc (HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
 
static void CALLBACK msg_callback (HWND hwnd, UINT msg, ULONG_PTR arg, LRESULT result)
 
static DWORD WINAPI send_message_thread (void *arg)
 
static void test_InSendMessage (void)
 
static void test_DoubleSetCapture (void)
 
static void init_funcs (void)
 
 START_TEST (msg)
 
static void init_tests ()
 
static void cleanup_tests ()
 
 START_TEST (msg_queue)
 
 START_TEST (msg_messages)
 
 START_TEST (msg_focus)
 
 START_TEST (msg_winpos)
 
 START_TEST (msg_paint)
 
 START_TEST (msg_input)
 
 START_TEST (msg_timer)
 
 START_TEST (msg_hook)
 
 START_TEST (msg_menu)
 
 START_TEST (msg_mdi)
 
 START_TEST (msg_controls)
 
 START_TEST (msg_layered_window)
 
 START_TEST (msg_dialog)
 
 START_TEST (msg_clipboard)
 

Variables

static ULONG_PTR
 
static HANDLE
 
static void ULONG
 
static void void SIZE_T
 
static BOOL test_DestroyWindow_flag
 
static HWINEVENTHOOK hEvent_hook
 
static HHOOK hKBD_hook
 
static HHOOK hCBT_hook
 
static DWORD cbt_hook_thread_id
 
static const WCHAR testWindowClassW []
 
static const struct message WmEmptySeq []
 
static const struct message WmCreateOverlappedSeq []
 
static const struct message WmSWP_ShowOverlappedSeq []
 
static const struct message WmSWP_HideOverlappedSeq []
 
static const struct message WmSWP_ResizeSeq []
 
static const struct message WmSWP_ResizePopupSeq []
 
static const struct message WmSWP_MoveSeq []
 
static const struct message WmSWP_ResizeNoZOrder []
 
static const struct message WmSwitchChild []
 
static const struct message WmSwitchNotMaximizedChild []
 
static const struct message WmSWP_FrameChanged_clip []
 
static const struct message WmSWP_FrameChangedDeferErase []
 
static const struct message WmSWP_FrameChanged_noclip []
 
static const struct message WmShowOverlappedSeq []
 
static const struct message WmShowMaxOverlappedSeq []
 
static const struct message WmShowRestoreMaxOverlappedSeq []
 
static const struct message WmShowRestoreMinOverlappedSeq []
 
static const struct message WmShowMinOverlappedSeq []
 
static const struct message WmHideOverlappedSeq []
 
static const struct message WmDestroyOverlappedSeq []
 
static const struct message WmCreateMaxPopupSeq []
 
static const struct message WmCreateInvisibleMaxPopupSeq []
 
static const struct message WmShowMaxPopupResizedSeq_todo []
 
static const struct message WmShowMaxPopupResizedSeq []
 
static const struct message WmShowMaxPopupSeq []
 
static const struct message WmCreatePopupSeq []
 
static const struct message WmShowVisMaxPopupSeq []
 
static const struct message WmCreateChildPopupSeq []
 
static const struct message WmCreateInvisiblePopupSeq []
 
static const struct message WmShowVisiblePopupSeq_2 []
 
static const struct message WmShowVisiblePopupSeq_3 []
 
static const struct message WmShowPopupExtremeLocationSeq []
 
static const struct message WmShowPopupFirstDrawSeq_1 []
 
static const struct message WmShowPopupFirstDrawSeq_2 []
 
static const struct message WmFirstDrawSetWindowPosSeq1 []
 
static const struct message WmFirstDrawSetWindowPosSeq2 []
 
static const struct message WmFirstDrawSetWindowPosSeq3 []
 
static const struct message WmFirstDrawSetWindowPosSeq4 []
 
static const struct message WmFirstDrawSetWindowPosSeq5 []
 
static const struct message WmFirstDrawChildSeq1 []
 
static const struct message WmFirstDrawChildSeq2 []
 
static const struct message WmCreateChildSeq []
 
static const struct message WmCreateMaximizedChildSeq []
 
static const struct message WmCreateVisibleChildSeq []
 
static const struct message WmShowChildSeq []
 
static const struct message WmHideChildSeq []
 
static const struct message WmHideChildSeq2 []
 
static const struct message WmShowChildSeq_2 []
 
static const struct message WmShowChildSeq_3 []
 
static const struct message WmShowChildSeq_4 []
 
static const struct message WmShowChildInvisibleParentSeq_1 []
 
static const struct message WmShowChildInvisibleParentSeq_1r []
 
static const struct message WmShowChildInvisibleParentSeq_2 []
 
static const struct message WmShowChildInvisibleParentSeq_2r []
 
static const struct message WmShowChildInvisibleParentSeq_3 []
 
static const struct message WmShowChildInvisibleParentSeq_3r []
 
static const struct message WmShowChildInvisibleParentSeq_4 []
 
static const struct message WmShowChildInvisibleParentSeq_4r []
 
static const struct message WmShowChildInvisibleParentSeq_5 []
 
static const struct message WmHideChildInvisibleParentSeq []
 
static const struct message WmShowChildInvisibleParentSeq_6 []
 
static const struct message WmHideChildInvisibleParentSeq_2 []
 
static const struct message WmDestroyChildSeq []
 
static const struct message WmExitThreadSeq []
 
static const struct message WmDestroyInvisibleChildSeq []
 
static const struct message WmResizingChildWithMoveWindowSeq []
 
static const struct message WmCreateCustomDialogSeq []
 
static const struct message WmEndCustomDialogSeq []
 
static const struct message WmShowCustomDialogSeq []
 
static const struct message WmModalDialogSeq []
 
static const struct message WmModalDialogSeq_2 []
 
static const struct message WmSetMenuNonVisibleSizeChangeSeq []
 
static const struct message WmSetMenuNonVisibleNoSizeChangeSeq []
 
static const struct message WmSetMenuVisibleSizeChangeSeq []
 
static const struct message WmSetMenuVisibleNoSizeChangeSeq []
 
static const struct message WmDrawMenuBarSeq []
 
static const struct message WmSetRedrawFalseSeq []
 
static const struct message WmSetRedrawTrueSeq []
 
static const struct message WmEnableWindowSeq_1 []
 
static const struct message WmEnableWindowSeq_2 []
 
static const struct message WmEnableWindowSeq_3 []
 
static const struct message WmEnableWindowSeq_4 []
 
static const struct message WmGetScrollRangeSeq []
 
static const struct message WmGetScrollInfoSeq []
 
static const struct message WmSetScrollRangeSeq []
 
static const struct message WmSetScrollRangeHSeq_empty []
 
static const struct message WmSetScrollRangeVSeq_empty []
 
static const struct message WmSetScrollRangeHVSeq []
 
static const struct message WmSetScrollRangeHV_NC_Seq []
 
static const struct message WmSHOWNAChildInvisParInvis []
 
static const struct message WmSHOWNAChildVisParInvis []
 
static const struct message WmSHOWNAChildVisParVis []
 
static const struct message WmSHOWNAChildInvisParVis []
 
static const struct message WmSHOWNATopVisible []
 
static const struct message WmSHOWNATopInvisible []
 
static const struct message WmTrackPopupMenu []
 
static const struct message WmTrackPopupMenuEsc []
 
static const struct message WmTrackPopupMenuCapture []
 
static const struct message WmTrackPopupMenuEmpty []
 
static const struct message WmTrackPopupMenuAbort []
 
static BOOL after_end_dialog
 
static BOOL test_def_id
 
static BOOL paint_loop_done
 
static int sequence_cnt
 
static int sequence_size
 
static struct recvd_messagesequence
 
static int log_all_parent_messages
 
static CRITICAL_SECTION sequence_cs
 
static UINT
 
static LPCMENUINFO
 
static HWND
 
static LONG
 
static DWORD
 
static HMODULE
 
static WINEVENTPROC
 
static LPMONITORINFO
 
static HDC
 
static POINT SIZE POINT COLORREF
 
static UINT_PTR
 
static TIMERPROC
 
static LPCPINFOEXA
 
static const struct message WmCreateMDIframeSeq []
 
static const struct message WmDestroyMDIframeSeq []
 
static const struct message WmCreateMDIclientSeq []
 
static const struct message WmShowMDIclientSeq []
 
static const struct message WmHideMDIclientSeq []
 
static const struct message WmDestroyMDIclientSeq []
 
static const struct message WmCreateMDIchildVisibleSeq []
 
static const struct message WmChildActivateDisabledWindowSeq []
 
static const struct message WmChildActivateWindowSeq []
 
static const struct message WmCreateMDIchildInvisibleParentSeq []
 
static const struct message WmDestroyMDIchildVisibleSeq []
 
static const struct message WmCreateMDIchildInvisibleSeq []
 
static const struct message WmDestroyMDIchildInvisibleSeq []
 
static const struct message WmCreateMDIchildVisibleMaxSeq1 []
 
static const struct message WmCreateMDIchildVisibleMaxSeq2 []
 
static const struct message WmCreateMDIchildVisibleMaxSeq3 []
 
static const struct message WmCreateMDIchildInvisibleMaxSeq4 []
 
static const struct message WmDestroyMDIchildVisibleMaxSeq2 []
 
static const struct message WmDestroyMDIchildVisibleMaxSeq1 []
 
static const struct message WmMaximizeMDIchildInvisibleSeq []
 
static const struct message WmMaximizeMDIchildInvisibleSeq2 []
 
static const struct message WmMaximizeMDIchildInvisibleParentSeq []
 
static const struct message WmMaximizeMDIchildVisibleSeq []
 
static const struct message WmRestoreMDIchildVisibleSeq []
 
static const struct message WmRestoreMDIchildVisibleSeq_2 []
 
static const struct message WmMinimizeMDIchildVisibleSeq []
 
static const struct message WmRestoreMDIchildInvisibleSeq []
 
static HWND mdi_client
 
static WNDPROC old_mdi_client_proc
 
static const struct message WmSetIcon_1 []
 
static const struct message WmSetIcon_2 []
 
static const struct message WmInitEndSession []
 
static const struct message WmInitEndSession_2 []
 
static const struct message WmInitEndSession_3 []
 
static const struct message WmInitEndSession_4 []
 
static const struct message WmInitEndSession_5 []
 
static const struct message WmOptionalPaint []
 
static const struct message WmZOrder []
 
static const struct message WmSetFocusButtonSeq []
 
static const struct message WmKillFocusButtonSeq []
 
static const struct message WmSetFocusStaticSeq []
 
static const struct message WmKillFocusStaticSeq []
 
static const struct message WmSetFocusOwnerdrawSeq []
 
static const struct message WmKillFocusOwnerdrawSeq []
 
static const struct message WmLButtonDownSeq []
 
static const struct message WmLButtonDownStaticSeq []
 
static const struct message WmLButtonUpSeq []
 
static const struct message WmLButtonUpStaticSeq []
 
static const struct message WmLButtonUpAutoSeq []
 
static const struct message WmLButtonUpBrokenSeq []
 
static const struct message WmSetFontButtonSeq []
 
static const struct message WmSetFontStaticSeq []
 
static const struct message WmSetTextButtonSeq []
 
static const struct message WmSetTextStaticSeq []
 
static const struct message WmSetTextGroupSeq []
 
static const struct message WmSetTextInvisibleSeq []
 
static const struct message WmSetStyleButtonSeq []
 
static const struct message WmSetStyleStaticSeq []
 
static const struct message WmSetStyleUserSeq []
 
static const struct message WmSetStyleOwnerdrawSeq []
 
static const struct message WmSetStateButtonSeq []
 
static const struct message WmSetStateStaticSeq []
 
static const struct message WmSetStateUserSeq []
 
static const struct message WmSetStateOwnerdrawSeq []
 
static const struct message WmClearStateButtonSeq []
 
static const struct message WmDisableButtonSeq []
 
static const struct message WmClearStateOwnerdrawSeq []
 
static const struct message WmSetCheckIgnoredSeq []
 
static const struct message WmSetCheckStaticSeq []
 
static WNDPROC old_button_proc
 
static const struct message auto_radio_button_BM_CLICK []
 
static const struct message auto_radio_button_VK_UP_child []
 
static const struct message auto_radio_button_VK_UP_parent []
 
static const struct message auto_radio_button_VK_UP_dialog []
 
static const struct message auto_radio_button_VK_DOWN_dialog []
 
static const struct message auto_radio_button_VK_DOWN_radio3 []
 
static const struct message auto_radio_button_VK_UP_radio1 []
 
static const struct message WmSetFontStaticSeq2 []
 
static WNDPROC old_static_proc
 
static const struct message SetCurSelComboSeq []
 
static const struct message SetCurSelComboSeq2 []
 
static const struct message SetCurSelComboSeq_edit []
 
static const struct message WmKeyDownComboSeq []
 
static const struct message WmSetPosComboSeq []
 
static const struct message WMSetFocusComboBoxSeq []
 
static const struct message SetFocusButtonSeq []
 
static const struct message SetFocusComboBoxSeq []
 
static const struct message SetFocusButtonSeq2 []
 
static WNDPROC old_combobox_proc
 
static WNDPROC edit_window_proc
 
static WNDPROC lbox_window_proc
 
static const struct message WmImeKeydownMsgSeq_0 []
 
static const struct message WmImeKeydownMsgSeq_1 []
 
static const struct message WmInvalidateRgn []
 
static const struct message WmGetUpdateRect []
 
static const struct message WmInvalidateFull []
 
static const struct message WmInvalidateErase []
 
static const struct message WmInvalidatePaint []
 
static const struct message WmInvalidateErasePaint []
 
static const struct message WmInvalidateErasePaint2 []
 
static const struct message WmErase []
 
static const struct message WmPaint []
 
static const struct message WmParentOnlyPaint []
 
static const struct message WmInvalidateParent []
 
static const struct message WmInvalidateParentChild []
 
static const struct message WmInvalidateParentChild2 []
 
static const struct message WmParentPaint []
 
static const struct message WmParentPaintNc []
 
static const struct message WmChildPaintNc []
 
static const struct message WmParentErasePaint []
 
static const struct message WmParentOnlyNcPaint []
 
static const struct message WmSetParentStyle []
 
static const char manifest_dep []
 
static const char manifest_main []
 
static const struct message WmVkN []
 
static const struct message WmShiftVkN []
 
static const struct message WmCtrlVkN []
 
static const struct message WmCtrlVkN_2 []
 
static const struct message WmAltVkN []
 
static const struct message WmAltVkN_2 []
 
static const struct message WmCtrlAltVkN []
 
static const struct message WmCtrlShiftVkN []
 
static const struct message WmCtrlAltShiftVkN []
 
static const struct message WmAltPressRelease []
 
static const struct message WmShiftMouseButton []
 
static const struct message WmF1Seq []
 
static const struct message WmVkAppsSeq []
 
static const struct message WmVkF10Seq []
 
static const struct message WmShiftF10Seq []
 
static const WCHAR wszUnicode [] = {'U','n','i','c','o','d','e',0}
 
static const WCHAR wszAnsi [] = {'U',0}
 
static const struct message WmGetTextLengthAfromW []
 
static const WCHAR dummy_window_text [] = {'d','u','m','m','y',' ','t','e','x','t',0}
 
static int count = 0
 
static DWORD exception
 
static const struct message WmWinEventsSeq []
 
static const struct message WmWinEventCaretSeq []
 
static const struct message WmWinEventCaretSeq_2 []
 
static const struct message WmWinEventAlertSeq []
 
static const struct message WmWinEventAlertSeq_2 []
 
static const struct message WmGlobalHookSeq_1 []
 
static const struct message WmGlobalHookSeq_2 []
 
static const struct message WmMouseLLHookSeq []
 
static HHOOK hCBT_global_hook
 
static DWORD cbt_global_hook_thread_id
 
static HWND hook_hwnd
 
static HHOOK recursive_hook
 
static int hook_depth
 
static int max_hook_depth
 
static const struct message ScrollWindowPaint1 []
 
static const struct message ScrollWindowPaint2 []
 
static const struct message destroy_window_with_children []
 
static const struct message WmDispatchPaint []
 
static const struct message WmUser []
 
static const struct message sl_edit_setfocus []
 
static const struct message sl_edit_invisible []
 
static const struct message ml_edit_setfocus []
 
static const struct message sl_edit_killfocus []
 
static const struct message sl_edit_lbutton_dblclk []
 
static const struct message sl_edit_lbutton_down []
 
static const struct message ml_edit_lbutton_down []
 
static const struct message sl_edit_lbutton_up []
 
static const struct message ml_edit_lbutton_up []
 
static WNDPROC old_edit_proc
 
static const struct message WmKeyDownSkippedSeq []
 
static const struct message WmKeyDownWasDownSkippedSeq []
 
static const struct message WmKeyUpSkippedSeq []
 
static const struct message WmUserKeyUpSkippedSeq []
 
static const struct message WmQuitDialogSeq []
 
static const struct message WmStopQuitSeq []
 
static const struct message WmNotifySeq []
 
static const struct message WmMouseHoverSeq []
 
static const struct message WmSetWindowRgn []
 
static const struct message WmSetWindowRgn_no_redraw []
 
static const struct message WmSetWindowRgn_clear []
 
static const struct message WmShowNormal []
 
static const struct message WmShow []
 
static const struct message WmShowNoActivate_1 []
 
static const struct message WmShowNoActivate_2 []
 
static const struct message WmShowNA_1 []
 
static const struct message WmShowNA_2 []
 
static const struct message WmRestore_1 []
 
static const struct message WmRestore_2 []
 
static const struct message WmRestore_3 []
 
static const struct message WmRestore_4 []
 
static const struct message WmRestore_5 []
 
static const struct message WmHide_1 []
 
static const struct message WmHide_2 []
 
static const struct message WmHide_3 []
 
static const struct message WmShowMinimized_1 []
 
static const struct message WmMinimize_1 []
 
static const struct message WmMinimize_2 []
 
static const struct message WmMinimize_3 []
 
static const struct message WmShowMinNoActivate []
 
static const struct message WmMinMax_1 []
 
static const struct message WmMinMax_2 []
 
static const struct message WmMinMax_3 []
 
static const struct message WmMinMax_4 []
 
static const struct message WmShowMaximized_1 []
 
static const struct message WmShowMaximized_2 []
 
static const struct message WmShowMaximized_3 []
 
static WNDPROC orig_edit_proc
 
static const struct message WmDefDlgSetFocus_1 []
 
static const struct message WmDefDlgSetFocus_2 []
 
static const struct message WmCreateDialogParamSeq_0 []
 
static const struct message WmCreateDialogParamSeq_1 []
 
static const struct message WmCreateDialogParamSeq_2 []
 
static const struct message WmCreateDialogParamSeq_3 []
 
static const struct message WmCreateDialogParamSeq_4 []
 
static const struct message SetActiveWindowSeq0 []
 
static const struct message SetActiveWindowSeq1 []
 
static const struct message SetActiveWindowSeq2 []
 
static const struct message SetActiveWindowSeq3 []
 
static const struct message SetActiveWindowSeq4 []
 
static const struct message SetForegroundWindowSeq []
 
static const struct message wm_lb_setcursel_0 []
 
static const struct message wm_lb_setcursel_1 []
 
static const struct message wm_lb_setcursel_2 []
 
static const struct message wm_lb_click_0 []
 
static const struct message wm_lb_deletestring []
 
static const struct message wm_lb_deletestring_reset []
 
static const struct message wm_lb_addstring []
 
static const struct message wm_lb_addstring_ownerdraw []
 
static const struct message wm_lb_addstring_sort_ownerdraw []
 
static WPARAM
 
static LPARAM
 
static const struct message wm_popup_menu_1 []
 
static const struct message wm_popup_menu_2 []
 
static const struct message wm_popup_menu_3 []
 
static const struct message wm_single_menu_item []
 
static const struct message NCRBUTTONDOWNSeq []
 
static const struct message NCXBUTTONUPSeq1 []
 
static const struct message NCXBUTTONUPSeq2 []
 
static WNDPROC pOldViewerProc
 
static LPARAM g_broadcast_lparam
 
struct {
   DWORD   exp
 
   DWORD   broken
 
   BOOL   todo
 
wait_idle_expect []
 
static const struct message WmSetParentSeq_1 []
 
static const struct message WmSetParentSeq_2 []
 
static const struct message WmKeyReleaseOnly []
 
static const struct message WmKeyPressNormal []
 
static const struct message WmKeyPressRepeat []
 
static const struct message WmKeyReleaseNormal []
 
static const struct message WmHotkeyPressLWIN []
 
static const struct message WmHotkeyPress []
 
static const struct message WmHotkeyRelease []
 
static const struct message WmHotkeyReleaseLWIN []
 
static const struct message WmHotkeyCombined []
 
static const struct message WmHotkeyPrevious []
 
static const struct message WmHotkeyNew []
 
static int hotkey_letter
 
static const struct message WmSetFocus_1 []
 
static const struct message WmSetFocus_2 []
 
static const struct message WmSetFocus_3 []
 
static const struct message WmSetLayeredStyle []
 
static const struct message WmSetLayeredStyle2 []
 
static HMENU hpopupmenu
 
static const struct message send_message_1 []
 
static const struct message send_message_2 []
 
static const struct message send_message_3 []
 
static const struct message DoubleSetCaptureSeq []
 

Macro Definition Documentation

◆ _WIN32_WINNT

#define _WIN32_WINNT   0x0600 /* For WM_CHANGEUISTATE,QS_RAWINPUT,WM_DWMxxxx */

Definition at line 24 of file msg.c.

◆ add_message

#define add_message (   msg)    add_message_(__LINE__,msg);

Definition at line 2142 of file msg.c.

◆ ARCH

#define ARCH   "none"

Definition at line 76 of file msg.c.

◆ check_lb_state

#define check_lb_state (   a1,
  a2,
  a3,
  a4,
  a5 
)    check_lb_state_dbg(a1, a2, a3, a4, a5, __LINE__)

Definition at line 14615 of file msg.c.

◆ check_selection

#define check_selection (   hctl,
  start,
  end 
)
Value:
ret = SendMessageA(hctl, EM_GETSEL, 0, 0); \
ok(ret == MAKELRESULT(start, end), "wrong selection (%d - %d)\n", LOWORD(ret), HIWORD(ret));
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define MAKELRESULT(l, h)
Definition: winuser.h:3917
GLuint GLuint end
Definition: gl.h:1545
#define EM_GETSEL
Definition: winuser.h:1958
int ret
GLuint start
Definition: gl.h:1545
#define HIWORD(l)
Definition: typedefs.h:246
#define LOWORD(l)
Definition: pedump.c:82

◆ clear_clipboard

#define clear_clipboard (   hwnd)    clear_clipboard_(__LINE__, (hwnd))

Definition at line 15336 of file msg.c.

◆ DUMP

#define DUMP (   flag)    do { if (flags & flag) { strcat( buffer, "|" #flag ); flags &= ~flag; } } while(0)

◆ EV_ACK

#define EV_ACK   2

Definition at line 11546 of file msg.c.

◆ EV_SENDMSG

#define EV_SENDMSG   1

Definition at line 11545 of file msg.c.

◆ EV_STOP

#define EV_STOP   0

Definition at line 11544 of file msg.c.

◆ expect

#define expect (   EXPECTED,
  GOT 
)    ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))

Definition at line 2608 of file msg.c.

◆ expect_HWND

#define expect_HWND (   expected,
  got 
)    expect_HWND_(__LINE__, (expected), (got))

Definition at line 15348 of file msg.c.

◆ GET_PROC

#define GET_PROC (   dll,
  func 
)
Value:
p ## func = (void*)GetProcAddress(dll, #func); \
if(!p ## func) { \
trace("GetProcAddress(%s) failed\n", #func); \
}
GLenum func
Definition: glext.h:6028
static HMODULE dll
Definition: str.c:188
#define GetProcAddress(x, y)
Definition: compat.h:410
GLfloat GLfloat p
Definition: glext.h:8902

◆ ID_BUTTON

#define ID_BUTTON   0x000e

Definition at line 5904 of file msg.c.

◆ ID_COMBOBOX

#define ID_COMBOBOX   0x000f

Definition at line 7145 of file msg.c.

◆ ID_EDIT

#define ID_EDIT   0x1234

Definition at line 11266 of file msg.c.

◆ ID_LISTBOX

#define ID_LISTBOX   0x000f

Definition at line 14502 of file msg.c.

◆ ID_RADIO1

#define ID_RADIO1   501

Definition at line 6622 of file msg.c.

◆ ID_RADIO2

#define ID_RADIO2   502

Definition at line 6623 of file msg.c.

◆ ID_RADIO3

#define ID_RADIO3   503

Definition at line 6624 of file msg.c.

◆ ID_TEXT

#define ID_TEXT   504

Definition at line 6625 of file msg.c.

◆ MDI_FIRST_CHILD_ID

#define MDI_FIRST_CHILD_ID   2004

Definition at line 42 of file msg.c.

◆ ok_sequence

#define ok_sequence (   exp,
  contx,
  todo 
)    ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__)

Definition at line 2422 of file msg.c.

◆ set_selection

#define set_selection (   hctl,
  start,
  end 
)
Value:
ok(ret == 1, "EM_SETSEL returned %ld\n", ret);
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLuint GLuint end
Definition: gl.h:1545
#define EM_SETSEL
Definition: winuser.h:1979
int ret
GLuint start
Definition: gl.h:1545

◆ STEP

#define STEP   5

Definition at line 12070 of file msg.c.

◆ SW_NORMALNA

#define SW_NORMALNA   0xCC /* undoc. flag in MinMaximize */

Definition at line 49 of file msg.c.

◆ SWP_NOCLIENTMOVE

#define SWP_NOCLIENTMOVE   0x1000

Definition at line 46 of file msg.c.

◆ SWP_NOCLIENTSIZE

#define SWP_NOCLIENTSIZE   0x0800

Definition at line 45 of file msg.c.

◆ SWP_STATECHANGED

#define SWP_STATECHANGED   0x8000

Definition at line 47 of file msg.c.

◆ test_msg_setpos

#define test_msg_setpos (   expected_list,
  flags,
  todo 
)    test_msg_setpos_( (expected_list), (flags), (todo), __FILE__, __LINE__)

Definition at line 5100 of file msg.c.

◆ test_radio

#define test_radio (   r1,
  s1,
  r2,
  s2,
  r3,
  s3 
)    test_radio_dbg(r1, s1, r2, s2, r3, s3, __LINE__)

Definition at line 6871 of file msg.c.

◆ TIMER_COUNT_EXPECTED

#define TIMER_COUNT_EXPECTED   100

Definition at line 10003 of file msg.c.

◆ TIMER_COUNT_TOLERANCE

#define TIMER_COUNT_TOLERANCE   10

Definition at line 10004 of file msg.c.

◆ TIMER_ID

#define TIMER_ID   0x19

Definition at line 10002 of file msg.c.

◆ track_hover

#define track_hover (   track_hwnd,
  track_hover_time 
)
Value:
tme.cbSize = sizeof(tme); \
tme.dwFlags = TME_HOVER; \
tme.hwndTrack = track_hwnd; \
tme.dwHoverTime = track_hover_time; \
SetLastError(0xdeadbeef); \
ret = pTrackMouseEvent(&tme); \
ok(ret, "TrackMouseEvent(TME_HOVER) error %d\n", GetLastError())
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
int ret
#define TME_HOVER
Definition: commctrl.h:4951

◆ track_hover_cancel

#define track_hover_cancel (   track_hwnd)
Value:
tme.cbSize = sizeof(tme); \
tme.dwFlags = TME_HOVER | TME_CANCEL; \
tme.hwndTrack = track_hwnd; \
tme.dwHoverTime = 0xdeadbeef; \
SetLastError(0xdeadbeef); \
ret = pTrackMouseEvent(&tme); \
ok(ret, "TrackMouseEvent(TME_HOVER | TME_CANCEL) error %d\n", GetLastError())
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
int ret
#define TME_HOVER
Definition: commctrl.h:4951
#define TME_CANCEL
Definition: commctrl.h:4955

◆ track_query

#define track_query (   expected_track_flags,
  expected_track_hwnd,
  expected_hover_time 
)
Value:
tme.cbSize = sizeof(tme); \
tme.dwFlags = TME_QUERY; \
tme.hwndTrack = (HWND)0xdeadbeef; \
tme.dwHoverTime = 0xdeadbeef; \
SetLastError(0xdeadbeef); \
ret = pTrackMouseEvent(&tme); \
ok(ret, "TrackMouseEvent(TME_QUERY) error %d\n", GetLastError());\
ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %u\n", tme.cbSize); \
ok(tme.dwFlags == (expected_track_flags), \
"wrong tme.dwFlags %08x, expected %08x\n", tme.dwFlags, (expected_track_flags)); \
ok(tme.hwndTrack == (expected_track_hwnd), \
"wrong tme.hwndTrack %p, expected %p\n", tme.hwndTrack, (expected_track_hwnd)); \
ok(tme.dwHoverTime == (expected_hover_time), \
"wrong tme.dwHoverTime %u, expected %u\n", tme.dwHoverTime, (expected_hover_time))
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define TME_QUERY
Definition: commctrl.h:4954
static HWND
Definition: msg.c:2040
int ret

◆ WINVER

#define WINVER   0x0600 /* for WM_GETTITLEBARINFOEX */

Definition at line 25 of file msg.c.

◆ WM_KEYF1

#define WM_KEYF1   0x004d

Definition at line 52 of file msg.c.

◆ WM_LBTRACKPOINT

#define WM_LBTRACKPOINT   0x0131

Definition at line 64 of file msg.c.

◆ WM_SYSTIMER

#define WM_SYSTIMER   0x0118

Definition at line 56 of file msg.c.

◆ WND_CHILD_ID

#define WND_CHILD_ID   3

Definition at line 61 of file msg.c.

◆ WND_PARENT_ID

#define WND_PARENT_ID   1

Definition at line 59 of file msg.c.

◆ WND_POPUP_ID

#define WND_POPUP_ID   2

Definition at line 60 of file msg.c.

◆ WS_BASE

◆ X

#define X (   f)    p##f = (void*)GetProcAddress(hKernel32, #f)

Typedef Documentation

◆ IS_WINEVENT_HOOK_INSTALLED

typedef BOOL(WINAPI * IS_WINEVENT_HOOK_INSTALLED) (DWORD)

Definition at line 17683 of file msg.c.

Enumeration Type Documentation

◆ msg_flags_t

Enumerator
sent 
posted 
parent 
wparam 
lparam 
defwinproc 
beginpaint 
optional 
hook 
winevent_hook 
id 
custdraw 
sent 
posted 
parent 
wparam 
lparam 
defwinproc 
beginpaint 
optional 
hook 
winevent_hook 
id 
sent 
posted 
parent 
wparam 
lparam 
defwinproc 
beginpaint 
optional 
hook 
winevent_hook 
sent 
posted 
parent 
wparam 
lparam 
defwinproc 
beginpaint 
optional 
hook 
winevent_hook 
kbd_hook 

Definition at line 140 of file msg.c.

140  {
141  sent=0x1,
142  posted=0x2,
143  parent=0x4,
144  wparam=0x8,
145  lparam=0x10,
146  defwinproc=0x20,
147  beginpaint=0x40,
148  optional=0x80,
149  hook=0x100,
150  winevent_hook=0x200,
151  kbd_hook=0x400
152 } msg_flags_t;
Definition: msg.c:142
msg_flags_t
Definition: msg.c:140
Definition: msg.c:149
Definition: msg.c:145
Definition: msg.c:151
Definition: msg.c:144
Definition: msg.c:141
Definition: msg.c:143
Definition: msg.c:148

Function Documentation

◆ add_message_()

static void add_message_ ( int  line,
const struct recvd_message msg 
)
static

Definition at line 2143 of file msg.c.

2144 {
2145  struct recvd_message *seq;
2146 
2148  if (!sequence)
2149  {
2150  sequence_size = 10;
2151  sequence = HeapAlloc( GetProcessHeap(), 0, sequence_size * sizeof(*sequence) );
2152  }
2153  if (sequence_cnt == sequence_size)
2154  {
2155  sequence_size *= 2;
2157  }
2158  assert(sequence);
2159 
2160  seq = &sequence[sequence_cnt++];
2161  seq->hwnd = msg->hwnd;
2162  seq->message = msg->message;
2163  seq->flags = msg->flags;
2164  seq->wParam = msg->wParam;
2165  seq->lParam = msg->lParam;
2166  seq->line = line;
2167  seq->descr = msg->descr;
2168  seq->output[0] = 0;
2170 
2171  if (msg->descr)
2172  {
2173  if (msg->flags & hook)
2174  {
2175  static const char * const CBT_code_name[10] =
2176  {
2177  "HCBT_MOVESIZE",
2178  "HCBT_MINMAX",
2179  "HCBT_QS",
2180  "HCBT_CREATEWND",
2181  "HCBT_DESTROYWND",
2182  "HCBT_ACTIVATE",
2183  "HCBT_CLICKSKIPPED",
2184  "HCBT_KEYSKIPPED",
2185  "HCBT_SYSCOMMAND",
2186  "HCBT_SETFOCUS"
2187  };
2188  const char *code_name = (msg->message <= HCBT_SETFOCUS) ? CBT_code_name[msg->message] : "Unknown";
2189 
2190  sprintf( seq->output, "%s: hook %d (%s) wp %08lx lp %08lx",
2191  msg->descr, msg->message, code_name, msg->wParam, msg->lParam );
2192  }
2193  else if (msg->flags & winevent_hook)
2194  {
2195  sprintf( seq->output, "%s: winevent %p %08x %08lx %08lx",
2196  msg->descr, msg->hwnd, msg->message, msg->wParam, msg->lParam );
2197  }
2198  else
2199  {
2200  switch (msg->message)
2201  {
2202  case WM_WINDOWPOSCHANGING:
2203  case WM_WINDOWPOSCHANGED:
2204  {
2205  WINDOWPOS *winpos = (WINDOWPOS *)msg->lParam;
2206 
2207  sprintf( seq->output, "%s: %p WM_WINDOWPOS%s wp %08lx lp %08lx after %p x %d y %d cx %d cy %d flags %s",
2208  msg->descr, msg->hwnd,
2209  (msg->message == WM_WINDOWPOSCHANGING) ? "CHANGING" : "CHANGED",
2210  msg->wParam, msg->lParam, winpos->hwndInsertAfter,
2211  winpos->x, winpos->y, winpos->cx, winpos->cy,
2212  get_winpos_flags(winpos->flags) );
2213 
2214  /* Log only documented flags, win2k uses 0x1000 and 0x2000
2215  * in the high word for internal purposes
2216  */
2217  seq->wParam = winpos->flags & 0xffff;
2218  /* We are not interested in the flags that don't match under XP and Win9x */
2219  seq->wParam &= ~SWP_NOZORDER;
2220  break;
2221  }
2222 
2223  case WM_DRAWITEM:
2224  {
2225  DRAW_ITEM_STRUCT di;
2226  DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)msg->lParam;
2227 
2228  sprintf( seq->output, "%s: %p WM_DRAWITEM: type %x, ctl_id %x, item_id %x, action %x, state %x",
2229  msg->descr, msg->hwnd, dis->CtlType, dis->CtlID,
2230  dis->itemID, dis->itemAction, dis->itemState);
2231 
2232  di.u.lp = 0;
2233  di.u.item.type = dis->CtlType;
2234  di.u.item.ctl_id = dis->CtlID;
2235  if (dis->CtlType == ODT_LISTBOX ||
2236  dis->CtlType == ODT_COMBOBOX ||
2237  dis->CtlType == ODT_MENU)
2238  di.u.item.item_id = dis->itemID;
2239  di.u.item.action = dis->itemAction;
2240  di.u.item.state = dis->itemState;
2241 
2242  seq->lParam = di.u.lp;
2243  break;
2244  }
2245 
2246  case WM_MEASUREITEM:
2247  {
2249  MEASUREITEMSTRUCT *mis = (MEASUREITEMSTRUCT *)msg->lParam;
2250  BOOL is_unicode_data = TRUE;
2251 
2252  sprintf( seq->output, "%s: %p WM_MEASUREITEM: CtlType %#x, CtlID %#x, itemID %#x, itemData %#lx",
2253  msg->descr, msg->hwnd, mis->CtlType, mis->CtlID,
2254  mis->itemID, mis->itemData);
2255 
2256  if (mis->CtlType == ODT_LISTBOX)
2257  {
2258  HWND ctrl = GetDlgItem(msg->hwnd, mis->CtlID);
2259  is_unicode_data = GetWindowLongA(ctrl, GWL_STYLE) & LBS_HASSTRINGS;
2260  }
2261 
2262  mi.u.wp = 0;
2263  mi.u.item.CtlType = mis->CtlType;
2264  mi.u.item.CtlID = mis->CtlID;
2265  mi.u.item.itemID = mis->itemID;
2266  mi.u.item.wParam = msg->wParam;
2267  seq->wParam = mi.u.wp;
2268  if (is_unicode_data)
2269  seq->lParam = mis->itemData ? hash_Ly_W((const WCHAR *)mis->itemData) : 0;
2270  else
2271  seq->lParam = mis->itemData ? hash_Ly((const char *)mis->itemData) : 0;
2272  break;
2273  }
2274 
2275  case WM_COMPAREITEM:
2276  {
2277  COMPAREITEMSTRUCT *cis = (COMPAREITEMSTRUCT *)msg->lParam;
2278  HWND ctrl = GetDlgItem(msg->hwnd, cis->CtlID);
2279  BOOL is_unicode_data = TRUE;
2280 
2281  ok(msg->wParam == cis->CtlID, "expected %#x, got %#lx\n", cis->CtlID, msg->wParam);
2282  ok(cis->hwndItem == ctrl, "expected %p, got %p\n", ctrl, cis->hwndItem);
2283  ok((int)cis->itemID1 >= 0, "expected >= 0, got %d\n", cis->itemID1);
2284  ok((int)cis->itemID2 == -1, "expected -1, got %d\n", cis->itemID2);
2285 
2286  sprintf( seq->output, "%s: %p WM_COMPAREITEM: CtlType %#x, CtlID %#x, itemID1 %#x, itemData1 %#lx, itemID2 %#x, itemData2 %#lx",
2287  msg->descr, msg->hwnd, cis->CtlType, cis->CtlID,
2288  cis->itemID1, cis->itemData1, cis->itemID2, cis->itemData2);
2289 
2290  if (cis->CtlType == ODT_LISTBOX)
2291  is_unicode_data = GetWindowLongA(ctrl, GWL_STYLE) & LBS_HASSTRINGS;
2292 
2293  if (is_unicode_data)
2294  {
2295  seq->wParam = cis->itemData1 ? hash_Ly_W((const WCHAR *)cis->itemData1) : 0;
2296  seq->lParam = cis->itemData2 ? hash_Ly_W((const WCHAR *)cis->itemData2) : 0;
2297  }
2298  else
2299  {
2300  seq->wParam = cis->itemData1 ? hash_Ly((const char *)cis->itemData1) : 0;
2301  seq->lParam = cis->itemData2 ? hash_Ly((const char *)cis->itemData2) : 0;
2302  }
2303  break;
2304  }
2305 
2306  default:
2307  if (msg->message >= 0xc000) return; /* ignore registered messages */
2308  sprintf( seq->output, "%s: %p %04x wp %08lx lp %08lx",
2309  msg->descr, msg->hwnd, msg->message, msg->wParam, msg->lParam );
2310  }
2311  if (msg->flags & (sent|posted|parent|defwinproc|beginpaint))
2312  sprintf( seq->output + strlen(seq->output), " (flags %x)", msg->flags );
2313  }
2314  }
2315 }
int line
Definition: msg.c:169
LPARAM lp
Definition: msg.c:99
#define TRUE
Definition: types.h:120
Definition: msg.c:142
#define ODT_COMBOBOX
Definition: winuser.h:2493
static const char * get_winpos_flags(UINT flags)
Definition: msg.c:2084
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define LBS_HASSTRINGS
Definition: pedump.c:684
#define ODT_MENU
Definition: winuser.h:2491
HWND hwndInsertAfter
Definition: winuser.h:3531
#define assert(x)
Definition: debug.h:53
ULONG_PTR itemData2
Definition: winuser.h:2949
HWND hwnd
Definition: msg.c:166
static MONITORINFO mi
Definition: win.c:7331
#define HCBT_SETFOCUS
Definition: winuser.h:64
Definition: msg.c:149
#define SWP_NOZORDER
Definition: winuser.h:1232
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define sprintf(buf, format,...)
Definition: sprintf.c:55
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
unsigned int BOOL
Definition: ntddk_ex.h:94
static struct recvd_message * sequence
Definition: msg.c:2033
UINT flags
Definition: winuser.h:3536
static CRITICAL_SECTION sequence_cs
Definition: msg.c:2035
#define ctrl
Definition: input.c:1669
#define ok(value,...)
Definition: CComObject.cpp:34
static int sequence_cnt
Definition: msg.c:2032
ULONG_PTR itemData1
Definition: winuser.h:2947
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static unsigned hash_Ly(const char *str)
Definition: msg.c:2132
static unsigned hash_Ly_W(const WCHAR *str)
Definition: msg.c:2122
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define WM_MEASUREITEM
Definition: winuser.h:1628
char output[512]
Definition: msg.c:171
char line[200]
Definition: main.c:97
ULONG_PTR itemData
Definition: winuser.h:3588
struct DRAW_ITEM_STRUCT::@1654::@1655 item
UINT message
Definition: msg.c:164
static int sequence_size
Definition: msg.c:2032
#define GWL_STYLE
Definition: winuser.h:846
WPARAM wParam
Definition: msg.c:167
#define WM_COMPAREITEM
Definition: winuser.h:1637
#define HeapReAlloc
Definition: compat.h:393
msg_flags_t flags
Definition: msg.c:165
#define ODT_LISTBOX
Definition: winuser.h:2492
#define WM_DRAWITEM
Definition: winuser.h:1627
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
#define msg(x)
Definition: auth_time.c:54
union DRAW_ITEM_STRUCT::@1654 u
const char * descr
Definition: msg.c:170
LPARAM lParam
Definition: msg.c:168
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: msg.c:141
Definition: msg.c:143

◆ apc_test_proc()

static void CALLBACK apc_test_proc ( ULONG_PTR  param)
static

Definition at line 4969 of file msg.c.

4970 {
4971  /* nothing */
4972 }

Referenced by test_MsgWaitForMultipleObjects().

◆ BOOL()

static BOOL ( WINAPI pActivateActCtx)
static

Referenced by init_tests(), and START_TEST().

◆ broadcast_test_proc()

static LRESULT WINAPI broadcast_test_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 15563 of file msg.c.

15564 {
15566 
15567  if (wParam == 0xbaadbeef)
15569  else
15570  g_broadcast_lparam = 0;
15571 
15572  return CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
15573 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static LPARAM g_broadcast_lparam
Definition: msg.c:15562
Definition: tftpd.h:59
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GWLP_USERDATA
Definition: treelist.c:63
#define GetWindowLongPtrA
Definition: winuser.h:4697
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
LPARAM lParam
Definition: combotst.c:139

Referenced by test_broadcast().

◆ button_hook_proc()

static LRESULT CALLBACK button_hook_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 6223 of file msg.c.

6224 {
6225  static LONG defwndproc_counter = 0;
6226  LRESULT ret;
6227  struct recvd_message msg;
6228 
6229  if (ignore_message( message )) return 0;
6230 
6231  switch (message)
6232  {
6233  case WM_SYNCPAINT:
6234  break;
6235  case BM_SETSTATE:
6236  if (GetCapture())
6237  ok(GetCapture() == hwnd, "GetCapture() = %p\n", GetCapture());
6238 
6240  goto log_it;
6241 
6242  case WM_GETDLGCODE:
6243  if (lParam)
6244  {
6245  MSG *msg = (MSG *)lParam;
6246  lParam = MAKELPARAM(msg->message, msg->wParam);
6247  }
6249  goto log_it;
6250 
6251  case BM_SETCHECK:
6252  case BM_GETCHECK:
6254  /* fall through */
6255 log_it:
6256  default:
6257  msg.hwnd = hwnd;
6258  msg.message = message;
6259  msg.flags = sent|wparam|lparam;
6260  if (defwndproc_counter) msg.flags |= defwinproc;
6261  msg.wParam = wParam;
6262  msg.lParam = lParam;
6263  msg.descr = "button";
6264  add_message(&msg);
6265  }
6266 
6267  defwndproc_counter++;
6269  defwndproc_counter--;
6270 
6271  return ret;
6272 }
#define WM_SYNCPAINT
Definition: winuser.h:1672
static ULONG_PTR
Definition: msg.c:81
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define BM_SETSTATE
Definition: winuser.h:1884
Definition: tftpd.h:59
#define WM_GETDLGCODE
Definition: winuser.h:1671
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
long LONG
Definition: pedump.c:60
HWND WINAPI GetCapture(void)
Definition: message.c:2879
#define BM_GETCHECK
Definition: winuser.h:1879
#define ok(value,...)
Definition: CComObject.cpp:34
#define BM_SETCHECK
Definition: winuser.h:1882
Definition: msg.c:145
static WNDPROC old_button_proc
Definition: msg.c:6221
int ret
#define add_message(msg)
Definition: msg.c:2142
#define msg(x)
Definition: auth_time.c:54
LONG_PTR LRESULT
Definition: windef.h:209
HMENU WINAPI GetMenu(_In_ HWND)
LPARAM lParam
Definition: combotst.c:139
Definition: msg.c:144
Definition: msg.c:141

Referenced by subclass_button().

◆ callback_count()

static void CALLBACK callback_count ( HWND  hwnd,
UINT  uMsg,
UINT_PTR  idEvent,
DWORD  dwTime 
)
static

Definition at line 10007 of file msg.c.

10008 {
10009  count++;
10010 }
GLuint GLuint GLsizei count
Definition: gl.h:1545

Referenced by test_timers(), and test_timers_no_wnd().

◆ callback_exception()

static void CALLBACK callback_exception ( HWND  hwnd,
UINT  uMsg,
UINT_PTR  idEvent,
DWORD  dwTime 
)
static

Definition at line 10013 of file msg.c.

10014 {
10015  count++;
10016  RaiseException(exception, 0, 0, NULL);
10017 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
smooth NULL
Definition: ftsmooth.c:416
VOID WINAPI RaiseException(IN DWORD dwExceptionCode, IN DWORD dwExceptionFlags, IN DWORD nNumberOfArguments, IN CONST ULONG_PTR *lpArguments OPTIONAL)
Definition: except.c:693

Referenced by test_timers_exception().

◆ cancel_init_proc()

static LRESULT WINAPI cancel_init_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 16985 of file msg.c.

16986 {
16987  if (ignore_message( message )) return 0;
16988 
16989  switch (message) {
16990  case WM_ENTERMENULOOP:
16991  ok(EndMenu() == TRUE, "EndMenu() failed\n");
16992  break;
16993  }
16994 
16995  return MsgCheckProc (FALSE, hwnd, message, wParam, lParam);
16996 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
WPARAM wParam
Definition: combotst.c:138
static LRESULT MsgCheckProc(BOOL unicode, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: msg.c:9212
#define WM_ENTERMENULOOP
Definition: winuser.h:1780
#define ok(value,...)
Definition: CComObject.cpp:34
BOOL WINAPI EndMenu(void)
LPARAM lParam
Definition: combotst.c:139

Referenced by test_TrackPopupMenu().

◆ cancel_popup_proc()

static LRESULT WINAPI cancel_popup_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 16963 of file msg.c.

16964 {
16965  if (ignore_message( message )) return 0;
16966 
16967  switch (message) {
16968  case WM_ENTERIDLE:
16969  todo_wine ok(GetCapture() == hwnd, "expected %p, got %p\n", hwnd, GetCapture());
16970  EndMenu();
16971  break;
16972  case WM_INITMENU:
16973  case WM_INITMENUPOPUP:
16974  case WM_UNINITMENUPOPUP:
16975  ok((HMENU)wParam == hpopupmenu, "expected %p, got %lx\n", hpopupmenu, wParam);
16976  break;
16977  case WM_CAPTURECHANGED:
16978  todo_wine ok(!lParam || (HWND)lParam == hwnd, "lost capture to %lx\n", lParam);
16979  break;
16980  }
16981 
16982  return MsgCheckProc (FALSE, hwnd, message, wParam, lParam);
16983 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
#define WM_INITMENUPOPUP
Definition: winuser.h:1722
#define WM_CAPTURECHANGED
Definition: winuser.h:1784
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
WPARAM wParam
Definition: combotst.c:138
static LRESULT MsgCheckProc(BOOL unicode, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: msg.c:9212
HWND WINAPI GetCapture(void)
Definition: message.c:2879
static HMENU hpopupmenu
Definition: msg.c:16961
#define ok(value,...)
Definition: CComObject.cpp:34
#define WM_ENTERIDLE
Definition: winuser.h:1725
#define todo_wine
Definition: test.h:154
#define WM_INITMENU
Definition: winuser.h:1721
BOOL WINAPI EndMenu(void)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139

Referenced by test_TrackPopupMenu(), and test_TrackPopupMenuEmpty().

◆ cbt_global_hook_proc()

static LRESULT CALLBACK cbt_global_hook_proc ( int  nCode,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 10320 of file msg.c.

10321 {
10322  HWND hwnd;
10323  char buf[256];
10324 
10325  if (nCode == HCBT_SYSCOMMAND)
10326  {
10327  struct recvd_message msg;
10328 
10329  msg.hwnd = 0;
10330  msg.message = nCode;
10331  msg.flags = hook|wparam|lparam;
10332  msg.wParam = wParam;
10333  msg.lParam = (cbt_global_hook_thread_id == GetCurrentThreadId()) ? 1 : 2;
10334  msg.descr = "CBT_2";
10335  add_message(&msg);
10336 
10337  return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam);
10338  }
10339  /* WH_MOUSE_LL hook */
10340  if (nCode == HC_ACTION)
10341  {
10343 
10344  /* we can't test for real mouse events */
10345  if (mhll->flags & LLMHF_INJECTED)
10346  {
10347  struct recvd_message msg;
10348 
10349  memset (&msg, 0, sizeof (msg));
10350  msg.message = wParam;
10351  msg.flags = hook;
10352  msg.descr = "CBT_2";
10353  add_message(&msg);
10354  }
10355  return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam);
10356  }
10357 
10358  /* Log also SetFocus(0) calls */
10359  hwnd = wParam ? (HWND)wParam : (HWND)lParam;
10360 
10361  if (GetClassNameA(hwnd, buf, sizeof(buf)))
10362  {
10363  if (!lstrcmpiA(buf, "TestWindowClass") ||
10364  !lstrcmpiA(buf, "static"))
10365  {
10366  struct recvd_message msg;
10367 
10368  msg.hwnd = hwnd;
10369  msg.message = nCode;
10370  msg.flags = hook|wparam|lparam;
10371  msg.wParam = wParam;
10372  msg.lParam = (cbt_global_hook_thread_id == GetCurrentThreadId()) ? 1 : 2;
10373  msg.descr = "CBT_2";
10374  add_message(&msg);
10375  }
10376  }
10377  return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam);
10378 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HCBT_SYSCOMMAND
Definition: winuser.h:63
static DWORD cbt_global_hook_thread_id
Definition: msg.c:10318
int WINAPI GetClassNameA(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPSTR lpClassName, _In_ int nMaxCount)
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
Definition: msg.c:149
WPARAM wParam
Definition: combotst.c:138
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:421
#define LLMHF_INJECTED
Definition: winuser.h:2603
Definition: msg.c:145
static HWND
Definition: msg.c:2040
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
#define add_message(msg)
Definition: msg.c:2142
static HHOOK hCBT_global_hook
Definition: msg.c:10317
#define HC_ACTION
Definition: winuser.h:48
#define msg(x)
Definition: auth_time.c:54
#define memset(x, y, z)
Definition: compat.h:39
LPARAM lParam
Definition: combotst.c:139
Definition: msg.c:144

Referenced by test_winevents().

◆ cbt_global_hook_thread_proc()

static DWORD WINAPI cbt_global_hook_thread_proc ( void param)
static

Definition at line 10409 of file msg.c.

10410 {
10411  HWND hwnd;
10412  MSG msg;
10413  HANDLE hevent = *(HANDLE *)param;
10414 
10415  flush_sequence();
10416  /* these events should be received only by our new hook proc,
10417  * an old one does not expect an event from another thread.
10418  */
10419 
10420  hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0,0,0,0,0,0,0, NULL);
10421  assert(hwnd);
10422  trace("created thread window %p\n", hwnd);
10423 
10424  *(HWND *)param = hwnd;
10425 
10426  /* Windows doesn't like when a thread plays games with the focus,
10427  that leads to all kinds of misbehaviours and failures to activate
10428  a window. So, better keep next lines commented out.
10429  SetFocus(0);
10430  SetFocus(hwnd);*/
10431 
10434 
10435  SetEvent(hevent);
10436 
10437  while (GetMessageA(&msg, 0, 0, 0))
10438  {
10441  }
10442  return 0;
10443 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define trace(...)
Definition: kmt_test.h:217
static void flush_sequence(void)
Definition: msg.c:2333
BOOL WINAPI TranslateMessage(_In_ const MSG *)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define assert(x)
Definition: debug.h:53
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
static HANDLE hevent
Definition: broadcast.c:38
smooth NULL
Definition: ftsmooth.c:416
GLfloat param
Definition: glext.h:5796
#define SC_PREVWINDOW
Definition: winuser.h:2545
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_POPUP
Definition: pedump.c:616
#define msg(x)
Definition: auth_time.c:54
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define SC_NEXTWINDOW
Definition: winuser.h:2544
#define WM_SYSCOMMAND
Definition: winuser.h:1717

Referenced by test_winevents().

◆ cbt_hook_proc()

static LRESULT CALLBACK cbt_hook_proc ( int  nCode,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 9740 of file msg.c.

9741 {
9742  HWND hwnd;
9743 
9744  ok(cbt_hook_thread_id == GetCurrentThreadId(), "we didn't ask for events from other threads\n");
9745 
9746  if (nCode == HCBT_CLICKSKIPPED)
9747  {
9748  /* ignore this event, XP sends it a lot when switching focus between windows */
9749  return CallNextHookEx(hCBT_hook, nCode, wParam, lParam);
9750  }
9751 
9752  if (nCode == HCBT_SYSCOMMAND || nCode == HCBT_KEYSKIPPED)
9753  {
9754  struct recvd_message msg;
9755 
9756  msg.hwnd = 0;
9757  msg.message = nCode;
9758  msg.flags = hook|wparam|lparam;
9759  msg.wParam = wParam;
9760  msg.lParam = lParam;
9761  msg.descr = "CBT";
9762  add_message(&msg);
9763 
9764  return CallNextHookEx(hCBT_hook, nCode, wParam, lParam);
9765  }
9766 
9767  if (nCode == HCBT_DESTROYWND)
9768  {
9770  {
9772  if (style & WS_CHILD)
9774  else if (style & WS_POPUP)
9775  lParam = WND_POPUP_ID;
9776  else
9778  }
9779  }
9780 
9781  /* Log also SetFocus(0) calls */
9782  hwnd = wParam ? (HWND)wParam : (HWND)lParam;
9783 
9785  {
9786  struct recvd_message msg;
9787 
9788  msg.hwnd = hwnd;
9789  msg.message = nCode;
9790  msg.flags = hook|wparam|lparam;
9791  msg.wParam = wParam;
9792  msg.lParam = lParam;
9793  msg.descr = "CBT";
9794  add_message(&msg);
9795  }
9796  return CallNextHookEx(hCBT_hook, nCode, wParam, lParam);
9797 }
#define HCBT_CLICKSKIPPED
Definition: winuser.h:61
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HCBT_SYSCOMMAND
Definition: winuser.h:63
#define WND_PARENT_ID
Definition: msg.c:59
static HHOOK hCBT_hook
Definition: msg.c:122
#define WS_CHILD
Definition: pedump.c:617
Definition: msg.c:149
WPARAM wParam
Definition: combotst.c:138
static BOOL test_DestroyWindow_flag
Definition: msg.c:119
#define HCBT_KEYSKIPPED
Definition: winuser.h:62
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define HCBT_DESTROYWND
Definition: winuser.h:59
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:421
#define ok(value,...)
Definition: CComObject.cpp:34
#define GetWindowLongPtrA
Definition: winuser.h:4697
static BOOL is_our_logged_class(HWND hwnd)
Definition: msg.c:9712
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: msg.c:145
static DWORD cbt_hook_thread_id
Definition: msg.c:123
static HWND
Definition: msg.c:2040
#define GWL_STYLE
Definition: winuser.h:846
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
#define add_message(msg)
Definition: msg.c:2142
#define WS_POPUP
Definition: pedump.c:616
#define msg(x)
Definition: auth_time.c:54
Arabic default style
Definition: afstyles.h:93
#define WND_POPUP_ID
Definition: msg.c:60
LPARAM lParam
Definition: combotst.c:139
Definition: msg.c:144
#define GWLP_ID
Definition: winuser.h:854

Referenced by init_tests(), START_TEST(), and test_set_hook().

◆ check_lb_state_dbg()

static void check_lb_state_dbg ( HWND  listbox,
int  count,
int  cur_sel,
int  caret_index,
int  top_index,
int  line 
)
static

Definition at line 14654 of file msg.c.

14656 {
14657  LRESULT ret;
14658 
14659  /* calling an orig proc helps to avoid unnecessary message logging */
14660  ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCOUNT, 0, 0);
14661  ok_(__FILE__, line)(ret == count, "expected count %d, got %ld\n", count, ret);
14662  ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCURSEL, 0, 0);
14663  ok_(__FILE__, line)(ret == cur_sel, "expected cur sel %d, got %ld\n", cur_sel, ret);
14664  ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCARETINDEX, 0, 0);
14665  ok_(__FILE__, line)(ret == caret_index ||
14666  broken(cur_sel == -1 && caret_index == 0 && ret == -1), /* nt4 */
14667  "expected caret index %d, got %ld\n", caret_index, ret);
14668  ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETTOPINDEX, 0, 0);
14669  ok_(__FILE__, line)(ret == top_index, "expected top index %d, got %ld\n", top_index, ret);
14670 }
DWORD broken
Definition: msg.c:15681
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Definition: parser.c:48
#define LB_GETCOUNT
Definition: winuser.h:1999
static int count
Definition: msg.c:10006
int ret
#define LB_GETTOPINDEX
Definition: winuser.h:2012
#define LB_GETCARETINDEX
Definition: winuser.h:1998
#define LB_GETCURSEL
Definition: winuser.h:2000
LONG_PTR LRESULT
Definition: windef.h:209
#define ok_(x1, x2)
Definition: CString.cpp:56

◆ check_update_rgn()

static void check_update_rgn ( HWND  hwnd,
HRGN  hrgn 
)
static

Definition at line 7612 of file msg.c.

7613 {
7614  INT ret;
7615  RECT r1, r2;
7616  HRGN tmp = CreateRectRgn( 0, 0, 0, 0 );
7617  HRGN update = CreateRectRgn( 0, 0, 0, 0 );
7618 
7619  ret = GetUpdateRgn( hwnd, update, FALSE );
7620  ok( ret != ERROR, "GetUpdateRgn failed\n" );
7621  if (ret == NULLREGION)
7622  {
7623  ok( !hrgn, "Update region shouldn't be empty\n" );
7624  }
7625  else
7626  {
7627  if (CombineRgn( tmp, hrgn, update, RGN_XOR ) != NULLREGION)
7628  {
7629  ok( 0, "Regions are different\n" );
7630  if (winetest_debug > 0)
7631  {
7632  printf( "Update region: " );
7633  dump_region( update );
7634  printf( "Wanted region: " );
7635  dump_region( hrgn );
7636  }
7637  }
7638  }
7639  GetRgnBox( update, &r1 );
7640  GetUpdateRect( hwnd, &r2, FALSE );
7641  ok( EqualRect( &r1, &r2 ), "Rectangles are different: %s / %s\n", wine_dbgstr_rect( &r1 ),
7642  wine_dbgstr_rect( &r2 ));
7643 
7644  DeleteObject( tmp );
7645  DeleteObject( update );
7646 }
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define ERROR(name)
Definition: error_private.h:53
static DNS_RECORDW r1
Definition: record.c:37
#define NULLREGION
Definition: wingdi.h:360
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
int winetest_debug
int32_t INT
Definition: typedefs.h:56
#define RGN_XOR
Definition: wingdi.h:359
int WINAPI GetUpdateRgn(_In_ HWND, _In_ HRGN, _In_ BOOL)
#define ok(value,...)
Definition: CComObject.cpp:34
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
void dump_region(HRGN hrgn)
Definition: msg.c:7591
static DNS_RECORDW r2
Definition: record.c:38
const char * wine_dbgstr_rect(const RECT *rect)
int ret
static HRGN hrgn
Definition: win.c:55
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
#define printf
Definition: config.h:203

Referenced by test_paint_messages().

◆ cleanup_tests()

static void cleanup_tests ( )
static

Definition at line 17540 of file msg.c.

17541 {
17542  BOOL ret;
17544  if (pUnhookWinEvent && hEvent_hook)
17545  {
17546  ret = pUnhookWinEvent(hEvent_hook);
17547  ok( ret, "UnhookWinEvent error %d\n", GetLastError());
17548  SetLastError(0xdeadbeef);
17549  ok(!pUnhookWinEvent(hEvent_hook), "UnhookWinEvent succeeded\n");
17550  ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */
17551  GetLastError() == 0xdeadbeef, /* Win9x */
17552  "unexpected error %d\n", GetLastError());
17553  }
17555 
17556 }
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
static HHOOK hCBT_hook
Definition: msg.c:122
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
unsigned int BOOL
Definition: ntddk_ex.h:94
static CRITICAL_SECTION sequence_cs
Definition: msg.c:2035
#define ok(value,...)
Definition: CComObject.cpp:34
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define SetLastError(x)
Definition: compat.h:409
int ret
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
static HWINEVENTHOOK hEvent_hook
Definition: msg.c:120

Referenced by START_TEST().

◆ clear_clipboard_()

static void clear_clipboard_ ( int  line,
HWND  hWnd 
)
static

Definition at line 15337 of file msg.c.

15338 {
15339  BOOL succ;
15340  succ = OpenClipboard(hWnd);
15341  ok_(__FILE__, line)(succ, "OpenClipboard failed, err=%u\n", GetLastError());
15342  succ = EmptyClipboard();
15343  ok_(__FILE__, line)(succ, "EmptyClipboard failed, err=%u\n", GetLastError());
15344  succ = CloseClipboard();
15345  ok_(__FILE__, line)(succ, "CloseClipboard failed, err=%u\n", GetLastError());
15346 }
HWND hWnd
Definition: settings.c:17
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: parser.c:48
BOOL WINAPI EmptyClipboard(void)
Definition: ntwrapper.h:190
BOOL WINAPI CloseClipboard(void)
Definition: ntwrapper.h:178
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
#define ok_(x1, x2)
Definition: CString.cpp:56

◆ combobox_edit_subclass_proc()

static LRESULT CALLBACK combobox_edit_subclass_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 7267 of file msg.c.

7269 {
7270  static LONG defwndproc_counter = 0;
7271  LRESULT ret;
7272  struct recvd_message msg;
7273 
7274  /* do not log painting messages */
7275  if (message != WM_PAINT &&
7276  message != WM_NCPAINT &&
7277  message != WM_SYNCPAINT &&
7278  message != WM_ERASEBKGND &&
7279  message != WM_NCHITTEST &&
7280  message != WM_GETTEXT &&
7281  !ignore_message( message ))
7282  {
7283  msg.hwnd = hwnd;
7284  msg.message = message;
7285  msg.flags = sent|wparam|lparam;
7286  if (defwndproc_counter) msg.flags |= defwinproc;
7287  msg.wParam = wParam;
7288  msg.lParam = lParam;
7289  msg.descr = "combo edit";
7290  add_message(&msg);
7291  }
7292 
7293  defwndproc_counter++;
7295  defwndproc_counter--;
7296 
7297  return ret;
7298 }
#define WM_SYNCPAINT
Definition: winuser.h:1672
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
#define WM_GETTEXT
Definition: winuser.h:1600
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
#define WM_NCHITTEST
Definition: winuser.h:1668
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NCPAINT
Definition: winuser.h:1669
long LONG
Definition: pedump.c:60
Definition: msg.c:145
#define WM_PAINT
Definition: winuser.h:1602
int ret
#define add_message(msg)
Definition: msg.c:2142
static WNDPROC edit_window_proc
Definition: msg.c:7265
#define msg(x)
Definition: auth_time.c:54
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
Definition: msg.c:144
Definition: msg.c:141

Referenced by test_combobox_messages().

◆ combobox_hook_proc()

static LRESULT CALLBACK combobox_hook_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 7332 of file msg.c.

7333 {
7334  static LONG defwndproc_counter = 0;
7335  LRESULT ret;
7336  struct recvd_message msg;
7337 
7338  /* do not log painting messages */
7339  if (message != WM_PAINT &&
7340  message != WM_NCPAINT &&
7341  message != WM_SYNCPAINT &&
7342  message != WM_ERASEBKGND &&
7343  message != WM_NCHITTEST &&
7344  message != WM_GETTEXT &&
7345  !ignore_message( message ))
7346  {
7347  msg.hwnd = hwnd;
7348  msg.message = message;
7349  msg.flags = sent|wparam|lparam;
7350  if (defwndproc_counter) msg.flags |= defwinproc;
7351  msg.wParam = wParam;
7352  msg.lParam = lParam;
7353  msg.descr = "combo";
7354  add_message(&msg);
7355  }
7356 
7357  defwndproc_counter++;
7359  defwndproc_counter--;
7360 
7361  return ret;
7362 }
#define WM_SYNCPAINT
Definition: winuser.h:1672
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static WNDPROC old_combobox_proc
Definition: msg.c:7265
Definition: tftpd.h:59
#define WM_GETTEXT
Definition: winuser.h:1600
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
#define WM_NCHITTEST
Definition: winuser.h:1668
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NCPAINT
Definition: winuser.h:1669
long LONG
Definition: pedump.c:60
Definition: msg.c:145
#define WM_PAINT
Definition: winuser.h:1602
int ret
#define add_message(msg)
Definition: msg.c:2142
#define msg(x)
Definition: auth_time.c:54
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
Definition: msg.c:144
Definition: msg.c:141

Referenced by subclass_combobox().

◆ combobox_lbox_subclass_proc()

static LRESULT CALLBACK combobox_lbox_subclass_proc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 7300 of file msg.c.

7302 {
7303  static LONG defwndproc_counter = 0;
7304  LRESULT ret;
7305  struct recvd_message msg;
7306 
7307  /* do not log painting messages */
7308  if (message != WM_PAINT &&
7309  message != WM_NCPAINT &&
7310  message != WM_SYNCPAINT &&
7311  message != WM_ERASEBKGND &&
7312  message != WM_NCHITTEST &&
7313  !ignore_message( message ))
7314  {
7315  msg.hwnd = hwnd;
7316  msg.message = message;
7317  msg.flags = sent|wparam|lparam;
7318  if (defwndproc_counter) msg.flags |= defwinproc;
7319  msg.wParam = wParam;
7320  msg.lParam = lParam;
7321  msg.descr = "combo lbox";
7322  add_message(&msg);
7323  }
7324 
7325  defwndproc_counter++;
7327  defwndproc_counter--;
7328 
7329  return ret;
7330 }
#define WM_SYNCPAINT
Definition: winuser.h:1672
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
#define WM_NCHITTEST
Definition: winuser.h:1668
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NCPAINT
Definition: winuser.h:1669
long LONG
Definition: pedump.c:60
Definition: msg.c:145
#define WM_PAINT
Definition: winuser.h:1602
int ret
static WNDPROC lbox_window_proc
Definition: msg.c:7265
#define add_message(msg)
Definition: msg.c:2142
#define msg(x)
Definition: auth_time.c:54
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
Definition: msg.c:144
Definition: msg.c:141

Referenced by test_combobox_messages().

◆ create_child_thread()

static DWORD CALLBACK create_child_thread ( void param)
static

Definition at line 8405 of file msg.c.

8406 {
8407  struct wnd_event *wnd_event = param;
8408  struct wnd_event child_event;
8409  DWORD ret, tid;
8410  MSG msg;
8411 
8412  child_event.hwnd = CreateWindowExA(0, "TestWindowClass", "Test child",
8413  WS_CHILD | WS_VISIBLE, 0, 0, 10, 10, wnd_event->hwnd, 0, 0, NULL);
8414  ok (child_event.hwnd != 0, "Failed to create child window\n");
8415  SetFocus( child_event.hwnd );
8416  flush_events();
8417  flush_sequence();
8418  child_event.start_event = wnd_event->start_event;
8420  for (;;)
8421  {
8422  DWORD ret = MsgWaitForMultipleObjects(1, &child_event.start_event, FALSE, 1000, QS_SENDMESSAGE);
8423  if (ret != 1) break;
8424  while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
8425  }
8427  ok( !ret, "WaitForSingleObject failed %x\n", ret );
8428  return 0;
8429 }
HANDLE grand_child
Definition: msg.c:8356
static void flush_sequence(void)
Definition: msg.c:2333
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
static DWORD CALLBACK create_grand_child_thread(void *param)
Definition: msg.c:8383
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HWND WINAPI SetFocus(_In_opt_ HWND)
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
static void flush_events(void)
Definition: msg.c:2318
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HWND hwnd
Definition: input.c:2504
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:112
smooth NULL
Definition: ftsmooth.c:416
#define QS_SENDMESSAGE
Definition: winuser.h:892
#define ok(value,...)
Definition: CComObject.cpp:34
HANDLE stop_event
Definition: msg.c:8358
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE start_event
Definition: input.c:2506
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
int ret
#define msg(x)
Definition: auth_time.c:54
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define PM_REMOVE
Definition: winuser.h:1182
#define WS_VISIBLE
Definition: pedump.c:620
static TfClientId tid

Referenced by test_interthread_messages().

◆ create_grand_child_thread()

static DWORD CALLBACK create_grand_child_thread ( void param)
static

Definition at line 8383 of file msg.c.

8384 {
8385  struct wnd_event *wnd_event = param;
8386  HWND hchild;
8387  MSG msg;
8388 
8389  hchild = CreateWindowExA(0, "TestWindowClass", "Test child",
8390  WS_CHILD | WS_VISIBLE, 0, 0, 10, 10, wnd_event->hwnd, 0, 0, NULL);
8391  ok (hchild != 0, "Failed to create child window\n");
8392  flush_events();
8393  flush_sequence();
8395 
8396  for (;;)
8397  {
8399  if (!IsWindow( hchild )) break; /* will be destroyed when parent thread exits */
8400  while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
8401  }
8402  return 0;
8403 }
static void flush_sequence(void)
Definition: msg.c:2333
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI IsWindow(_In_opt_ HWND)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
static void flush_events(void)
Definition: msg.c:2318
HWND hwnd
Definition: input.c:2504
smooth NULL
Definition: ftsmooth.c:416
#define ok(value,...)
Definition: CComObject.cpp:34
GLfloat param
Definition: glext.h:5796
HANDLE start_event
Definition: input.c:2506
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
#define QS_ALLINPUT
Definition: winuser.h:874
#define msg(x)
Definition: auth_time.c:54
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define PM_REMOVE
Definition: winuser.h:1182
#define WS_VISIBLE
Definition: pedump.c:620

Referenced by create_child_thread().

◆ create_manifest_file()

static void create_manifest_file ( const char filename,
const char manifest 
)
static

Definition at line 8447 of file msg.c.

8448 {
8449  WCHAR path[MAX_PATH];
8450  HANDLE file;
8451  DWORD size;
8452 
8455  ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError());
8457  CloseHandle(file);
8458 }
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define CloseHandle
Definition: compat.h:398
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define CP_ACP
Definition: compat.h:99
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
const char * filename
Definition: ioapi.h:135
#define GENERIC_WRITE
Definition: nt_native.h:90
smooth NULL
Definition: ftsmooth.c:416
#define ok(value,...)
Definition: CComObject.cpp:34
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
const char file[]
Definition: icontest.c:11
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define CREATE_ALWAYS
Definition: disk.h:72
Definition: services.c:325
#define MultiByteToWideChar
Definition: compat.h:100
#define CreateFileW
Definition: compat.h:400
static const CHAR manifest[]
Definition: v6util.h:39
Definition: fci.c:126

Referenced by test_interthread_messages().

◆ DispatchMessageCheckProc()

static LRESULT WINAPI DispatchMessageCheckProc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 11063 of file msg.c.

11064 {
11065  if (message == WM_PAINT) return 0;
11066  return MsgCheckProcA( hwnd, message, wParam, lParam );
11067 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
WPARAM wParam
Definition: combotst.c:138
#define WM_PAINT
Definition: winuser.h:1602
static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: msg.c:9364
LPARAM lParam
Definition: combotst.c:139

Referenced by test_DispatchMessage().

◆ dlg_creation_edit_proc()

static LRESULT WINAPI dlg_creation_edit_proc ( HWND  hwnd,
UINT  message,
WPARAM  wp,
LPARAM  lp 
)
static

Definition at line 13331 of file msg.c.

13332 {
13333  struct recvd_message msg;
13334 
13335  if (ignore_message( message )) return 0;
13336 
13337  msg.hwnd = hwnd;
13338  msg.message = message;
13339  msg.flags = sent|wparam|lparam;
13340  msg.wParam = wp;
13341  msg.lParam = lp;
13342  msg.descr = "edit";
13343  add_message(&msg);
13344 
13345  return CallWindowProcW(orig_edit_proc, hwnd, message, wp, lp);
13346 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
Definition: tftpd.h:59
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
static BOOL ignore_message(UINT message)
Definition: msg.c:2110
static WNDPROC orig_edit_proc
Definition: msg.c:13330
Definition: msg.c:145
#define add_message(msg)
Definition: msg.c:2142
#define msg(x)
Definition: auth_time.c:54
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Definition: msg.c:144
Definition: msg.c:141

Referenced by test_dlg_proc2(), and test_dlg_proc4().

◆ do_wait_idle_child()

static void do_wait_idle_child ( int  arg)
static

Definition at line 15718 of file msg.c.

15719 {
15720  WNDCLASSA cls;
15721  MSG msg;
15722  HWND hwnd = 0;
15723  HANDLE thread;
15724  DWORD id;
15725  HANDLE start_event = OpenEventA( EVENT_ALL_ACCESS, FALSE, "test_WaitForInputIdle_start" );
15726  HANDLE end_event = OpenEventA( EVENT_ALL_ACCESS, FALSE, "test_WaitForInputIdle_end" );
15727 
15728  memset( &cls, 0, sizeof(cls) );
15730  cls.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
15731  cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
15732  cls.lpszClassName = "TestClass";
15733  RegisterClassA( &cls );
15734 
15735  PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ); /* create the msg queue */
15736 
15737  ok( start_event != 0, "failed to create start event, error %u\n", GetLastError() );
15738  ok( end_event != 0, "failed to create end event, error %u\n", GetLastError() );
15739 
15740  switch (arg)
15741  {
15742  case 0:
15743  SetEvent( start_event );
15744  break;
15745  case 1:
15746  SetEvent( start_event );
15747  Sleep( 200 );
15748  PeekMessageA( &msg, 0, 0, 0, PM_REMOVE );
15749  break;
15750  case 2:
15751  SetEvent( start_event );
15752  Sleep( 200 );
15753  PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE );
15754  PostThreadMessageA( GetCurrentThreadId(), WM_COMMAND, 0x1234, 0xabcd );
15755  PeekMessageA( &msg, 0, 0, 0, PM_REMOVE );
15756  break;
15757  case 3:
15758  SetEvent( start_event );
15759  Sleep( 200 );
15761  break;
15762  case 4:
15763  SetEvent( start_event );
15764  Sleep( 200 );
15765  hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL);
15766  while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE|PM_NOYIELD )) DispatchMessageA( &msg );
15767  break;
15768  case 5:
15769  SetEvent( start_event );
15770  Sleep( 200 );
15771  hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL);
15772  while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg );
15773  break;
15774  case 6:
15775  SetEvent( start_event );
15776  Sleep( 200 );
15777  hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL);
15778  while (PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ))
15779  {
15780  GetMessageA( &msg, 0, 0, 0 );
15781  DispatchMessageA( &msg );
15782  }
15783  break;
15784  case 7:
15785  SetEvent( start_event );
15786  Sleep( 200 );
15787  hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL);
15788  SetTimer( hwnd, 3, 1, NULL );
15789  Sleep( 200 );
15790  while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE|PM_NOYIELD )) DispatchMessageA( &msg );
15791  break;
15792  case 8:
15793  SetEvent( start_event );
15794  Sleep( 200 );
15795  PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE );
15797  break;
15798  case 9:
15799  SetEvent( start_event );
15800  Sleep( 200 );
15801  hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL);
15802  while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg );
15803  for (;;) GetMessageA( &msg, 0, 0, 0 );
15804  break;
15805  case 10:
15806  SetEvent( start_event );
15807  Sleep( 200 );
15808  hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL);
15809  SetTimer( hwnd, 3, 1, NULL );
15810  Sleep( 200 );
15811  while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg );
15812  break;
15813  case 11:
15814  SetEvent( start_event );
15815  Sleep( 200 );
15816  return; /* exiting the process makes WaitForInputIdle return success too */
15817  case 12:
15818  PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE );
15819  Sleep( 200 );
15821  SetEvent( start_event );
15822  break;
15823  case 13:
15824  SetEvent( start_event );
15825  PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE );
15826  Sleep( 200 );
15828  WaitForSingleObject( thread, 10000 );
15829  CloseHandle( thread );
15830  break;
15831  case 14:
15832  SetEvent( start_event );
15833  Sleep( 200 );
15835  break;
15836  case 15:
15837  SetEvent( start_event );
15838  Sleep( 200 );
15840  break;
15841  case 16:
15842  SetEvent( start_event );
15843  Sleep( 200 );
15845  break;
15846  case 17:
15847  SetEvent( start_event );
15848  Sleep( 200 );
15849  PeekMessageA( &msg, (HWND)0xdeadbeef, 0, 0, PM_NOREMOVE );
15850  break;
15851  case 18:
15852  SetEvent( start_event );
15853  Sleep( 200 );
15855  break;
15856  case 19:
15857  SetEvent( start_event );
15858  Sleep( 200 );
15860  break;
15861  case 20:
15862  SetEvent( start_event );
15863  Sleep( 200 );
15865  break;
15866  }
15867  WaitForSingleObject( end_event, 2000 );
15869  CloseHandle( end_event );
15870  if (hwnd) DestroyWindow( hwnd );
15871 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
#define CloseHandle
Definition: compat.h:398
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:736
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostThreadMessageA(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define HWND_TOPMOST
Definition: winuser.h:1194
HBRUSH hbrBackground
Definition: winuser.h:3123
#define HWND_MESSAGE
Definition: winuser.h:1196
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define COLOR_WINDOW
Definition: winuser.h:908
#define PM_NOREMOVE
Definition: winuser.h:1181
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
Definition: synch.c:615
#define EVENT_ALL_ACCESS
Definition: isotest.c:82
HCURSOR hCursor
Definition: winuser.h:3122
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:112
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:622
#define WM_WININICHANGE
Definition: winuser.h:1612
const char * LPCSTR
Definition: xmlstorage.h:183
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:421
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define ok(value,...)
Definition: CComObject.cpp:34
#define HWND_BOTTOM
Definition: winuser.h:1191
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
static HANDLE thread
Definition: service.c:33
#define WM_COMMAND
Definition: winuser.h:1716
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPCSTR lpszClassName
Definition: winuser.h:3125
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
static DWORD CALLBACK do_wait_idle_child_thread(void *arg)
Definition: msg.c:15708
#define QS_ALLINPUT
Definition: winuser.h:874
#define PM_NOYIELD
Definition: winuser.h:1183
#define WS_POPUP
Definition: pedump.c:616
WNDPROC lpfnWndProc
Definition: winuser.h:3117
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
GLenum GLuint id
Definition: glext.h:5579
#define HWND_NOTOPMOST
Definition: winuser.h:1192
#define PM_REMOVE
Definition: winuser.h:1182
#define WS_VISIBLE
Definition: pedump.c:620
#define memset(x, y, z)
Definition: compat.h:39
#define HWND_BROADCAST
Definition: winuser.h:1190
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
static HANDLE start_event
Definition: thread.c:140

Referenced by START_TEST().

◆ do_wait_idle_child_thread()

static DWORD CALLBACK do_wait_idle_child_thread ( void arg)
static

Definition at line 15708 of file msg.c.

15709 {
15710  MSG msg;
15711 
15712  PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE );
15713  Sleep( 200 );
15715  return 0;
15716 }
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:736
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_NOREMOVE
Definition: winuser.h:1181
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
#define QS_ALLINPUT
Definition: winuser.h:874
#define msg(x)
Definition: auth_time.c:54

Referenced by do_wait_idle_child().

◆ dump_region()

void dump_region ( HRGN  hrgn)

Definition at line 7591 of file msg.c.

7592 {
7593  DWORD i, size;
7594  RGNDATA *data = NULL;
7595  RECT *rect;
7596 
7597  if (!hrgn)
7598  {
7599  printf( "null region\n" );
7600  return;
7601  }
7602  if (!(size = GetRegionData( hrgn, 0, NULL ))) return;
7603  if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return;
7604  GetRegionData( hrgn, size, data );
7605  printf("%d rects:", data->rdh.nCount );
7606  for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++)
7607  printf( " %s", wine_dbgstr_rect( rect ));
7608  printf("\n");
7609  HeapFree( GetProcessHeap(), 0, data );
7610 }
& rect
Definition: startmenu.cpp:1413
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
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const char * wine_dbgstr_rect(const RECT *rect)
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HRGN hrgn
Definition: win.c:55
DWORD WINAPI GetRegionData(_In_ HRGN hrgn, _In_ DWORD nCount, _Out_writes_bytes_to_opt_(nCount, return) LPRGNDATA lpRgnData)
#define HeapFree(x, y, z)
Definition: compat.h:394
#define printf
Definition: config.h:203

Referenced by check_update_rgn(), test_scrolldc(), and test_scrollvalidate().

◆ dump_sequence()

static void dump_sequence ( const struct message expected,
const char context,
const char file,
int  line 
)
static

Definition at line 2342 of file msg.c.

2343 {
2344  const struct recvd_message *actual = sequence;
2345  unsigned int count = 0;
2346 
2347  trace_(file, line)("Failed sequence %s:\n", context );
2348  while (expected->message && actual->message)
2349  {
2350  if (actual->output[0])
2351  {
2352  if (expected->flags & hook)
2353  {
2354  trace_(file, line)( " %u: expected: hook %04x - actual: %s\n",
2355  count, expected->message, actual->output );
2356  }
2357  else if (expected->flags & winevent_hook)
2358  {
2359  trace_(file, line)( " %u: expected: winevent %04x - actual: %s\n",
2360  count, expected->message, actual->output );
2361  }
2362  else if (expected->flags & kbd_hook)
2363  {
2364  trace_(file, line)( " %u: expected: kbd %04x - actual: %s\n",
2365  count, expected->message, actual->output );
2366  }
2367  else
2368  {
2369  trace_(file, line)( " %u: expected: msg %04x - actual: %s\n",
2370  count, expected->message, actual->output );
2371  }
2372  }
2373 
2374  if (expected->message == actual->message)
2375  {
2376  if ((expected->flags & defwinproc) != (actual->flags & defwinproc) &&
2377  (expected->flags & optional))
2378  {
2379  /* don't match messages if their defwinproc status differs */
2380  expected++;
2381  }
2382  else
2383  {
2384  expected++;
2385  actual++;
2386  }
2387  }
2388  /* silently drop winevent messages if there is no support for them */
2389  else if ((expected->flags & optional) || ((expected->flags &