Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtNotice()

Display a message and wait for acknowledgment

Synopsis:

void PtNotice( PtWidget_t *parent,
        PhPoint_t const *location,
        char const *title,
        PhImage_t const *image,
        char const *message,
        char const *msgFont,
        char const *btnText,
        char const *btnFont,
        int flags );

Arguments:

parent
A pointer to the parent widget of the dialog (usually a window). By setting the flags, you can block the parent and/or position the dialog relative to it.
location
A pointer to a PhPoint_t structure that specifies the location of the dialog relative to the parent or console, depending on the flags. If location is NULL, the dialog is centered.
title
The title for the dialog. If you don't want a title bar, set this argument to NULL.
image
A pointer to a PhImage_t that specifies an icon to be displayed beside the message. If you don't want an icon, set this argument to NULL.
message
The message to display.
msgFont
The font for the message text; the default is TextFont09. You should create the font name by calling PfGenerateFontName().
btnText
The text to be displayed in the button. If this is set to NULL, a default of &OK is used. The btnText argument lets you define a shortcut key -- place an ampersand (&) in front of the character to be used as the shortcut.
btnFont
The font to use in the button. If this is NULL, a default font of TextFont09 is used. You should create the font names by calling PfGenerateFontName().
flags
Flags that specify the behavior for the dialog. This can be up to one of the following:

with any combination of the following:

Pt_BLOCK_ALL overrides Pt_BLOCK_PARENT.

Library:

ph

Description:

This function displays a message and waits for you to acknowledge it. By setting the flags, you can make PtNotice() work modally, meaning that it doesn't return until you respond.


PtNotice() dialog


A sample dialog displayed by PtNotice().

Examples:

char Helvetica12[MAX_FONT_TAG];

PtNotice( ABW_base, NULL, "George Crabbe", NULL,
  "Books cannot always please, however good;\n\
Minds are not ever craving for their food.",
  PfGenerateFontName("Helvetica", 0, 12, Helvetica12),
  "How &true!", NULL, Pt_BLOCK_PARENT);

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApError(), PfGenerateFontName(), PhImage_t, PhPoint_t, PtAlert(), PtPassword(), PtPrompt()

"Dialog modules" in the Working with Modules chapter of the Photon Programmer's Guide