Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with GetFocus

Problem with GetFocus

Scheduled Pinned Locked Moved C / C++ / MFC
helpjsontutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    uday kiran janaswamy
    wrote on last edited by
    #1

    Hi all, I am operating a Tab to Move the Controls in the Dialog, how can i detected that the Control is got Focused when i am using a Tab Control. Example: i am having three controls in a Dialog, i am pressing a Tab in the Key Board then the Cursor moves to all the Controls, here how can i detect that the Control have moved to the Third Control. Any Ideas with GetFocus(...) Api, Please help me out.

    Uday kiran

    R D 2 Replies Last reply
    0
    • U uday kiran janaswamy

      Hi all, I am operating a Tab to Move the Controls in the Dialog, how can i detected that the Control is got Focused when i am using a Tab Control. Example: i am having three controls in a Dialog, i am pressing a Tab in the Key Board then the Cursor moves to all the Controls, here how can i detect that the Control have moved to the Third Control. Any Ideas with GetFocus(...) Api, Please help me out.

      Uday kiran

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Handle the WM_KEYDOWN event and check if its the tab key.

      Nobody can give you wiser advice than yourself. - Cicero

      1 Reply Last reply
      0
      • U uday kiran janaswamy

        Hi all, I am operating a Tab to Move the Controls in the Dialog, how can i detected that the Control is got Focused when i am using a Tab Control. Example: i am having three controls in a Dialog, i am pressing a Tab in the Key Board then the Cursor moves to all the Controls, here how can i detect that the Control have moved to the Third Control. Any Ideas with GetFocus(...) Api, Please help me out.

        Uday kiran

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        uday kiran janaswamy wrote:

        ...how can i detect that the Control have moved to the Third Control. Any Ideas with GetFocus(...) Api,

        if (GetFocus() == GetDlgItem(hDlg, IDD_THIRD_CONTROL))
        ...


        "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

        "Judge not by the eye but by the heart." - Native American Proverb

        U 1 Reply Last reply
        0
        • D David Crow

          uday kiran janaswamy wrote:

          ...how can i detect that the Control have moved to the Third Control. Any Ideas with GetFocus(...) Api,

          if (GetFocus() == GetDlgItem(hDlg, IDD_THIRD_CONTROL))
          ...


          "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

          "Judge not by the eye but by the heart." - Native American Proverb

          U Offline
          U Offline
          uday kiran janaswamy
          wrote on last edited by
          #4

          Hi David, I am very Much Thankfull to give a great idea, Thanks a Lot.

          Uday kiran

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups