---
name: "SetVirtualResolution"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SetVirtualResolution"
---

# SetVirtualResolution(3w)

## NAME

**SetVirtualResolution** (GDI32.@)

## SYNOPSIS

BOOL SetVirtualResolution\
  (\
   HDC   *hdc*,\
   DWORD *horz\_res*,\
   DWORD *vert\_res*,\
   DWORD *horz\_size*,\
   DWORD *vert\_size*\
  )

## DESCRIPTION

Undocumented on msdn.

Changes the values of screen size in pixels and millimeters used by the mapping mode functions.

## PARAMS

*hdc* **\[In\]**  Device context.

*horz\_res* **\[In\]**  Width in pixels (equivalent to **HORZRES** device cap).

*vert\_res* **\[In\]**  Height in pixels (equivalent to **VERTRES** device cap).

*horz\_size* **\[In\]**  Width in mm (equivalent to **HORZSIZE** device cap).

*vert\_size* **\[In\]**  Height in mm (equivalent to **VERTSIZE** device cap).

## RETURNS

**TRUE** if successful. **FALSE** if any (but not all) of the last four params are zero.

## NOTES

This doesn't change the values returned by GetDeviceCaps, just the scaling of the mapping modes.

Calling with the last four params equal to zero sets the values back to their defaults obtained by calls to GetDeviceCaps.

## IMPLEMENTATION

Declared in **"gdi\_private.h"**.

Implemented in **"dlls/gdi32/mapping.c"**.

Debug channel **"dc"**.
