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. Cursor help: [modified]

Cursor help: [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
6 Posts 4 Posters 1 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.
  • H Offline
    H Offline
    Hakan Bulut
    wrote on last edited by
    #1

    How can i do that when my dialog active text-cursor already active in the editbox?:cool: Can anyone get the answer my question? My question seems to be quite open, i think. -- modified at 6:47 Wednesday 31st October, 2007

    What is this¿ "This is a FIRTBOY"

    K 1 Reply Last reply
    0
    • H Hakan Bulut

      How can i do that when my dialog active text-cursor already active in the editbox?:cool: Can anyone get the answer my question? My question seems to be quite open, i think. -- modified at 6:47 Wednesday 31st October, 2007

      What is this¿ "This is a FIRTBOY"

      K Offline
      K Offline
      Karismatic
      wrote on last edited by
      #2

      As far as i get from ur description you want to set the focus on the editbox whenever ur dialog is initialised. in this case you have to code in the OnInitDialog() function where u can use the control variable of the editbox lets suppose m_ctrlBox u have to write m_ctrlBox.SetFocus()

      Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job

      H 1 Reply Last reply
      0
      • K Karismatic

        As far as i get from ur description you want to set the focus on the editbox whenever ur dialog is initialised. in this case you have to code in the OnInitDialog() function where u can use the control variable of the editbox lets suppose m_ctrlBox u have to write m_ctrlBox.SetFocus()

        Regards, Pankaj Sachdeva There is no future lies in any job but future lies in the person who holds the job

        H Offline
        H Offline
        Hakan Bulut
        wrote on last edited by
        #3

        thanks

        What is this¿

        R M 2 Replies Last reply
        0
        • H Hakan Bulut

          thanks

          What is this¿

          R Offline
          R Offline
          Roger Broomfield
          wrote on last edited by
          #4

          Dont forget to return FALSE if you do this. Wouldnt it be better to let the dialog manager do this for you by ensuring that the desired edit control is first in the tab order. To change the tab order when editting the dialog resource use menu option Layout->TabOrder(Ctrl+D) the taborder will be shown by numberred blue sqaures in the top-left of each control.

          1 Reply Last reply
          0
          • H Hakan Bulut

            thanks

            What is this¿

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            For edit controls, you may want to try this instead of SetFocus()... GotoDlgCtrl(&m_EditCtl); Why you may want to use this instead?  Here's what the docs say... "This message performs additional dialog box management operations beyond those performed by the SetFocus function WM_NEXTDLGCTL updates the default pushbutton border, sets the default control identifier, and automatically selects the text of an edit control (if the target window is an edit control)." Whatever gives you the result you want :) Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            H 1 Reply Last reply
            0
            • M Mark Salsbery

              For edit controls, you may want to try this instead of SetFocus()... GotoDlgCtrl(&m_EditCtl); Why you may want to use this instead?  Here's what the docs say... "This message performs additional dialog box management operations beyond those performed by the SetFocus function WM_NEXTDLGCTL updates the default pushbutton border, sets the default control identifier, and automatically selects the text of an edit control (if the target window is an edit control)." Whatever gives you the result you want :) Mark

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              H Offline
              H Offline
              Hakan Bulut
              wrote on last edited by
              #6

              Thank you Mark... Actually, I need sometime to work on Visual C++/MFC or other languages... and need a computer also. "to be busy with a good job to kill time!".. It is upsetting. Yours sincerely.

              What is this¿

              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