09-04-2007 05:16 AM
09-04-2007 01:09 PM
In XP, right click on the Desktop, choose Properties, then the Settings tab, then "Advanced" button, then the "General" tab. (You can get there from the display settings in the Windows Control Panel too.)
Note that this DPI setting is NOT specific to characters - it is the whole screen. There is also a separate "Font Size" option on the "Appearance" tab of the Display Properties dialog box that has "Large" and "Normal". In general I have found the DPI setting to be more problematic; try keeping it at 96dpi if at all possible.
--Ian
09-05-2007 01:17 AM
09-05-2007 04:03 AM
The following code using the GDI functions returns the number of pixels per logical inch:
HWND hWnd;
HDC hDC=0;
int iLogPixX, iLogPixY;
GetPanelAttribute (hPanel, ATTR_SYSTEM_WINDOW_HANDLE, (int *)&hWnd);
hDC = GetDC( hWnd);
iLogPixX= GetDeviceCaps(hDC, LOGPIXELSX);
iLogPixY= GetDeviceCaps(hDC, LOGPIXELSY);
09-09-2007 04:55 PM
This may help:
Try to get the system screen resolution: GetScreenSize (&horizontalrez,&verticalrez ); (from this you can calculate the actul sizes you need in points
Gent the font info:
the GetFontTypefaceName ("", );
and finally GetTextDisplaySize ("", "", , );
Find al of this in the Miscellaneous section of User Interface Library.
layosh