Article View: borland.public.cppbuilder.nativeapi
Article #9252Reading pixel from another application
From: Henry
Date: Tue, 20 Jul 2004 15:18
Date: Tue, 20 Jul 2004 15:18
22 lines
1592 bytes
1592 bytes
Hi to all! I am working on a supervisor program that waits for an area within another application to become red. As a first solution I tried the following code: HDC dc; Graphics::TCanvas ScreenCanvas; ScreenCanvas = new Graphics::TCanvas(); dc = GetDC(NULL); ScreenCanvas->Handle = dc; If (ScreenCanvas->Pixels[_DNS_Mike_St_X_Coord_][_DNS_Mike_St_Y_Coord_] == clRed) which worked correctly. My problem is: what if the target windows is covered by another windows or it is minimized ? Is there an API to be used to directly read pixel from another application? Can anybody provide me with a piece of code ? Thank un advance. Henry - Italy
Technical Details
Message-ID:
<40fd37c8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b592d6567f6c1e9,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Henry" <eangelo@libero.it> From: "Henry" <eangelo@libero.it> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Reading pixel from another application Date: Tue, 20 Jul 2004 17:18:30 +0200 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 151.29.253.195 Message-ID: <40fd37c8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090336712 151.29.253.195 (20 Jul 2004 08:18:32 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail