SAMPLE: WORLD - Sample Application

PSS ID Number: Q103298
Article last modified on 08-24-1993

3.10
WINDOWS

----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) for Windows
   version 3.1
----------------------------------------------------------------------

WORLD: Demonstrates World Coordinate Transforms
WORLD reads an image from a metafile and demonstrates how the image
can be translated and scaled using the SetWorldTransform function.
After starting WORLD, choose the Open command from the Metafile menu
and specify the metafile that should be used. WORLD displays the
image. The horizontal and vertical scroll boxes are set to the middle
of the scroll bars. Use the scroll bars to translate the image. To
scale the image, choose the Scale command. Select the desired
horizontal and vertical scaling factors from the list boxes.
The SetWorldTransform function takes two parameters: a device context
and a structure that defines the transform to be applied. The
transform contains six fields:
 - eM11: Horizontal scaling factor
 - eM12: Not used
 - eM21: Not used
 - eM22: Vertical scaling factor
 - eDx: Horizontal translation
 - eDy: Vertical translation
When you choose the OK button in the Scale Image dialog box, WORLD
updates the transform and calls InvalidRect to update the window.
The Microsoft® Windows NT™ version 3.1 operating system was not
available at the time this sample was acquired for the Microsoft
Developer Network CD. For this reason, the CD includes only the source
files for the sample, not the executable file or any DLLs. If you have
Windows NT version 3.1 installed on your system, you may copy the
source files to your hard drive and invoke the Windows NT make file to
build the sample.
KEYWORDS: CD4
For Microsoft OnLine customers, WORLD is available in the
Software/Data Library as 4X82.ZIP and can be found by searching on the
word WORLD, the Q number of this article, or S14257. For CompuServe
Customers, WORLD can be downloaded from the file 4-82.ZIP in library
section number 4 of the MSDNLIB forum. WORLD was archived using the
PKware file-compression utility.

Additional reference words: 3.10
KBCategory:
KBSubcategory:
Copyright Microsoft Corporation 1993.