Solved

Drawing to screen

Posted on 1998-10-12
5
238 Views
Last Modified: 2010-04-02
My application currently is in TWIPS mode with a screen size of 20000 by 16000 logical units. The problem is that if I try to draw a on the screen, any thing more than 16000 units in the x axis does not appear. Is this because TWIPS mode specifies a square display area. If I reduce the x size to 16000, a grey patch appears on the RHS edge of the display window, If I inc the y size, anything drawn after 16000 point is not shown. The smallest I can make the display area is 17900 x 16900. This still leaves a small area on the RHS that can not be drawn to. Any body got any ideas how to solve the problem ??

I am writing a 16 bit application for Win 3.1 using MS VC++ 1.52 using MFC 2.0
0
Comment
Question by:manx
  • 4
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 1174902
The problem is that the 16 bit windows GDI doesn't support cordinates over 16K.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1174903
Windows 3.1 and windows 95 use a 16 bit graphics library.  This library performs all the graphics calculations with 16 bit integers for coordinates.  Thus the coordinates can only range from -16k to 16k.  The GDI procedures will take 32 bit coordinates in some cases, but they will only use the lower 16 bits.

The solution is to use a smaller area, which probably doesn't help you, or to switch to a coordinates system (mapping mode)  with a larger scale.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1174904
Note that only NT (and maybe windows 98, I don't know) supports true 32 bit coordinates.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1174905
Was there something you didn't like about my answer?
0
 

Author Comment

by:manx
ID: 1174906
Sorry, there was no problem with the answer, just that the the bug in my app will have to remain unsolvable, just a little fustrated thats all. Very sorry about that.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Title # Comments Views Activity
How to copy an image file into clipboard C/C++? 1 199
c++ substatte a varabe for a string in a LPCTSTR statment 8 89
Path to  STL Map header file 1 69
Gaming Software 1 19
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

837 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