Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

Drawing to screen

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
manx
Asked:
manx
  • 4
1 Solution
 
nietodCommented:
The problem is that the 16 bit windows GDI doesn't support cordinates over 16K.
0
 
nietodCommented:
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
 
nietodCommented:
Note that only NT (and maybe windows 98, I don't know) supports true 32 bit coordinates.
0
 
nietodCommented:
Was there something you didn't like about my answer?
0
 
manxAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now