🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2419

Re: Getting text from an external Grid

#2419
From: Dan
Date: Thu, 01 Mar 2007 22:16
23 lines
2168 bytes
> What is HexIdOfGrid?

The result of a FindWindowEx(...) function that identified the handle of 
the grid I was looking for.

> Try using GetWindowRect() instead, using the grid's HWND.
GetWindowRect yields the same results.

> Again, you do not need to access the individual pixels.  Once you have
> a suitable HDC, you can BitBlt() or StretchBlt() the entire window to
> a bitmap, and then use that as needed.  For example:

Forgive my frustration, but oh, I've tried, what's wrong with this code?:

BitBlt(GetWindowDC(TheTImagePointer->Canvas->Handle),0,0,w,h,DCToTheGrid,0,0,PATCOPY);

It doesn't copy anything.

 >>>Then you are not using the correct HDC.
I find it hard to belive that I am using the incorrect HDC, since the 
GetPixel(DCToTheGrid,x,y); call returns the correct color for each 
pixel, allowing me to copy the beast.
Technical Details
Message-ID: <45e75113$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news.germany.com!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45e59a3a$1@newsgroups.borland.com> <45e5bb7e$1@newsgroups.borland.com> <45e5cfa5$1@newsgroups.borland.com> <45e5f6d3@newsgroups.borland.com> <45e5fd07$1@newsgroups.borland.com> <45e60f88$1@newsgroups.borland.com> <45e6f2f0$1@newsgroups.borland.com> <lnvdu29ua6a88fpbfof4eu9pb4d7t42pm4@4ax.com> <45e72444$1@newsgroups.borland.com> <45e733b3$1@newsgroups.borland.com> <45e73ae4@newsgroups.borland.com> <45e7425f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3d58209a1f02789a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 01 Mar 2007 16:16:48 -0600
From: Dan <Dan@do.not.spam>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Getting text from an external Grid
References: <45e59a3a$1@newsgroups.borland.com> <45e5bb7e$1@newsgroups.borland.com> <45e5cfa5$1@newsgroups.borland.com> <45e5f6d3@newsgroups.borland.com> <45e5fd07$1@newsgroups.borland.com> <45e60f88$1@newsgroups.borland.com> <45e6f2f0$1@newsgroups.borland.com> <lnvdu29ua6a88fpbfof4eu9pb4d7t42pm4@4ax.com> <45e72444$1@newsgroups.borland.com> <45e733b3$1@newsgroups.borland.com> <45e73ae4@newsgroups.borland.com> <45e7425f$1@newsgroups.borland.com>
In-Reply-To: <45e7425f$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 216.174.165.174
Message-ID: <45e75113$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1172787475 216.174.165.174 (1 Mar 2007 14:17:55 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news.germany.com!news.belwue.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail