Important: The information in this document is obsolete and should not be used for new development.
CautionAlert
To display an alert box with a caution icon in its upper-left corner (or, if appropriate for the alert stage, to play an alert sound instead of or in addition to displaying the alert box), use theCautionAlertfunction.
FUNCTION CautionAlert (alertID: Integer; filterProc: ModalFilterProcPtr): Integer;
alertID- The resource ID of an alert resource. If the alert resource is missing, the Dialog Manager returns to your application without creating the requested alert.
filterProc- A pointer to a function that responds to events not handled by the
ModalDialogprocedure. If you set this parameter toNIL, the
Dialog Manager uses the standard event filter function, which allows users to press the Return or Enter key in lieu of clicking the default button. However, your application should provide a simple event filter function that also allows background applications to receive update events. Pass a pointer to the event filter function in this parameter.DESCRIPTION
TheCautionAlertfunction is the same as theAlertfunction except that, before drawing the items in the alert box,CautionAlertdraws the caution icon in the upper-left corner (within the rectangle with local coordinates [10,20,42,52]). The caution icon has the following resource ID:
CONST cautionIcon = 2; {caution icon}By default, the Dialog Manager uses the standard caution icon from the System file.
You can change this icon by providing your own'ICON'resource with this resource
ID number.Use a caution alert to alert the user of an operation that may have undesirable results if it's allowed to continue. Give the user the choice of continuing the action (by clicking an OK button) or stopping it (by clicking a Cancel button).
SEE ALSO
Figure 6-4 on page 6-9 illustrates the caution icon in a typical caution alert. Except
that it includes a caution icon in the alert box,CautionAlertis identical to theAlertfunction. See the description of theAlertfunction on page 6-99 for detailed information about the parameters and behavior of both of these functions.