How to use API to read window text

Posted on 2005-04-16
Last Modified: 2013-11-13
I want to write a program that captures text from the window of another application.  Unfortunately, the text I wish to capture appears to be part of an image that is loaded in the other application's main window (i.e. the text is not a label).  Is there any way to retrieve this text through API calls?  If not, is there another method all together?  

Additional Information:
I am using C++ for the project
I cannot purchase additional libraries

Any help would be greatly appreciated.
Question by:jonmclean2
    LVL 25

    Expert Comment

    I doubt that there's any freeware solutions.. This would be a lot easier (but not easy mind you) if you know what font it's in; but if you're talking about those random-image-password things on websites, then good luck!! lol.

    LVL 1

    Author Comment

    Its a recongnizable font though i don't know which one.  Its not a website random-image-password things :-)
    LVL 9

    Accepted Solution

    Look for an OCR library.

    Although you said you cannot purchase additional libraries, you may find one cheap enough to justify the purchase. I don't know what your hourly rate may be, but coding an OCR algorithm may well keep you busy for weeks. Do the maths and see which is cheaper.

    This artice may give you a better understanding of what's involved:

    If you want to solve a personal problem (i.e. the code will not end up in an application that gets distributed to others) and you own Office 2003, you may consider using the MODI library. For an example, go here:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Specialist

    HTML5 development skills are critical to all developers. HTML5 is the foundation to almost any development process. That's why business, design studios, development shops and other organizations need HTML5 developers. Get your foot in the door as a HTML5 specialist.

    Suggested Solutions

    Title # Comments Views Activity
    countEvens challenge 2 46
    fizzArray2 challenge 1 41
    userCompare  challenge 3 51
    Arduino EDI - Programming language 3 27
    This article will show, step by step, how to integrate R code into a R Sweave document
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now