Article View: borland.public.cppbuilder.nativeapi
Article #11119Re: Enlarge screen
From: Ed Mulroy [TeamB]
Date: Sat, 28 Feb 2004 03:29
Date: Sat, 28 Feb 2004 03:29
64 lines
3991 bytes
3991 bytes
Start by getting super magnify. It is freeware and the download package is smag10.exe This page has links ot a number of pages who all offer it. http://www.shorl.com/deviletyvemi Among the things it is useful for is to illustrate the issue of how often to copy the window and what the side effects of that are and what happens when it is itself copied, recursively magnifying. If none of them work out then tell me so in an email to me at ed at mulroy.org and I'll email the program to you. Super magnify does much of what you want to do. When you see it in action you will have input that gets you thinking and probably will sharpen your idea on what you want. As to how to do what you want: The way windows are arranged on the screen is called the z-order, kind of like a graph where x and y are width and height and z goes in perpendicular to the screen surface. You get the handle of the top window with GetTopWindow and then the handles of windows below by successively calling GetNextWindow to drill down to the bottom of the stack. When you have a handle to the window you wish to copy you then get a handle to its device context, a handle to a DC or HDC for it by calling GetDC. Don't hold on to that for long as it is a resource. Give it back when you're done with ReleaseDC. When you have the HDC you can copy the appearance of the window by doing a BitBlt from the window to a bitmap in a memory DC that you created. You create the memory DC and get an HDC to it with CreateCompatibleDC. Save the state of the DC so that you can restore it later by calling SaveDC. You then create a bitmap with CreateCompatibleBitmap and make it the bitmap for the memory DC with SelectObject. You can copy the image from the window to the memory DC with BitBlt and write from the memory DC to your window with BitBlt or if you want to magnify or shrink it, with StretchBlt. When you are done you uncouple the bitmap from the memory DC by restoring the DC back to its original state with RestoreDC. You can then call DeleteDC to free it up and then free up the bitmap with DeleteObject. . Ed > Mike Mimic wrote in message > news:403ff7eb$1@newsgroups.borland.com... > > I would like to make a program for MS Windows which would > enlarge (magnify) part of the screen to the full screen. > But the user should be able to use other programs on screen > the same. Something like this: user works in some program, > wants magnification, runs my program which magnifies part of the > screen, works on and sees everything magnifed, than exits my > program (with some key combination) and works on. > > I know how to capture the screen but how can I capture the > screen and draw magnified image over the screen and than not > capturing this magnified image (I would get recursive > magnification) but screen under magnified image while mouse > and everything is still under? So how can I capture the screen > something like overlay it over without any program and Windows > notice it.
Technical Details
Message-ID:
<40400b3c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<403ff7eb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8579a2afe698cf5f X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-27 19:40:00 PST From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <403ff7eb$1@newsgroups.borland.com> Subject: Re: Enlarge screen Date: Fri, 27 Feb 2004 22:29:58 -0500 Lines: 67 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: 24.74.175.102 Message-ID: <40400b3c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077939004 24.74.175.102 (27 Feb 2004 19:30:04 -0800) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail