Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
In Windows Embedded CE, a regionis a rectangle that can be filled, painted, framed, and tested to see if it contains a particular point.
You create a region by calling CreateRectRgn, CreateRectRgnIndirect, or ExtCreateRegion. These functions return a handle identifying the new region. When using the CreateRectRgnand CreateRectRgnIndirectfunctions, use values for regions that can be represented by 16-bit integers because that is how region data is stored in Windows Embedded CE. Once you have a handle to a region, you can select the region into a device context with the SelectObjectfunction.
You can perform a variety of operations on a region. You can paint or invert its interior, draw a frame around it, retrieve its dimensions, and test whether a particular point lies within it. The following table shows what tasks you can perform on regions.
To | Call |
---|---|
Determine if two regions are equal in size and shape |
|
Paint the interior of a region with a specified brush |
|
Retrieve the dimensions of a region's bounding rectangle |
|
Retrieve data describing a region |
|
Invalidate the client area within a specified region by adding the area to the current update region of a window |
|
Move a region a specified number of logical units |
|
Determine if a point is inside a specified region |
|
Validate the client area within a region by removing the region from the current update region of a specified window |
You can also combine or compare a region with another region by calling the CombineRgnfunction. The following table shows how you can call the CombineRgnfunction to combine two regions together.
Value | Description |
---|---|
RGN_AND |
The intersecting parts of two original regions define a new region. |
RGN_COPY |
A copy of the first of the two original regions defines a new region. |
RGN_DIFF |
The part of the first region that does not intersect the second defines a new region. |
RGN_OR |
The two original regions define a new region. |
RGN_XOR |
Those parts of the two original regions that do not overlap define a new region. |
Windows Embedded CE does not support the InvertRgnor InvertRectfunctions. You can achieve the effect of InvertRectby calling the PatBltfunction with an ROP code of DSTINVERT.
When the display is changed from a left-to-right orientation to a right-to-left orientation, the origin of a region's coordinate system flips along with the region.
See Also
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.