🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #184

Device Independence

#184
From: Jeff Hughes
Date: Mon, 06 Apr 1992 18:13
18 lines
1248 bytes
Hello,

    I am looking for ways to write "device independent" Windows code. 
My main concern is that I have an application that should run on an
EGA display as well as VGA, and Super VGA. I am placing bitmaps inside
of my application window (now you see the problem), and would like 
these bitmaps to maintain the same aspect ratio, despite the display type.

    One solution I can come up with is for my main application to do 
a GetDevCaps before it creates the main window, then size the main
window so as to keep the aspect ratio of the WINDOW constant, regardless
of the display. Then, I simply StretchBLT the bitmap to a 'window relative
size'. I want to know if this is a 'normal' way to do this??? Is there
some other standard way to maintain the shape of bitmap as I change display
types????

    I am aware of the various mapping modes. These are of very limited 
utility (read that: none) when working with bitmaps. Please help!!
Technical Details
Message-ID: <31390004@col.hp.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!hp-col!col!jeff

Show Full Headers
Complete Article Headers
From: jeff@col.hp.com (Jeff Hughes)
Date: Mon, 6 Apr 1992 18:13:11 GMT
Subject: Device Independence
Message-ID: <31390004@col.hp.com>
Organization: HP Colorado Springs Division
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!sdd.hp.com!hp-col!col!jeff
Newsgroups: comp.windows.ms.programmer
Lines: 18