Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GDI Incompatibilities: win98 vs XP

Status
Not open for further replies.

LyMc

Programmer
Jun 3, 2003
84
0
0
US
I have created a graphical application using MSVS .NET, in C++. I used the SDK interface as opposed to MFC or the fancier new interfaces (essentially Petzold 2nd Ed). It works great on XP, makes great drawings, allows scrolling and zooming. I took the app over to a newly minted Win98 SE machine (and later, ME as well) and the drawings are all screwed up. The drawings are not stable; they shift violently when I zoom in or out or scroll; there are lines going every which way (some recognizeable from what I expect, some not). Huge lettering (in some cases I can only see the edge of a part of a character).

What essential incompatibility am I running into here? It seems to me it has to be something in the respective GDIs, but I haven't a clue what is wrong. Anyone who can point me to some documentation about how the two regimes differ will have my appreciation.
 
Have you tried recompiling the program on a 98 or ME machine? it might solve the problem.
 
Thanks for the reply, GMX. The problem there is that the .NET compiler won't even load on Win98 systems, even if MS allowed it (MSVS.net has to be activated). I could, I suppose, whip out my old v5.0 compiler and do that, but I'd probably be a week just getting the extensions ironed out....

At any rate, I've found out what the problem is: integer overflow. I thought that win98 (and even win95) was 32 bit capable, but apparently in some way it is not. I measure in 1/500ths of an inch, and handle simulated lengths of 12,000" in either dimension, so a lot of 16-bit integers overflow, causing the chaotic effects. When I change the resolution to 1/10th inch (about the roughest the app can stand), it works fine until I zoom out to the limits.

So the question becomes, what can I do about it? The code is 32 bit - XP and w2k work just fine at 1/500th inch resolution. So it's a win9x vs NT difference. Gdi.dll differences? Video drivers, maybe? Anyone have any data on this? And better yet, what can I do about it on win9x?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top