GDI Functions (Compact 2013)

3/28/2014

The following table shows the graphics display interface (GDI) functions.

Name

Description

AlphaBlend

Displays bitmaps that have transparent or semitransparent pixels.

BeginPaint

Prepares the specified window for painting and fills a PAINTSTRUCT structure with information about the painting.

BitBlt

Transfers pixels from a specified source rectangle to a specified destination rectangle, altering the pixels according to the selected raster operation (ROP) code.

BitmapEscape

Passes its parameters for a bitmap allocated to a device through to the display driver’s DrvEscape function.

ChangeDisplaySettingsEx

Changes the settings of the specified display device to the specified graphics mode.

ClientToScreen

Converts the client coordinates of a specified point to screen coordinates.

CombineRgn

Combines two regions and stores the result in a third region. The two regions are combined according to the specified mode.

CopyRect

Copies the coordinates of one rectangle to another.

CreateBitmap

Creates a bitmap with the specified width, height, and bit depth.

CreateCompatibleBitmap

Creates a bitmap compatible with the device associated with the specified device context.

CreateCompatibleDC

Creates a memory device context (DC) compatible with the specified device.

CreateDC

Creates a DC for a device.

CreateDIBPatternBrushPt

Creates a logical brush that has the pattern specified by the device-independent bitmap (DIB).

CreateDIBSection

Creates a DIB that applications can write to directly.

CreatePalette

Creates a logical color palette.

CreatePatternBrush

Creates a logical brush with the specified bitmap pattern.

CreatePen

Creates a logical pen that has the specified style, width, and color.

CreatePenIndirect

Creates a logical cosmetic pen that has the style, width, and color specified in the LOGPEN structure.

CreateRectRgn

Creates a rectangular region.

CreateRectRgnIndirect

Creates a rectangular region.

CreateSolidBrush

Creates a logical brush that has the specified solid color.

DeleteDC

Deletes the specified DC.

DeleteObject

Deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object.

DrawEdge

Draws one or more edges of a rectangle.

DrawFocusRect

Draws a rectangle in the style used to indicate that the rectangle has the focus.

DrawFrameControl

Draws a frame control of the specified type and style.

Ellipse

Draws an ellipse. The center of the ellipse is the center of the specified bounding rectangle.

EndPaint

Marks the end of painting in the specified window.

EnumDisplayDevices

Obtains information about the display devices in a system.

EnumDisplaySettings

Retrieves information about one of the graphics modes for a display device.

EqualRect

Determines whether the two specified rectangles are equal by comparing the coordinates of their upper-left and lower-right corners.

EqualRgn

Checks the two specified regions to determine whether they are identical.

ExcludeClipRect

Creates a new clipping region that consists of the existing clipping region minus the specified rectangle.

ExtCreateRegion

Creates a region from the specified region data.

ExtEscape

Allows applications to access capabilities of a particular device that are not available through the GDI.

FillRect

Fills a rectangle using the specified brush.

FillRgn

Fills a region using the specified brush.

GetBkColor

Returns the current background color for the specified device context.

GetBkMode

Returns the current background mix mode for a specified device context.

GetBValue

Retrieves an intensity value for the blue component of a 32-bit RGB value.

GetClipBox

Retrieves the dimensions of the tightest bounding rectangle that can be drawn around the current visible area on the device.

GetClipRgn

Retrieves a handle that identifies the current application-defined clipping region for the specified device context.

GetCurrentObject

Returns the currently selected object of the specified type.

GetCurrentPositionEx

Retrieves the current position in logical coordinates.

GetDC

Retrieves a handle to a display device context for the client area of the specified window.

GetDCEx

Retrieves a handle to a display device context for the client area of a specified window or for the entire screen.

GetDeviceCaps

Retrieves information about the capabilities of a specified device.

GetDIBColorTable

Retrieves RGB color values from a range of entries in the color table of the DIB that is currently selected into a specified device context.

GetGValue

Retrieves an intensity value for the green component of a 32-bit RGB value.

GetLayout

Returns the layout of a device context.

GetNearestColor

Returns the system palette color that will be displayed when the specified color value is used.

GetNearestPaletteIndex

Retrieves the index for the entry in the specified logical palette that most closely matches a specified color value.

GetObject

Obtains information about a specified graphics object.

GetObjectType

Returns the type of the specified object.

GetPaletteEntries

Retrieves a specified range of palette entries from the specified logical palette.

GetPixel

Retrieves the RGB color value of the pixel at the specified coordinates.

GetRegionData

Fills the specified buffer with data that describes a region.

GetRgnBox

Retrieves the bounding rectangle of the specified region.

GetROP2

Retrieves the foreground mix mode of the specified device context.

GetRValue

Retrieves an intensity value for the red component of a 32-bit RGB value.

GetStockObject

Retrieves a handle to one of the predefined stock pens, brushes, or fonts.

GetStretchBltMode

Retrieves the current stretching mode.

GetSysColorBrush

Retrieves a handle that identifies a logical brush that corresponds to the specified color index.

GetSystemPaletteEntries

Retrieves a range of palette entries from the system palette associated with the specified device context.

GetOutlineTextMetrics

Retrieves text metrics for TrueType fonts.

GetUpdateRect

Retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window in client coordinates.

GetUpdateRgn

Retrieves the update region of a window by copying it into the specified region.

GetViewportExtEx

Retrieves the x-extent and y-extent of the current viewport for the specified device context.

GetViewportOrgEx

Retrieves the x-coordinates and y-coordinates of the viewport origin for the specified device context.

GetWindowDC

Retrieves the DC for the entire window, including title bar, menus, and scroll bars.

GetWindowExtEx

Retrieves the x-extent and y-extent of the window for the specified device context.

GetWindowOrgEx

Retrieves the x-coordinates and y-coordinates of the window origin for the specified device context.

GetWindowRgn

Obtains a copy of the window region of a window.

GradientFill

Fills rectangular regions with a background color that is interpolated from color values specified at the vertices.

InflateRect

Increases or decreases the width and height of the specified rectangle.

IntersectClipRect

Creates a new clipping region from the intersection of the current clipping region and the specified rectangle.

IntersectRect

Calculates the intersection of two source rectangles and places the coordinates of the intersection rectangle into the destination rectangle.

InvalidateRect

Adds a rectangle to the specified window's update region.

InvalidateRgn

Invalidates the client area within the specified region by adding the area to the current update region of a window.

InvertRect

Inverts a rectangle in a window by performing a logical NOT operation on the color values for each pixel in the rectangle's interior.

IsRectEmpty

Determines whether the specified rectangle is empty.

LineTo

Draws a line from the current position up to, but not including, the specified point.

LoadBitmap

Loads the specified bitmap resource from the executable file for a module.

MapWindowPoints

Converts, or maps, a set of points from a coordinate space relative to one window to a coordinate space relative to another window.

MaskBlt

Combines the color data for the source and destination bitmaps by using the specified mask and raster operation.

MoveToEx

Updates the current position to the specified point and optionally retrieves the previous position.

OffsetRect

Moves the specified rectangle by the specified offsets.

OffsetRgn

Moves a region by the specified offsets.

OffsetViewportOrgEx

Modifies the viewport origin for a device context using the specified horizontal and vertical offsets.

PatBlt

Paints the given rectangle using the brush that is currently selected into the specified device context.

Polygon

Draws a polygon that consists of two or more vertices that are connected by straight lines.

Polyline

Draws a series of line segments by connecting the points in the specified array.

PtInRect

Determines whether the specified point lies within the specified rectangle.

PtInRegion

Determines whether the specified point is inside the specified region.

RealizePalette

Maps palette entries from the current logical palette to the system palette.

Rectangle

Draws a rectangle.

RectInRegion

Determines whether any part of the specified rectangle is within the boundaries of a region.

RectVisible

Determines whether any part of the specified rectangle lies within the clipping region of the specified device context.

RedrawWindow

Updates the specified rectangle or region in the client area of a window.

ReleaseDC

Releases a DC, freeing it for use by other applications.

RestoreDC

Restores a DC to the specified state.

RoundRect

Draws a rectangle with rounded corners.

SaveDC

Saves the current state of the specified device context by copying data that describes selected objects and graphic modes (such as the bitmap, brush, palette, font, pen, region, and drawing mode) to a context stack.

ScreenToClient

Converts the screen coordinates of a specified point on the screen to client coordinates.

SelectClipRgn

Selects a region as the current clipping region for the specified device context.

SelectObject

Selects an object into a specified device context.

SelectPalette

Selects the specified logical palette into a device context.

SetBitmapBits

Sets the bits of color data for a bitmap to the specified values.

SetBkColor

Sets the current background color to the specified color.

SetBkMode

Sets the background mix mode of the specified device context.

SetBrushOrgEx

Called by an application to set the brush origin of the next brush selected into the specified device context.

SetDIBColorTable

Sets RGB color values in a range of entries in the color table of the DIB that is currently selected into a specified device context.

SetDIBitsToDevice

Sets the pixels in the specified rectangle on the device that is associated with the destination device context by using color data from a DIB.

SetLayout

Changes the layout of a device context.

SetPaletteEntries

Sets RGB color values and flags in a range of entries in a logical palette.

SetPixel

Sets the pixel at the specified coordinates to the specified color.

SetRect

Sets the coordinates of the specified rectangle.

SetRectEmpty

Creates an empty rectangle in which all coordinates are set to zero.

SetRectRgn

Changes a region into a rectangular region with the specified coordinates.

SetROP2

Sets the current foreground mix mode. GDI uses the foreground mix mode to combine pens and interiors of filled objects with the colors already on the screen.

SetStretchBltMode

Sets the bitmap stretching mode in a specified device context.

SetViewportOrgEx

Sets the viewpoint origin of a device context to the specified coordinates.

SetWindowOrgEx

This function specifies which window point maps to the viewport origin (0,0).

SetWindowRgn

Sets the window region of a window.

StretchBlt

Copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary.

StretchDIBits

Copies the color data for a rectangle of pixels in a DIB to the specified destination rectangle.

SubtractRect

Obtains the coordinates of a rectangle determined by subtracting one rectangle from another.

TransparentBlt

Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

TransparentImage

Transfers a bitmap, omitting the portions drawn in a specified color.

UnionRect

Creates the union of two rectangles.

UpdateWindow

Updates the client area of the specified window by sending a WM_PAINT message to the window if the window's update region is not empty.

ValidateRect

Validates the client area within a rectangle by removing the rectangle from the update region of the specified window.

ValidateRgn

Validates the client area within a region by removing the region from the current update region of the specified window.

See Also

Reference

GDI Reference