Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbar on a popup menu
#7
The window is created with zero size, then resized. Need to call GetWinXY later, eg set timer...

There is another hook API.
Macro Macro2761
Code:
Copy      Help
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"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)