Painting functions prepare a window for painting and carry out some useful general-purpose graphics operations. Although all the paint functions are specifically intended for the system display, some can be used for other output devices. Following are the painting functions:
Function | Description |
BeginPaint | Prepares a window for painting. |
DrawFocusRect | Draws a rectangle in the style used to indicate focus. |
DrawIcon | Draws an icon. |
DrawText | Draws characters of a specified string. |
EndPaint | Marks the end of window repainting. |
ExcludeUpdateRgn | Prevents drawing within invalid areas of a window. |
FillRect | Fills a given rectangle by using the specified brush. |
FrameRect | Draws a border for the given rectangle. |
GetDC | Retrieves the display context for the client area. For more information about device contexts, see Section 1.2.12, “Class and Private Display Contexts,” and Section 1.6.2, “Display Context Types.” |
GetDCEx | Retrieves the display context for the client area (as does the GetDC function). For more information about device contexts, see Section 1.2.12, “Class and Private Display Contexts,” and Section 1.6.2, “Display Context Types.” |
GetUpdateRect | Copies the dimensions of a window region's bounding rectangle. |
GetUpdateRgn | Copies a window's update region. |
GetWindowDC | Retrieves the display context for an entire window. For more information about device contexts, see Section 1.2.12, “Class and Private Display Contexts,” and Section 1.6.2, “Display Context Types.” |
GrayString | Writes the characters of a string by using gray text. |
InvalidateRect | Marks a rectangle for repainting. |
InvalidateRgn | Marks a region for repainting. |
InvertRect | Inverts the display bits of the specified rectangle. |
LockWindowUpdate | Disables or reenables drawing in a window. |
RedrawWindow | Updates a rectangle or region within a window's client area. |
ReleaseDC | Releases a display context. For more information about device contexts, see Section 1.2.12, “Class and Private Display Contexts,” and Section 1.6.2, “Display Context Types.” |
UpdateWindow | Notifies the application when parts of a window need redrawing. |
ValidateRect | Releases the specified rectangle from repainting. |
ValidateRgn | Releases the specified region from repainting. |
For detailed information about the painting functions, see the Microsoft Windows Programmer's Reference, Volume 2.