Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>getdevicecaps()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetDeviceCaps()
Return information about a device
------------------------------------------------------------------------------

Syntax
GetDeviceCaps( <hDC>, <nCapability> )   -->   nValue

Arguments
<hDC> is a handle to the device context.

<nCapability> is an integer specifying the information wanted.

Returns
The returned value is an integer specifying one of the
capabilities of the device.

Description
Each actual device has a number of capabilities, such as
resolution, width and height.  The most useful (defined in
WINDOWS.CH) are:

     nCapability         meaning

     HORZRES        width (horizontal resolution), in pixels

     VERTRES        height (vertical resolution), in pixels

     HORZSIZE       width (horizontal resolution), in millimeters

     VERTSIZE       height (vertical resolution), in millimeters

Example
hDC = GetPrintDC()
nWidth = GetDeviceCaps( hDC, HORZRES )
? "Horiz. resolution in pixels", nWidth


See Also: CreateDC() GetPrintDC() DeleteDC()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson