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. how to set tab stop order programmatically

how to set tab stop order programmatically

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
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.
  • V Offline
    V Offline
    Vincent Ye
    wrote on last edited by
    #1

    How can I change the tab stop order for the controls in a dialog after the dialog is displayed? Thanks in advance.

    H D 2 Replies Last reply
    0
    • V Vincent Ye

      How can I change the tab stop order for the controls in a dialog after the dialog is displayed? Thanks in advance.

      H Offline
      H Offline
      Hans Dietrich
      wrote on last edited by
      #2

      You can't, unless you're building the dialog template dynamically. The tab order of the controls is determined by their order in the dialog template. You can see this by editing the .rc file, and shuffling the controls around. Creating the template dynamically is a lot of work. Why do you want to change the tab order? Best wishes, Hans

      V 1 Reply Last reply
      0
      • H Hans Dietrich

        You can't, unless you're building the dialog template dynamically. The tab order of the controls is determined by their order in the dialog template. You can see this by editing the .rc file, and shuffling the controls around. Creating the template dynamically is a lot of work. Why do you want to change the tab order? Best wishes, Hans

        V Offline
        V Offline
        Vincent Ye
        wrote on last edited by
        #3

        Thank you for replying so fast. actually, I want to insert an own control into the dialog. I create this control in OnCreate. I hope the user can use "tab" to go through all the controls. for example, there are two buttons in the dialog, call A and B. now I create an own control, I hope to set its tab stop order between A and B. Then when user presses "tab", the focus will go to A, own control, B, and go back to A. Thanks again.

        1 Reply Last reply
        0
        • V Vincent Ye

          How can I change the tab stop order for the controls in a dialog after the dialog is displayed? Thanks in advance.

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

          You would use CWnd::SetWindowPos() for each of the controls you wanted to alter.

          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