home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!csus.edu!netcom.com!whedon
- From: whedon@netcom.com (Bill Whedon)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Re: Reading in PAN FIles--Upside down--Why? What purpose?
- Keywords: DIB
- Message-ID: <-2hn!=r.whedon@netcom.com>
- Date: 31 Aug 92 20:18:45 GMT
- References: <koivu.715124832@ocoee>
- Distribution: comp
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- Lines: 20
-
- You need to look at SetMapMode, SetWindowOrg, SetWindowExt, SetViewportOrg,
- and SetViewportExt commands in the SDK or online docs. Normally, the 0,0
- point on your display is the upper left corner. If you feed it points
- originating at the the lower left, they will be, as you say, upside-down
- and backwards.
-
- Try:
- SetMapMode(hDC,MM_ISOTROPIC);
- SetWindowExt(hDC,Xext,Yext); /* width and height of your bitmap */
- SetViewportExt(hDC,cxClient,-cyClient); /* width and height of client area */
- SetViewportOrg(hDC,0,cyClient);
-
- Note that the setting in SetViewport of -cyClient puts you in the lower
- half of the coordinate system, and the cxClient keeps you to right of
- center, which is where I think you want to be.
-
- SERMON: "Programming Windows", Charles Petzold, Microsoft Press,
- ISBN 1-55615-264-7 hath many examples, and Other Wonders.
- (here endeth the sermon)
- Cheers, and, have fun!
-