void InvertRect(hDC,lpRect)
This function inverts the contents of the given rectangle. On monochrome displays, the InvertRect function makes white pixels black, and black pixels white. On color displays, the inversion depends on how colors are generated for the display. Calling InvertRect twice with the same rectangle restores the display to its previous colors.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
lpRect | LPRECT Points to a RECT data structure that contains the logical coordinates of the rectangle to be inverted. |
None.
The InvertRect function compares the values of the top, bottom, left, and right fields of the specified rectangle. If bottom is less than or equal to top, or if right is less than or equal to left, the rectangle is not drawn.