M
mdjr
Hello.
I found a bug in MSPAINT.EXE. A MS employee told me to post it here but I do
not know if this forum is the correct one:
When starting MS Paint the program will calculate the display resolution
using the following formula:
pixels_per_meter_X = 1000*screen_width_in_pixels/screen_width_in_millimeters
The same is done for the Y-Direction.
Unfortunately in some cases (in my case I had a video projector connected to
my Laptop) the GetDeviceCaps() function returns a screen width and height of
0 millimeters. This will cause the mspaint.exe application to crash because
of a division-by-zero exception.
My suggestion is to change mspaint.exe the following way:
if(screen_width_in_millimeters>MINIMUM_WIDTH)
pixels_per_meter_X = ...
else pixels_per_meter_X = DEFAULT_RES;
The bug occurred in Windows XP but a look at the disassembly of mspaint.exe
in Windows Vista showed that it is also present in Windows Vista.
Martin
I found a bug in MSPAINT.EXE. A MS employee told me to post it here but I do
not know if this forum is the correct one:
When starting MS Paint the program will calculate the display resolution
using the following formula:
pixels_per_meter_X = 1000*screen_width_in_pixels/screen_width_in_millimeters
The same is done for the Y-Direction.
Unfortunately in some cases (in my case I had a video projector connected to
my Laptop) the GetDeviceCaps() function returns a screen width and height of
0 millimeters. This will cause the mspaint.exe application to crash because
of a division-by-zero exception.
My suggestion is to change mspaint.exe the following way:
if(screen_width_in_millimeters>MINIMUM_WIDTH)
pixels_per_meter_X = ...
else pixels_per_meter_X = DEFAULT_RES;
The bug occurred in Windows XP but a look at the disassembly of mspaint.exe
in Windows Vista showed that it is also present in Windows Vista.
Martin