Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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.

Syntax

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

Members

ActionFlags

DWORDthat specifies the action to take when a notification event occurs. The following table shows the possible values.

Value Description

PUN_LED

Flashes the LED.

PUN_VIBRATE

Vibrates the device.

PUN_DIALOG

Displays the user notification dialog box. When this structure is passed to the CeSetUserNotificationExfunction, the pwszDialogTitleand pwszDialogTextmembers must provide the title and text of the dialog box.

PUN_SOUND

Plays the sound specified by the pwszSoundmember. When passed to PSVN, the pwszSoundmember must provide the name of the sound file.

PUN_REPEAT

Repeats the pwszSoundfor 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 the string that contains the title of the user notification dialog box. If this member is NULL, no dialog is displayed. The CeGetUserNotificationPreferencesfunction 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 CeGetUserNotificationPreferencesfunction 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 ActionFlagsmember does not include the PUN_SOUND flag.

nMaxSound

DWORDthat specifies the maximum length of the string that the CeGetUserNotificationPreferencesfunction can copy into the pwszSoundbuffer. 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: MAX_PATH * sizeof(TCHAR). This member is ignored by the CeSetUserNotificationExfunction.

dwReserved

Reserved; set to zero.

Remarks

The CE_USER_NOTIFICATIONstructure is passed in the CeGetUserNotificationPreferencesfunction. Initial settings are used to populate the dialog box. If the function returns TRUE, the returned settings should be saved, and considered when calling CeSetUserNotificationEx. Settings for hardware not on the current device will be ignored.

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

The ActionFlagsvalue PUN_LED is not supported on Windows Mobile Standard.

Setting the ActionFlagsvalue PUN_DIALOG on Windows Mobile Professional or Windows Mobile Classic will cause sounds to be played based on the user settings in the Sounds and Notifications Control Panel Application (CPL). In addition, sounds that result from other ActionFlagsflags being set are also played, resulting in multiple sounds on Windows Mobile Professional and Windows Mobile Classic. To avoid multiple sounds, you should not set any other ActionFlagsflags on Windows Mobile Professional or Windows Mobile Classic except PUN_DIALOG.

Requirements

Header notify.h
Windows Embedded CE Windows CE 1.01 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also