PEG_USER_NOTIFICATION

This structure contains information used to initialize the user notifications settings dialog box, and receives the user’s notification preferences entered by way of the dialog box. Also used when setting a user notification. See CE_USER_NOTIFICATION.

At a Glance

Header file: Rapi.h
Windows CE versions: 1.0 and later

Syntax

typedef struct UserNotificationType {
DWORD
ActionFlags;
TCHAR
*pwszDialogTitle;
TCHAR
*pwszDialogText;
TCHAR
*pwszSound;
DWORD
nMaxSound;
DWORD
dwReserved;
} PEG_USER_NOTIFICATION, *PPEG_USER_NOTIFICATION;

Members

ActionFlags

Specifies the action to take when a notification event occurs. It can be a combination of the following flags.

Value Description
PUN_LED Flash the LED.
PUN_VIBRATE Vibrate the device.
PUN_DIALOG Display the user notification dialog box. When this structure is passed to the PegSetUserNotification function, the pwszDialogTitle and pwszDialogText members must provide the title and text of the dialog box.
PUN_SOUND Play the sound specified by the pwszSound member. When passed to PSVN, the i member must provide the name of the sound file.
PUN_REPEAT Repeat the pwszSound for 10–15 seconds. Only valid if PUN_SOUND is set.

Any flag that is not valid on the current hardware platform is ignored.

pwszDialogTitle

Pointer to a string that contains the title of the user notification dialog box. If this member is NULL, no dialog is displayed. The PegGetUserNotificationPreferences function ignores this member.

pwszDialogText

Pointer to the string that contains the text of the user notification dialog box. If this member is NULL, no dialog is displayed. The PegGetUserNotificationPreferences function ignores this member.

pwszSound

Pointer to a buffer that contains the unqualified name of a sound file to play. This member is ignored if the ActionFlags member does not include the PUN_SOUND flag.

nMaxSound

Specifies the maximum length of the string that the PegGetUserNotificationPreferences function can copy into the pwszSound buffer. Because the string may be a path name in a future release, the buffer must be at least the length derived by the following expression: PATH_MAX * sizeof(TCHAR). This member is ignored by the PegSetUserNotification function.

dwReserved

Reserved; set to zero.

Remarks

The PEG_USER_NOTIFICATION structure is passed in the PegGetUserNotificationPreferences function. Initial settings are used to populate the dialog. If the function returns TRUE, the returned settings should be saved, and considered when calling PegSetUserNotification. Settings for hardware not on the current device are ignored.

It is also used when calling PegSetUserNotification, to describe what should happen when the notification time is reached.

See Also

CeGetUserNotificationPreferences, CeSetUserNotification