SilverScreen Solid Modeler

ask_yn

ask_yn

Previous topic Next topic  

ask_yn

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int ask_yn ( char *message )

 

char *message;        // multi-line message

 

 

 




Synopsis

#include "silver.h"

 

The ask_yn function displays a multi-line message in a dialog and waits for a response from the user.

 

 

Parameters

message is a null-terminated string, used as prompting; for any embedded vertical bar characters ('|') in message , the prompt is broken at that point, the '|' character is discarded, and the text following the '|' is placed on the subsequent line at the left edge of the prompt area.

 

 

Return Value

If the user responds affirmatively, then the function returns 1; if they reply negatively or press ESCAPE, then 0 is returned.

 

 

See Also

ask_multiple

 

Example

Here are two examples:

C / C++ Code

 

if ( ask_yn ( "Save modified drawing?" ) )

 . . .

 

if ( ask_yn ( "All files will be deleted.|Proceed?" ) )

 . . .