Determine widget focus

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Determine widget focus

      If I have several widgets in a window or dialog like edits/dropdowns etc, and 2 buttons that will be up and down for increment /decrement of values in edits/dropdowns widgets. How do you i determine which widget has focus ? and get the window handle of focused widget to manipulate it (up/down buttons will be set to not allow focus).

      Evan
    • evanb3 wrote:

      If I have several widgets in a window or dialog like edits/dropdowns etc, and 2 buttons that will be up and down for increment /decrement of values in edits/dropdowns widgets. How do you i determine which widget has focus ? and get the window handle of focused widget to manipulate it (up/down buttons will be set to not allow focus).

      Evan
      Use WM_GetFocussedWindow() - it returns the handle of currently focused object (window or widget).
      Best regards,
      Volodymyr.