View Single Post
Old 01-12-2020, 01:09 PM   #906
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,918
Default

Quote:
what is the funciton to get a windowHWND from simple ID
Control window handle? Shouldn't be any different then done in reaper, you got handle of window the control is on and pass the control ID to get the controls handle...

Code:
control_hwnd = reaper.JS_Window_FindChildByID(hwnd, ID)
Quote:
Originally Posted by X-Raym View Post
With Edgemeal Get COntrol ID under mouse windows software :P
This basically does same thing,..
Code:
function Main()
  -- Get Control ID under mouse (top-level window)
  x,y = reaper.GetMousePosition()
  hwnd = reaper.JS_Window_FromPoint(x,y)
  hid = reaper.JS_Window_GetLongPtr(hwnd, "ID") 
  id = reaper.JS_Window_AddressFromHandle(hid)
  reaper.ShowConsoleMsg(tostring(id) .. "\n")
  reaper.defer(Main)
end
Main()

Last edited by Edgemeal; 01-12-2020 at 01:36 PM.
Edgemeal is offline   Reply With Quote