Другие языки программирования и технологии

какой winapi функцией можно полусить размеры экрана в миллиметрах либо количество пикселей на миллиметр?

лабу сдавать в 12 часов дня, только это осталось. нужно задавать графические примитивы на форме в миллиметрах.
GetDeviceCaps

VB Declaration

Declare Function GetDeviceCaps& Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As _
Long)

Description

Retrieves information regarding the capabilities of the device for the specified device context.

Use with VB

No problem.

All of the material presented here is copyrighted by either Desaware or Macmillan. No part of this material may be used or reproduced in any fashion (except in brief quotations used in critical articles and reviews) without prior consent.

ParameterType/Description
hdcLong—Device context for the device for which information is requested.
nIndexLong—Specifies the type of information to retrieve based on constants shown in Table 7.14.
Return Value

Long—Refer to Table 7.14.

Table 7.14GetDeviceCaps Index Table

ConstantInformation Returned
DRIVERVERSIONDevice driver version.
TECHNOLOGYOne of the following constants:DT_PLOTTER: Plotter.DT_RASDISPLAY: Raster display.DT_RASPRINTER: Raster printer.DT_RASCAMERA: Raster camera.DT_CHARSTREAM: Character stream.DT_METAFILE: Metafile.DT_DISPFILE: Display file.
HORZSIZEDisplay width in millimeters.
VERTSIZEDisplay height in millimeters.
HORZRESDisplay width in pixels.
VERTRESDisplay height in pixels.
LOGPIXELSXPixels/logical inch (horizontal).
LOGPIXELSYPixels/logical inch (vertical).
BITSPIXELBits/pixel (on each color plane).
PLANESNumber of color planes.
NUMBRUSHESNumber of built-in device brushes.
NUMPENSNumber of built-in device pens.
NUMMARKERSNumber of built-in device markers.
NUMFONTSNumber of built-in device fonts.
NUMCOLORSEntries in the device color table.
ASPECTXWidth of device pixel (see ASPECTXY).
ASPECTYHeight of device pixel (see ASPECTXY).
ASPECTXYDiagonal size of device pixel. These values are relative to each
----------
Остальное не влезло :(
МБ
Миша Болдырев
7 923
Лучший ответ