Page 1 of 1

How to determine which gadget currently has the focus?

Posted: Mon Sep 01, 2003 8:41 pm
by merendo
How do I determine, which of the existing gadgets currently has the focus?

Thanks for any help! merendo

Posted: Mon Sep 01, 2003 9:04 pm
by spangly
try the following code (uses API calls)

Code: Select all

  id.l=GetWindowLong_(GetFocus_(),#GWL_ID)
id will be set to the ID of the window or gadget that has the focus, which seems work ok in my tests.

Posted: Mon Sep 01, 2003 10:11 pm
by merendo
Yes, it seems to work. Thank you very much!