GDI Functions

Send Feedback

The following table shows the GDI functions with a description of the purpose of each.

Programming element PPC SP Description
AlphaBlend X X This function displays bitmaps that have transparent or semitransparent pixels.
BeginPaint X X This function prepares the specified window for painting and fills a PAINTSTRUCT structure with information about the painting.
BitBlt X X This function transfers pixels from a specified source rectangle to a specified destination rectangle, altering the pixels according to the selected raster operation (ROP) code.
ChangeDisplaySettingsEx X X This function changes the settings of the specified display device to the specified graphics mode.
ClientToScreen X X This function converts the client coordinates of a specified point to screen coordinates.
CombineRgn X X This function combines two regions and stores the result in a third region. The two regions are combined according to the specified mode.
CopyRect X X This function copies the coordinates of one rectangle to another.
CreateBitmap X X This function creates a bitmap with the specified width, height, and bit depth.
CreateCompatibleBitmap X X This function creates a bitmap compatible with the device associated with the specified device context.
CreateCompatibleDC X X This function creates a memory device context (DC) compatible with the specified device.
CreateDC X X This function creates a DC for a device.
CreateDIBPatternBrushPt X X This function creates a logical brush that has the pattern specified by the device-independent bitmap (DIB).
CreateDIBSection X X This function creates a DIB that applications can write to directly.
CreatePalette X X This function creates a logical color palette.
CreatePatternBrush X X This function creates a logical brush with the specified bitmap pattern.
CreatePen X X This function creates a logical pen that has the specified style, width, and color.
CreatePenIndirect X X This function creates a logical cosmetic pen that has the style, width, and color specified in the LOGPEN structure.
CreateRectRgn X X This function creates a rectangular region.
CreateRectRgnIndirect X X This function creates a rectangular region.
CreateSolidBrush X X This function creates a logical brush that has the specified solid color.
DeleteDC X X This function deletes the specified DC.
DeleteObject X X This function deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object.
DrawEdge X X This function draws one or more edges of a rectangle.
DrawFocusRect X X This function draws a rectangle in the style used to indicate that the rectangle has the focus.
DrawFrameControl X X This function draws a frame control of the specified type and style.
Ellipse X X This function draws an ellipse. The center of the ellipse is the center of the specified bounding rectangle.
EndPaint X X This function marks the end of painting in the specified window.
EnumDisplayDevices X X This function obtains information about the display devices in a system.
EnumDisplaySettings X X This function retrieves information about one of the graphics modes for a display device.
EqualRect X X This function determines whether the two specified rectangles are equal by comparing the coordinates of their upper-left and lower-right corners.
EqualRgn X X This function checks the two specified regions to determine whether they are identical.
ExcludeClipRect X X This function creates a new clipping region that consists of the existing clipping region minus the specified rectangle.
ExtCreateRegion X X This function creates a region from the specified region data.
ExtEscape X X This function allows applications to access capabilities of a particular device that are not available through the GDI.
FillRect X X This function fills a rectangle using the specified brush.
FillRgn X X This function fills a region using the specified brush.
GetBkColor X X This function returns the current background color for the specified device context.
GetBkMode X X This function returns the current background mix mode for a specified device context.
GetBValue X X This macro retrieves an intensity value for the blue component of a 32-bit RGB value.
GetClipBox X X This function retrieves the dimensions of the tightest bounding rectangle that can be drawn around the current visible area on the device.
GetClipRgn X X This function retrieves a handle identifying the current application-defined clipping region for the specified device context.
GetCurrentObject X X This function returns the currently selected object of the specified type.
GetCurrentPositionEx X X This function retrieves the current position in logical coordinates.
GetDC X X This function retrieves a handle to a display device context for the client area of the specified window.
GetDCEx X X This function retrieves a handle to a display device context for the client area of a specified window or for the entire screen.
GetDeviceCaps X X This function retrieves information about the capabilities of a specified device.
GetDIBColorTable X X This function retrieves red, green, and blue color values from a range of entries in the color table of the DIB that is currently selected into a specified device context.
GetGValue X X This macro retrieves an intensity value for the green component of a 32-bit RGB value.
GetLayout X X This function returns the layout of a device context.
GetNearestColor X X This function returns the system palette color that will be displayed when the specified color value is used.
GetNearestPaletteIndex X X This function retrieves the index for the entry in the specified logical palette that most closely matches a specified color value.
GetObject X X This function obtains information about a specified graphics object.
GetObjectType X X This function returns the type of the specified object.
GetPaletteEntries X X This function retrieves a specified range of palette entries from the specified logical palette.
GetPixel X X This function retrieves the RGB color value of the pixel at the specified coordinates.
GetRegionData X X This function fills the specified buffer with data describing a region.
GetRgnBox X X This function retrieves the bounding rectangle of the specified region.
GetROP2 X X This function retrieves the foreground mix mode of the specified device context.
GetRValue X X This macro retrieves an intensity value for the red component of a 32-bit RGB value.
GetStockObject X X This function retrieves a handle to one of the predefined stock pens, brushes or fonts.
GetStretchBltMode X X This function retrieves the current stretching mode.
GetSysColorBrush X X This function retrieves a handle identifying a logical brush that corresponds to the specified color index.
GetSystemPaletteEntries X X This function retrieves a range of palette entries from the system palette associated with the specified device context.
GetOutlineTextMetrics X X This function retrieves text metrics for TrueType fonts.
GetUpdateRect X X This function retrieves the coordinates of the smallest rectangle that completely encloses the update region of the specified window in client coordinates.
GetUpdateRgn X X This function retrieves the update region of a window by copying it into the specified region.
GetViewportExtEx X X This function retrieves the x-extent and y-extent of the current viewport for the specified device context.
GetViewportOrgEx X X This function retrieves the x-coordinates and y-coordinates of the viewport origin for the specified device context.
GetWindowDC X X This function retrieves the DC for the entire window, including title bar, menus, and scroll bars.
GetWindowExtEx X X This function retrieves the x-extent and y-extent of the window for the specified device context.
GetWindowOrgEx X X This function retrieves the x-coordinates and y-coordinates of the window origin for the specified device context.
GetWindowRgn X X This function obtains a copy of the window region of a window.
GradientFill X X This function fills rectangular regions with a background color that is interpolated from color values specified at the vertices.
InflateRect X X This function increases or decreases the width and height of the specified rectangle.
IntersectClipRect X X This function creates a new clipping region from the intersection of the current clipping region and the specified rectangle.
IntersectRect X X This function calculates the intersection of two source rectangles and places the coordinates of the intersection rectangle into the destination rectangle.
InvalidateRect X X This function adds a rectangle to the specified window's update region.
InvalidateRgn X X This function invalidates the client area within the specified region by adding the area to the current update region of a window.
InvertRect X X This function 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 X X This function determines whether the specified rectangle is empty.
LineTo X X This function draws a line from the current position up to, but not including, the specified point.
LoadBitmap X X This function loads the specified bitmap resource from the executable file for a module.
MapWindowPoints X X This function converts, or maps, a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
MaskBlt X X This function combines the color data for the source and destination bitmaps using the specified mask and raster operation.
MoveToEx X X This function updates the current position to the specified point and optionally retrieves the previous position.
OffsetRect X X This function moves the specified rectangle by the specified offsets.
OffsetRgn X X This function moves a region by the specified offsets.
OffsetViewportOrgEx X X This function modifies the viewport origin for a device context using the specified horizontal and vertical offsets.
PatBlt X X This function paints the given rectangle using the brush that is currently selected into the specified device context.
Polygon X X This function draws a polygon consisting of two or more vertices connected by straight lines.
Polyline X X This function draws a series of line segments by connecting the points in the specified array.
PtInRect X X This function determines whether the specified point lies within the specified rectangle.
PtInRegion X X This function determines whether the specified point is inside the specified region.
RealizePalette X X This function maps palette entries from the current logical palette to the system palette.
Rectangle X X This function draws a rectangle.
RectInRegion X X This function determines whether any part of the specified rectangle is within the boundaries of a region.
RectVisible X X This function determines whether any part of the specified rectangle lies within the clipping region of the specified device context.
RedrawWindow X X This function updates the specified rectangle or region in the client area of a window.
ReleaseDC X X This function releases a DC, freeing it for use by other applications.
RestoreDC X X This function restores a DC to the specified state.
RoundRect X X This function draws a rectangle with rounded corners.
SaveDC X X This function saves the current state of the specified device context by copying data describing selected objects and graphic modes (such as the bitmap, brush, palette, font, pen, region, and drawing mode) to a context stack.
ScreenToClient X X This function converts the screen coordinates of a specified point on the screen to client coordinates.
SelectClipRgn X X This function selects a region as the current clipping region for the specified device context.
SelectObject X X This function selects an object into a specified device context.
SelectPalette X X This function selects the specified logical palette into a device context.
SetBitmapBits X X This function sets the bits of color data for a bitmap to the specified values.
SetBkColor X X This function sets the current background color to the specified color.
SetBkMode X X This function sets the background mix mode of the specified device context.
SetBrushOrgEx X X This function is called by an application to set the brush origin of the next brush selected into the specified device context.
SetDIBColorTable X X This function sets red, green, and blue color values in a range of entries in the color table of the DIB that is currently selected into a specified device context.
SetDIBitsToDevice X X This function sets the pixels in the specified rectangle on the device that is associated with the destination device context using color data from a DIB.
SetLayout X X This function changes the layout of a device context.
SetPaletteEntries X X This function sets RGB color values and flags in a range of entries in a logical palette.
SetPixel X X This function sets the pixel at the specified coordinates to the specified color.
SetRect X X This function sets the coordinates of the specified rectangle.
SetRectEmpty X X This function creates an empty rectangle in which all coordinates are set to zero.
SetRectRgn X X This function changes a region into a rectangular region with the specified coordinates.
SetROP2 X X This function 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 X X This function sets the bitmap stretching mode in a specified device context.
SetViewportOrgEx X X This function sets the viewpoint origin of a device context to the specified coordinates.
SetWindowOrgEx X X This function specifies which window point maps to the viewport origin (0,0).
SetWindowRgn X X This function sets the window region of a window.
StretchBlt X X This function 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 X X This function copies the color data for a rectangle of pixels in a DIB to the specified destination rectangle.
SubtractRect X X This function obtains the coordinates of a rectangle determined by subtracting one rectangle from another.
TransparentBlt X X This function 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 X X This function transfers a bitmap, omitting the portions drawn in a specified color.
UnionRect X X This function creates the union of two rectangles.
UpdateWindow X X This function 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 X X This function validates the client area within a rectangle by removing the rectangle from the update region of the specified window.
ValidateRgn X X This function validates the client area within a region by removing the region from the current update region of the specified window.

See Also

GDI Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.