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. Tab order in Win32 App

Tab order in Win32 App

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 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.
  • M Offline
    M Offline
    Murlai
    wrote on last edited by
    #1

    In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code. When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit. Can I get any help, and the reason? Thanks in advance. Murali.

    2 P 2 Replies Last reply
    0
    • M Murlai

      In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code. When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit. Can I get any help, and the reason? Thanks in advance. Murali.

      2 Offline
      2 Offline
      224917
      wrote on last edited by
      #2

      Change the z-order of the created edit box. you can use SetWindowPos() for this.
      There is no spoon. mail

      M 1 Reply Last reply
      0
      • 2 224917

        Change the z-order of the created edit box. you can use SetWindowPos() for this.
        There is no spoon. mail

        M Offline
        M Offline
        Murlai
        wrote on last edited by
        #3

        Can you explaine how z-order helps in solving my problem? Can you tell me the signifance of z-order here.

        2 1 Reply Last reply
        0
        • M Murlai

          Can you explaine how z-order helps in solving my problem? Can you tell me the signifance of z-order here.

          2 Offline
          2 Offline
          224917
          wrote on last edited by
          #4

          pEdit2->SetWindowPos(pEdit1,0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); Hope this helps.
          There is no spoon. mail

          1 Reply Last reply
          0
          • M Murlai

            In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code. When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit. Can I get any help, and the reason? Thanks in advance. Murali.

            P Offline
            P Offline
            Phil J Pearson
            wrote on last edited by
            #5

            Moving focus between controls in a dialog is handled by the Windows dialog manager. If the window containing the controls is not a dialog you will have to handle changing focus yourself in your window procedure. (Assuming this is not an MFC app.) You would have to process WM_CHAR messages and do the appropriate SetFocus when you get TAB. You would also have to check for the Shift key if you had more than two controls.


            The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).

            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