参见MSDN内说明CombineRgn The CombineRgn function combines two regions and stores the result in a third region. The two regions are combined according to the specified mode. int CombineRgn( HRGN hrgnDest, // handle to destination region HRGN hrgnSrc1, // handle to source region HRGN hrgnSrc2, // handle to source region int fnCombineMode // region combining mode ); 使用下面参数中的RGN_DIFF即可: RGN_AND Creates the intersection of the two combined regions. RGN_COPY Creates a copy of the region identified by hrgnSrc1. RGN_DIFF Combines the parts of hrgnSrc1 that are not part of hrgnSrc2. RGN_OR Creates the union of two combined regions. RGN_XOR Creates the union of two combined regions except for any overlapping areas.
去搜索吧,论坛里面有
The CombineRgn function combines two regions and stores the result in a third region. The two regions are combined according to the specified mode. int CombineRgn(
HRGN hrgnDest, // handle to destination region
HRGN hrgnSrc1, // handle to source region
HRGN hrgnSrc2, // handle to source region
int fnCombineMode // region combining mode
);
使用下面参数中的RGN_DIFF即可:
RGN_AND Creates the intersection of the two combined regions.
RGN_COPY Creates a copy of the region identified by hrgnSrc1.
RGN_DIFF Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
RGN_OR Creates the union of two combined regions.
RGN_XOR Creates the union of two combined regions except for any overlapping areas.
如何知道合并后图形的边数?