标题：SelectClipRgn
CDC::SelectClipRgn 原型：
virtualint SelectClipRgn(CRgn*pRgn);
int SelectClipRgn(CRgn*pRgn,intnMode);
返回值
The region’s type. It can be any of the following values: 
区域类型，可为下列值之一： 
COMPLEXREGION   New clipping region has overlapping borders.
COMPLEXREGION 剪切区有覆盖的边界。 
ERROR   Device context or region is not valid.
ERROR 设备上下文无效。 
NULLREGION   New clipping region is empty.
NULLREGION 新剪切区为空。 
SIMPLEREGION   New clipping region has no overlapping borders.
SIMPLEREGION 剪切区无覆盖边界。 
参数说明
pRgn
Identifies the region to be selected. 
表明被选择的区域。 
For the first version of this function, if this value is NULL, the entire client area is selected and output is still clipped to the window.
在函数的第一种版本中，如果该值为NULL，整个客户区被选中，输出仍剪切到窗口。 
For the second version of this function, this handle can be NULLonly when the RGN_COPYmode is specified.
在函数的第二种版本中，只有指定了RGN_COPY时，该句柄才能为NULL。 
nMode
Specifies the operation to be performed. It must be one of the following values: 
指定要进行的操作，可为下列值之一： 
RGN_AND   The new clipping region combines the overlapping areas of the current clipping region and the region identified by pRgn.
RGN_AND 新剪切区包含与当前剪切区的覆盖部分，区域由pRgn标识。 
RGN_COPY   The new clipping region is a copy of the region identified by pRgn. This is functionality is identical to the first version of SelectClipRgn. If the region identified by pRgnis NULL, the new clipping region becomes the default clipping region (a null region).
RGN_COPY 新剪切区是pRgn标识区域的拷贝，这与SelectClipRgn的第一种版本相同。如果pRgn标识的区域为NULL，则新剪切区成为缺省的剪切区（空区域）。
RGN_DIFF   The new clipping region combines the areas of the current clipping region with those areas excluded from the region identified by pRgn.
RGN_DIFF 新剪切区包括当前剪切区和被pRgn标识区域所排除的区域。 
RGN_OR   The new clipping region combines the current clipping region and the region identified by pRgn.
RGN_OR 新剪切区包括当前剪切区和pRgn标识区域。 
RGN_XOR   The new clipping region combines the current clipping region and the region identified by pRgnbut excludes any overlapping areas.
RGN_XOR 新剪切区包括当前剪切区和pRgn标识区域，但不包括覆盖区域。 
备注
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 SelectClipRgnfunction using text units.
函数假设给定区域的坐标都使用设备坐标。某些打印机为保持文本的精确度，支持用比图形输出更高的分辨率进行文本输出。这些设备在更高的分辨率下报告设备单位，即使用文本单位。然后为图形缩放坐标以便使几个设备单位与1图形单位对应。可以调用使用文本单位的SelectClipRgn函数。 
Applications that must take the scaling of graphics objects in the GDI can use the GETSCALINGFACTORprinter 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.
在GDI中必须使用图形缩放的应用，可以使用GETSCALINGFACTOR打印程序脱离来决定缩放因子。缩放因子影响剪切。如果某区域用于剪切图形，GDI用缩放因子来分解坐标。如果用于剪切文字，GDI不作缩放调整，缩放因子为1，坐标将被2除；缩放因子为2，坐标将被4除，依此类推。