Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to read text from the screen?

I want to read a text shown in a static window. The problem is that the text is not shown as a title. So I guess the text is written directly to the screen.
Is it possible to read the text from the screen? How?

Thanks a lot!!!

Comments

  • chick80chick80 Member Posts: 349
    : I want to read a text shown in a static window. The problem is that the text is not shown as a title. So I guess the text is written directly to the screen.
    : Is it possible to read the text from the screen? How?
    :
    : Thanks a lot!!!
    :
    If you want to read the text in a static control in a dialog, you can use GetDlgItem(hDlg, ID_ITEM) to retrieve an handle to the static control. Then use GetWindowText to get the text!

    nICO

    [hr]
    [italic]How beautiful, if sorrow had not made Sorrow more beautiful than Beauty itself.[/italic]
    JOHN KEATS


  • ThoronThoron Member Posts: 3
    : : I want to read a text shown in a static window. The problem is that the text is not shown as a title. So I guess the text is written directly to the screen.
    : : Is it possible to read the text from the screen? How?
    : :
    : : Thanks a lot!!!
    : :
    : If you want to read the text in a static control in a dialog, you can use GetDlgItem(hDlg, ID_ITEM) to retrieve an handle to the static control. Then use GetWindowText to get the text!
    :
    : nICO
    :
    :
    Thanks for your answer nICO.
    But: GetWindowText returns the title of the static control. The control I need to read from has no title. The text is just written to the DC or whatever. I don't know much about this stuff, so i can't tell you how this is done by the prog.
    Is there any possibility to read the text from the screen? (I have the handle of the control and can find out anything else, but not the text...) :(

    Thoron
  • chick80chick80 Member Posts: 349
    : But: GetWindowText returns the title of the static control. The control I need to read from has no title. The text is just written to the DC or whatever. I don't know much about this stuff, so i can't tell you how this is done by the prog.
    : Is there any possibility to read the text from the screen? (I have the handle of the control and can find out anything else, but not the text...) :(
    :
    Oh, in that case I think there's no way to retrieve that text. If it's written with TextOut or DrawText it's just a bunch of pixel drawn to that DC.

    nICO

    [hr]
    [italic]How beautiful, if sorrow had not made Sorrow more beautiful than Beauty itself.[/italic]
    JOHN KEATS


  • ThoronThoron Member Posts: 3
    : : But: GetWindowText returns the title of the static control. The control I need to read from has no title. The text is just written to the DC or whatever. I don't know much about this stuff, so i can't tell you how this is done by the prog.
    : : Is there any possibility to read the text from the screen? (I have the handle of the control and can find out anything else, but not the text...) :(
    : :
    : Oh, in that case I think there's no way to retrieve that text. If it's written with TextOut or DrawText it's just a bunch of pixel drawn to that DC.
    :
    : nICO
    :
    :
    :
    Hi again nICO,
    I feared that this would be the answer. Thanks for your help anyway...

    Thoron


  • Andre YoungAndre Young USAMember Posts: 0

    _ < http://forcoder.org /> free ebooks and video tutorials about | PHP Scratch Delphi PL/SQL Python Assembly R Swift MATLAB C++ Objective-C Visual Basic Ruby C# JavaScript Perl Go C Java Visual Basic .NET Crystal Transact-SQL Julia ML ABAP Logo COBOL Clojure Bash Awk FoxPro Apex Rust SAS F# Lua Alice D Hack LabVIEW Kotlin Ada Scheme Fortran Lisp Erlang Prolog Scala Dart VBScript | __________

Sign In or Register to comment.