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 can I get a Text where mouse cursor is placed?

How can I get a Text where mouse cursor is placed?

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicstutorial
6 Posts 4 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.
  • Z Offline
    Z Offline
    zeki yugnak
    wrote on last edited by
    #1

    hi.. I want to make a Dictionary like babylon so I need to get Text by screen coordinate.But,I will not use OCR for bitmap or other picture. any ideas on how to do this? Thanks in advance.

    B M J 3 Replies Last reply
    0
    • Z zeki yugnak

      hi.. I want to make a Dictionary like babylon so I need to get Text by screen coordinate.But,I will not use OCR for bitmap or other picture. any ideas on how to do this? Thanks in advance.

      B Offline
      B Offline
      bikram singh
      wrote on last edited by
      #2

      Use a sequence of: 1. GetCursorPos() 2. WindowFromPoint() 3. GetWindowText() Bikram Singh

      1 Reply Last reply
      0
      • Z zeki yugnak

        hi.. I want to make a Dictionary like babylon so I need to get Text by screen coordinate.But,I will not use OCR for bitmap or other picture. any ideas on how to do this? Thanks in advance.

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        See the FAQ 4.14 How do I retrieve the text that the mouse cursor is pointing at?[^] and an update to the FAQ in my blog here[^] --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.

        Z 1 Reply Last reply
        0
        • M Michael Dunn

          See the FAQ 4.14 How do I retrieve the text that the mouse cursor is pointing at?[^] and an update to the FAQ in my blog here[^] --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.

          Z Offline
          Z Offline
          zeki yugnak
          wrote on last edited by
          #4

          thank you very much...;P that code is working perfect

          1 Reply Last reply
          0
          • Z zeki yugnak

            hi.. I want to make a Dictionary like babylon so I need to get Text by screen coordinate.But,I will not use OCR for bitmap or other picture. any ideas on how to do this? Thanks in advance.

            J Offline
            J Offline
            Jose Cezar S Ynion
            wrote on last edited by
            #5

            Just few cents of ideas 1. Create a global mouse hook. 2. Keep track of mouse events to trigger your procedure. 3. Send double click message to the window where specific mouse trigger occured. 4. This will highlight a text, if there is. 5. Send message to capture the selected text to clipboard. 6. Let your main aplication get the text from the clipboard and process it.

            Z 1 Reply Last reply
            0
            • J Jose Cezar S Ynion

              Just few cents of ideas 1. Create a global mouse hook. 2. Keep track of mouse events to trigger your procedure. 3. Send double click message to the window where specific mouse trigger occured. 4. This will highlight a text, if there is. 5. Send message to capture the selected text to clipboard. 6. Let your main aplication get the text from the clipboard and process it.

              Z Offline
              Z Offline
              zeki yugnak
              wrote on last edited by
              #6

              thank you... I will try..

              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