1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
<html>
<head>
<title>EAGLE Help: dlgReject()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>dlgReject()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Closes the dialog and rejects its contents.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>void dlgReject([ <i>int Result</i> ]);</tt>
<p>
<dt>
<b>Description</b>
<dd>
The <tt>dlgReject</tt> function causes the <a href=291.htm>dlgDialog</a> to be closed
and return after the current statement sequence has been completed.
<p>
Any changes the user has made to the dialog values will be discarded.
The variables that have been given when the <a href=287.htm>dialog objects</a>
were defined will be reset to their original values when the dialog returns.
<p>
The optional <tt>Result</tt> is the value that will be returned by the dialog.
Typically this should be <tt>0</tt> or a negative integer value.
If no value is given, it defaults to <tt>0</tt>.
<p>
Note that <tt>dlgReject()</tt> does return to the normal program execution,
so in a sequence like
<pre>
dlgPushButton("Cancel") {
dlgReject();
dlgMessageBox("Rejecting!");
}
</pre>
the statement after <tt>dlgReject()</tt> will still be executed!
<p>
Calling <tt>dlgReject()</tt> implies a call to <a href=315.htm><tt>dlgReset()</tt></a>.
</dl>
<b>See also</b> <a href=313.htm>dlgAccept</a>,
<a href=315.htm>dlgReset</a>,
<a href=291.htm>dlgDialog</a>,
<a href=318.htm>A Complete Example</a>
<p>
<b>Example</b>
<pre>
int Result = dlgDialog("Test") {
dlgPushButton("+OK") dlgAccept(42);
dlgPushButton("Cancel") dlgReject();
};
</pre>
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|