Older Newer
Tue, 31 Dec 2019 09:00:49 . . . . SyneRyder [fix typos]


Changes by last author:

Added:
= setDialogRegion =

== Syntax ==

int setDialogRegion(region R)

== Arguments ==

:R

::A visual region R of any shapes (see comments).

== Return ==

Returns non-zero if the function succeeds, zero if the function fails.

== Description ==

Allows to reshape the dialog, by using a region. In the example code below, the dialog becomes circular.

== Example ==

<code>

%ffp

Dialog: Size=(300,300)

Dialog: Drag = Background

ctl[CTL_CANCEL]: PUSHBUTTON, Text="Cancel", Pos=(55,150), size=(40,14)

ctl[CTL_OK]: PUSHBUTTON, Text="OK", Pos=(100,150), size=(40,14)

ctl[CTL_PREVIEW]: Modify, Pos=(65,25), Size=(100,100)

OnFilterStart:{

setDialogRegion( createCircularRgn(20, 20, 200) );

return false;

}

//------ Any effect ....

R:255-R

G:255-G

B:255-B

</code>

== See Also ==

refreshRgn, createRectRgn, createRoundRectRgn, createCircularRgn, createEllipticRgn, createPolyRgn

== Comments ==

"region" correspond to a particular Windows type object that might need to be better documented or defined. You can't directly cast it to an integer, despite it behaving like an integer.

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.