Jump to content

VNoticeDialog

From EDM2
Revision as of 00:09, 14 November 2012 by Martini (talk | contribs) (Created page with "A utility class to display a message. ==Synopsis== ; '''Header:''' : <tt>[vquickr.htm#vNoticeDialog <v/vnotice.h>]</tt> ; '''Class name:''' : vNoticeDialog ; '''Hierarchy:''' :...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A utility class to display a message.

Synopsis

Header:
[vquickr.htm#vNoticeDialog <v/vnotice.h>]
Class name:
vNoticeDialog
Hierarchy:
[vmodald.htm vModalDialog] ->vNoticeDialog

Description

This simple utility class can be used to display a simple message to the user. The utility displays the message, and then waits for the user to enter to press OK.

New Methods

vNoticeDialog(vBaseWindow* win)

vNoticeDialog(vApp* app)

The vNoticeDialog constructor requires a pointer to a vBaseWindow, which includes all V windows and dialogs, or a pointer to the vApp object. You will usually pass the this to the constructor.

void Notice(const char* prompt)

You provide a prompt for the user. If the message contains 'backslashn' newlines, it will be shown on multiple lines.

Example

The following is a simple example of using vNoticeDialog.

File:Notice.gif


    #include <v/vnotice.h>
    ...
    vNoticeDialog note(this);   // instantiate a notice

    (void)note.Notice("This is a notice.");