04-06-2007, 07:56 PM
ken gray Wrote:HAHAHAHA!
this is nice; where can i learn more about the options?
You can combine different regions style, if for example i want to combine a circular region with rect region i've used this:
function int'hDlg
dll gdi32 #CreateEllipticRgn int int int int
dll gdi32 #CreateRectRgn int int int int
int Rgn1=CreateEllipticRgn(19,52,110,143) ;First elliptic Region
int Rgn2=CreateRectRgn(55,81,150,180) ;Second Rectangular Region
int x y width height
GetWinXY(win() &x &y &width &height)
;Temporal Region , i made this because of avoiding memory overflow, maybe there is another way but it works ;)
int RgnTmp=CreateRectRgn(0,0,width,height); temporal Region
int Result=CombineRgn(RgnTmp,Rgn1,Rgn2,RGN_OR); combining Regions
SetWindowRgn hDlg RgnTmp ;seting the combined Region to that dialog.Using RGN_OR combines both regions but also you can use:
( the following text was extracted from Microsoft MSDN documentation )
Quote: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.
I hope this was helpful.
Regards.
