Please use defined names for wParam and a MAKELPARAM macro to make a coordinate dword.+ PostMessageA(hTree, WM_RBUTTONUP, 0, (LPARAM)0x10001); + /* this sequence should NOT send WM_CONTEXTMENU */ + SendMessageA(hTree, WM_RBUTTONDOWN, 2, (LPARAM)0x10001);
Also this deserves a more descriptive name, something like test_rbutton().+ test_mouse();