int checkCtlFocus(int n)
Returns true if the given control has focus, false otherwise.
Checks if a given control currently has the user's focus (ie is currently highlighted and responding to keyboard controls after recently being clicked on).
ctl[0]: STANDARD, "Control 0" ctl[1]: STANDARD, "Control 1" ctl[8]: STATICTEXT, "Which control has focus?" OnCtl(n): { if (checkCtlFocus(0)) { setCtlText(8, "Control 0 has focus"); } else if (checkCtlFocus(1)) { setCtlText(8, "Control 1 has focus"); } else { setCtlText(8, ""); } return true; }