FillRgn The FillRgn function fills a region by using the specified brush. BOOL FillRgn( HDC hdc, // handle to device context HRGN hrgn, // handle to region to be filled HBRUSH hbr // handle to brush used to fill the region );
int CombineRgn( HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2, int fnCombineMode ); 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 FillRgn function fills a region by using the specified brush. BOOL FillRgn(
HDC hdc, // handle to device context
HRGN hrgn, // handle to region to be filled
HBRUSH hbr // handle to brush used to fill the region
);
怎么算呀?例如我现在直到一块大区域 rt0, 它上面是2块小区域,不规则,rt1,rt3,怎么求剩下的不规则的区域的HRGN
HRGN hrgnDest,
HRGN hrgnSrc1,
HRGN hrgnSrc2,
int fnCombineMode
);
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.用红色那个即可
一个是你的DC1,一个是全黑的DC2
用::TransparentBlt(DC2 ,...,DC1 ,...,RGB(红))贴图