Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MAKING IRREGULAR WINDOWS
#1
I have been trying to make a circular window i've got this:

Code:
Copy      Help
dll gdi32
,#CreateEllipticRgn int int int int

int m=CreateEllipticRgn(10,10,100,100)
SetWindowRgn act m 1

(you could use '0' instead of 'm' to set default Region to that window)

Maybe it could help anyone.

Regards
#2
HAHAHAHA!

this is nice; where can i learn more about the options?
An old blog on QM coding and automation.

The Macro Hook
#3
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:

Code:
Copy      Help
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.
#4
man this is awesome!
An old blog on QM coding and automation.

The Macro Hook
#5
how can i restore the window size?
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)