🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #242

Re: Mapping modes

#242
From: Brent Southard
Date: Fri, 23 Jun 1989 13:54
23 lines
1765 bytes
In article <3196@watale.waterloo.edu> tom@mims-iris.waterloo.edu (Tom Haapanen) writes:
>I'm using SetMapMode(hDC, MM_ANISOTROPIC) along with SetWindowExt() and
>SetViewPortExt() to transform window coordinates into constant units
>(I want 1000, 1000 to always be the bottom right corner).  This works
>fine if I do a SetMapMode() etc. every time I redraw a window.  However,
>if I only do it when the window is created (WM_CREATE message) it seems
>that the window extent information disappears after I do something.  

When you are setting non-default values for your DC, such as with
SetMapMode(), SetWindowExt(), etc., they are set only during the lifetime of
the DC.  That is, when you release the DC, your changes are gone.  I've
found that it's usually easiest to put all my DC Set... calls in a function
which I call immediately after each GetDC() for the window.  In any case,
don't try to solve the problem by keeping a DC to yourself for long periods
of time, as they are system resources.

	brent

-- 
brent southard  (313) 656-8349   |   oh mona mona
ImageTech Corp  (313) 362-3141   |   you can close your eyes
                                 |   i've got a twelve gauge surprise
usenet:  ...!well!brent          |   waiting for you             -- James Taylor
Technical Details
Message-ID: <12345@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!usc!elroy!ames!amdahl!pacbell!well!brent
References: <3196@watale.waterloo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!usc!elroy!ames!amdahl!pacbell!well!brent
From: brent@well.UUCP (Brent Southard)
Newsgroups: comp.windows.ms
Subject: Re: Mapping modes
Message-ID: <12345@well.UUCP>
Date: 23 Jun 89 13:54:07 GMT
References: <3196@watale.waterloo.edu>
Reply-To: brent@well.UUCP (Brent Southard)
Distribution: na
Organization: Whole Earth 'Lectronic Link, Sausalito, CA
Lines: 23