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. Setting cursor position in CComboBox

Setting cursor position in CComboBox

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
3 Posts 2 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.
  • T Offline
    T Offline
    The Lady of Shallots
    wrote on last edited by
    #1

    I have a CComboBox in a dialog in my app and have a question about setting the cursor in it. I want it to have the same behavior as the search combo box in the toolbar in VC++. When the user clicks the box to set focus, it should highlight the current word and if they click again, the cursor is positioned at the end of the word. Right now, no matter how many times or where I click the whole word is always highlighted. Thanks!

    N 1 Reply Last reply
    0
    • T The Lady of Shallots

      I have a CComboBox in a dialog in my app and have a question about setting the cursor in it. I want it to have the same behavior as the search combo box in the toolbar in VC++. When the user clicks the box to set focus, it should highlight the current word and if they click again, the cursor is positioned at the end of the word. Right now, no matter how many times or where I click the whole word is always highlighted. Thanks!

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      The Lady of Shallots wrote: When the user clicks the box to set focus, it should highlight the current word and if they click again, the cursor is positioned at the end of the word. Um, isn't this the default action of a CComboBox? I made a quick MFC app and added one and this is how mine acted.


      Nick Parker

      You see the Standards change. - Fellow co-worker

      T 1 Reply Last reply
      0
      • N Nick Parker

        The Lady of Shallots wrote: When the user clicks the box to set focus, it should highlight the current word and if they click again, the cursor is positioned at the end of the word. Um, isn't this the default action of a CComboBox? I made a quick MFC app and added one and this is how mine acted.


        Nick Parker

        You see the Standards change. - Fellow co-worker

        T Offline
        T Offline
        The Lady of Shallots
        wrote on last edited by
        #3

        Hmmm... maybe it is and I'm messing it up some how because I am overriding some windows messages and setting focus myself in some places, I will look into that. Thanks!

        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