Error

Syntax

int Error(string promptString, ...)

Arguments

promptString
Specifies the prompt string for the error message window. This string may contain printf-style format descriptors, which will be expanded using the succeeding arguments.
...
Variable number of arguments of varying types, should correspond to the format descriptors in promptString.

Return

IDCANCEL, IDRETRY or IDIGNORE depending on which button the user clicks.

Description

This function displays an error box containing a text string, a CANCEL, a RETRY and an IGNORE button. Clicking the CANCEL button returns the value IDCANCEL, clicking on RETRY returns the value IDRETRY and clicking on IGNORE the value IDIGNORE.

Example

Error ( "The setting %d of the scrollbar %d\nis not allowed", ctl(i), i );

if ( Error ( "I'm not in the mood" ) == IDIGNORE)
   Warn( "If you ignore me, I'll\ndeinstall !H" );

Also see

msgBox

Comments

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