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. CEdit Selection Orientation

CEdit Selection Orientation

Scheduled Pinned Locked Moved C / C++ / MFC
databasequestion
4 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.
  • B Offline
    B Offline
    baerten
    wrote on last edited by
    #1

    Hello everybody, is it possible to determine the orientation of the selection into a CEdit? If I select a part of the text with the mouse from left to right, the cursor blinks at the end. But if I select the text from right to left, the cursor blinks at the beginning of the selection. A GetSel(...); returns always the start and end index in the left-to-right order. Or is there a function to retrieve the blinking cursor in a selection? Big thanks in advance :)

    C 1 Reply Last reply
    0
    • B baerten

      Hello everybody, is it possible to determine the orientation of the selection into a CEdit? If I select a part of the text with the mouse from left to right, the cursor blinks at the end. But if I select the text from right to left, the cursor blinks at the beginning of the selection. A GetSel(...); returns always the start and end index in the left-to-right order. Or is there a function to retrieve the blinking cursor in a selection? Big thanks in advance :)

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Don't know if there's an "official" way of doing that, but you could try experimenting with GetCaretPos[^] and CharFromPos[^].

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

      B 1 Reply Last reply
      0
      • C Code o mat

        Don't know if there's an "official" way of doing that, but you could try experimenting with GetCaretPos[^] and CharFromPos[^].

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

        B Offline
        B Offline
        baerten
        wrote on last edited by
        #3

        Exactly what I'm looking for. Big thanks :)

        C 1 Reply Last reply
        0
        • B baerten

          Exactly what I'm looking for. Big thanks :)

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          Yourwelcome. :)

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

          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