Jump to content

Recommended Posts

Posted

I could have sworn I did this once before, but I'm blanking on the exact method, and twenty-odd forum searches turned up nothing. I need a way to tell when the input focus on my GUI changes (from one control to another), and when it does, I need to find out which control currently has the focus. Any suggestions?

Posted

Already tried it. ControlGetFocus gives you back a ClassNameNN (or HWND with ControlGetHandle), but I need an AutoIt control ID as returned by a GUICtrlCreate function.

Posted

GUIRegisterMsg(0x0008,"Func1")

will fire whenever it loses focus.

What is "it"? I tried clicking and tabbing all over the place but the function never executed.

Posted

Actually, that did help me out, thanks Smoke! Once I knew what I was looking for, it was easy to rewrite the example to use EN_SETFOCUS instead of EN_CHANGE. It works fine, but it really shouldn't be this hard...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...