PrivateReminderMessage

 

Contents

Description

Creates a private reminder message dialog. An Ini file is used to initialize the dialog. Each section in the ini file is used for a single message.

Syntax

int PrivateReminderMessage(LPCSTR pcszIniSec, LPCSTR pcszIniFile, HWND hwndParent = NULL);

Parameters

pcszIniSec
[input] pointer to name of ini section containing message information
pcszIniFile
[input] pointer to name of ini file containing specified section
hwndParent
[input] optional handle to parent window

Return

returns 1 = OK, 2 = Cancel, 6 = Yes, 7 = No.
These values match IDOK, IDCANCEL, IDYES, IDNO defines.
returns < 0 for error

Examples

EX1

/* Example Dialog.ini file in UFF.
[MyMessage]
;Title = My Reminder
Msg = This is my message.
;Btns = 4 for Yes No buttons
Btns = 4
*/
void PrivateReminderMessage_ex1()
{
   string iniFileName = GetOriginPath(ORIGIN_PATH_USER) + "Dialog.ini";
   int nRet = PrivateReminderMessage("MyMessage", iniFileName);
   printf("User chose %d\n", nRet);
}

Remark

An Ini file is used to initialize the dialog. Each section in the ini file is used for a single message.

Sample Ini Section:

[MyMessage]
;Title = My Reminder
Msg = This is my message.
Btns = 4

The following keys in the section are used:
Title = This key is optional. A string used to replace the default "Reminder" title.
Msg = This key is required. A string of the message you want displayed in the dialog.
Btns = An integer. 0 = OK, 1 = OK Cancel, 3 = Yes No Cancel, 4 = Yes No.

These values match the MB_OK, MB_OKCANCEL, MB_YESNOCANCEL, MB_YESNO defines.

See Also

header to Include

utilities.h

Reference