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

# ChoosePixelFormat(3w)

## NAME

**ChoosePixelFormat** (GDI32.@)

## SYNOPSIS

INT ChoosePixelFormat\
  (\
   HDC                          *hdc*,\
   const PIXELFORMATDESCRIPTOR\* *ppfd*\
  )

## DESCRIPTION

Matches a pixel format to given format.

## PARAMS

*hdc* **\[In\]**  Device context to search for best pixel match.

*ppfd* **\[In\]**  Pixel format for which a match is sought.

## RETURNS

**Success:** Pixel format index closest to given format

**Failure:** **0**

## IMPLEMENTATION

Declared in **"wingdi.h"**.

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

Debug channel **"gdi"**.
