11-26-2015, 08:47 AM
The window is created with zero size, then resized. Need to call GetWinXY later, eg set timer...
There is another hook API.
Macro Macro2761
There is another hook API.
Macro Macro2761
int hh=SetWinEventHook(EVENT_OBJECT_SHOW EVENT_OBJECT_SHOW 0 &sub.Hook_SetWinEventHook GetCurrentProcessId GetCurrentThreadId WINEVENT_OUTOFCONTEXT)
int r=ShowMenu("one[]two[]three")
UnhookWinEvent hh
#sub Hook_SetWinEventHook
function hHook event hwnd idObject idChild dwEventThread dwmsEventTime
;outw hwnd
if hwnd and GetClassLong(hwnd GCW_ATOM)=32768
,int x y cx cy
,GetWinXY hwnd x y cx cy
,out F"{x} {y} {cx} {cy}"
,
,
,;mac "Toolbar on QM popup menu"