Connecting Tech Pros Worldwide Help | Site Map

How to draw a panel of size 2.4 x 2.4 inches with resolution 300 x 300 pixels

Newbie
 
Join Date: Oct 2009
Posts: 2
#1: 4 Weeks Ago
I am developing an application using Visual C++ express edition. The application requires the drawing of a panel of specific size and resolution.

I would like to ask if there is any way for me to specify the exact measurements (in inches) with specific resolution.

When I create a panel of resolution 300 by 300 pixels, it will be a 3.3 by 3.3 (measure with ruler) inches panel. I tried manipulating DPI of the display, but it does not work either. Any help is appreciated. Thanks!
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#2: 4 Weeks Ago

re: How to draw a panel of size 2.4 x 2.4 inches with resolution 300 x 300 pixels


2.4 x 2.4 inches on what ...
ON a 17" monitor at 1024x768
ON a 24" monitor 1920 x 1200
when it is printed

2.4 inches at 72 dpi would be 72*2.4 (screen resolution in some cases)
2.4 inches at 96 dpi would be 96*2.4 (screen resolution in other cases)
2.4 inches at 300 dpi would be 300*2.4 (average laser printer)
2.4 inches at 600 dpi would be 600*2.4 (decent laser printer)

As you can see without the context of a device size in inches is meaningless.
Newbie
 
Join Date: Oct 2009
Posts: 2
#3: 4 Weeks Ago

re: How to draw a panel of size 2.4 x 2.4 inches with resolution 300 x 300 pixels


Hi tlhintoq,

I am trying to draw it on a 17" monitor.

using Visual C++ Express, it seems to be using 96dpi as the default when it draws the panel. Thus, the size of the panel is always (300/96) inch.

Even if I increase the dpi setting of my monitor, the size of the panel does not change.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#4: 4 Weeks Ago

re: How to draw a panel of size 2.4 x 2.4 inches with resolution 300 x 300 pixels


I don't think you understand.
A 17" inch monitor might be at a resolution of 1024x768
It might be at 1280x1024
It might be a widescreen 17" at 1280x800
The size of the monitor has nothing to do with the resolution of the monitor.
You can only obtain the resolution of the monitor from WIndows.
So you can learn that it is 1024x768, but you don't know if that is spread across a 17" or 15" or a 23".

As for the 96dpi part... That's the windows norm. Just where is you think you are changing the output DPI of your video card?
Reply

Tags
dpi, fixed resolution and size, vc++, windows form