Important: The information in this document is obsolete and should not be used for new development.
Creating Alerts
To create an alert--consisting of an alert sound, an alert box, or both--use one of
these functions:NoteAlert
,CautionAlert
,StopAlert
, andAlert
. The first
three functions display, respectively, the note, caution, and stop alert icons (see
Figure 6-3, Figure 6-4, and Figure 6-5) in the upper-left corner of the alert box. TheAlert
function allows you to display your own icon or to have no icon at all in the upper-left corner of your alert box.These functions take descriptive information about the alert from an alert resource that you provide. When you call one of these functions, you pass it the resource ID of the alert resource and a pointer to an event filter function. These functions create a dialog record, play an alert sound, and display an alert box according to the alert stages that you specify in the alert resource.
You should specify a pointer to an event filter function when you call the
Alert
,StopAlert
,CautionAlert
, andNoteAlert
functions. You can use the same
event filter function in most or all of your alert and modal dialog boxes.If you need to find out the current alert stage--for example, to ensure that your application deactivates the frontmost window only if an alert box is to be displayed at that stage--use the
GetAlertStage
function. To change the current alert stage, use theResetAlertStage
procedure.Your application does not dispose of alert boxes; the Dialog Manager does that for you automatically.
Subtopics
- Alert
- StopAlert
- NoteAlert
- CautionAlert
- GetAlertStage
- ResetAlertStage