Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8367401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:08:53+00:00 2026-06-09T13:08:53+00:00

I am creating an application that can get text from the selected rectangle on

  • 0

I am creating an application that can get text from the selected rectangle on any window. So I am doing this by hooking the ExtTextOut(A/W), TextOut(A/W), DrawText(A/W) apis.
I am able to retrieve the text from windows but in some special cases I am not able to get the text properly.
When I tried to debug it I saw that the HDC parameter of ExtTextOutW can not been used to get the HWND, because when I try to call WindowFromDC(hdc), it returns NULL HWND.

I tried to find out the reason then I found that this HDC is memoryDC so is there any way to get the HWND from that memory DC.

So Please somebody help me to get the actual HWND from the HDC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:08:54+00:00Added an answer on June 9, 2026 at 1:08 pm

    I think you will have to follow that HDC as it is likely that it will be BitBlt(), or similar, to a HDC that is associated with an actual HWND:

    • cache the text written to memory HDCs
    • hook BitBlt(), and others, and check if the the source HDC of the BitBlt() is one of the memory HDCs that has had text written to it. If it is, check if the destination HDC has a HWND and if not then it is a memory HDC which must again be followed
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an ASPX application that collects data from the user can creates
I'm creating an application that is supposed to read text from mySql database using
I am creating an application that will have a list of items that can
I am creating a desktop application that stores rich text documents to a SQL
I want to create an application that can transform text the user enters in
I'm creating an application that allows the user to store information about their classes.
I will be creating an Application that will be showing the Products in a
I am creating an application that supports modules in the form of dlls that
I am creating an application that works like the 'wizard' component of some microsoft
I am creating an application that uses popups. However, I would like to animate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.