Solved

VIewPort under win32 GDI

Posted on 1998-11-05
1
900 Views
Last Modified: 2011-04-14
i would i concrete example of how to use the
setViewPortOrg, SetViewPortExtEx under windows...

with the  SetMapMode ( hDC,MM_ISOTROPIC);

how to use it, and what are the step to modified it
0
Comment
Question by:ct_consultant
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
trillo earned 50 total points
ID: 1177075
Hi
First of all you should know the relation between the logical coordinates and the device coordinates (pixels).
For example if you have a DC that is 20 x 20 pixels, and you would like it to be, lets say, 50 x 50 units (for your personal purpose) you should specify something like:

SetViewportExtEx (hDC, 20, 20, NULL);
SetWindowExtEx (hDC, 50, 50, NULL);

You can set or offset the origin either in the window (logical coordinates) or in the viewPort (device coordinates) or in both.

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question