Hi Sean,
In snippet below, do you know what this is about?
if(not dll.call("SetWindowRgn|ui ui i",hWnd,hRgn,1))
dll.call("DeleteObject|ui",hRgn)
Why does one delete hRgn only if SetWindowRgn fails?
--- In [email protected], "swzoh" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "entropyreduction" <lists@> wrote:
>
> Hi Alan,
>
> > Wanna give me a code snippet in which you need your array of POINTs?
> > Need something to test my stuff for initialising an array.
>
> Sure, here it is. .PeepHole() will drill a star-shaped hole in a
> window. Use .PeepHole(1) to restore.
>
> ---------------- PeepHole.PowerPro ----------------------------------
> @Hole
> local hWnd,hRgn,wRgn,cRgn,round,aPoints,p1,p2,p3,p4,p5
> hWnd=win.handle("under")
> round=12
>
> p1=dll.create_struct("i i",350,350)
> p2=dll.create_struct("i i",650,350)
> p3=dll.create_struct("i i",400,500)
> p4=dll.create_struct("i i",500,250)
> p5=dll.create_struct("i i",600,500)
> aPoints=dll.create_struct("t t t t t",p1,p2,p3,p4,p5)
> ;; dll.create_array(5,"t")
>
> cRgn=dll.call("CreatePolygonRgn|t* i i",aPoints,5,2)
> wRgn=dll.call("CreateRoundRectRgn|i i i i i i",0,0, ;;+
> win.width(hwnd),win.height(hwnd)+round,round,round)
> hRgn=dll.call("CreateRectRgn|i i i i",0,0,0,0)
> dll.call("CombineRgn|ui ui ui i",hRgn,wRgn,cRgn,3-arg(1))
> if(not dll.call("SetWindowRgn|ui ui i",hWnd,hRgn,1))
> dll.call("DeleteObject|ui",hRgn)
> dll.call("DeleteObject|ui",wRgn)
> dll.call("DeleteObject|ui",cRgn)
> quit
> ---------------------------------------------------------------------
>
> Sean
>
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/