CDC::SelectClipRgn 

virtual int SelectClipRgn( CRgn* pRgn );

int SelectClipRgn( CRgn* pRgn, int nMode );

Return Value

The region’s type. It can be any of the following values:

Parameters

pRgn

Identifies the region to be selected.

nMode

Specifies the operation to be performed. It must be one of the following values:

Remarks

Selects the given region as the current clipping region for the device context. Only a copy of the selected region is used. The region itself can be selected for any number of other device contexts, or it can be deleted.

The function assumes that the coordinates for the given region are specified in device units. Some printer devices support text output at a higher resolution than graphics output in order to retain the precision needed to express text metrics. These devices report device units at the higher resolution, that is, in text units. These devices then scale coordinates for graphics so that several reported device units map to only 1 graphic unit. You should always call the SelectClipRgn function using text units.

Applications that must take the scaling of graphics objects in the GDI can use the GETSCALINGFACTOR printer escape to determine the scaling factor. This scaling factor affects clipping. If a region is used to clip graphics, GDI divides the coordinates by the scaling factor. If the region is used to clip text, GDI makes no scaling adjustment. A scaling factor of 1 causes the coordinates to be divided by 2; a scaling factor of 2 causes the coordinates to be divided by 4; and so on.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::GetClipBox, CDC::Escape, CRgn ::SelectClipRgn