The CeSetUserNotification function creates a new user notification or modifies an existing one.
HANDLE CeSetUserNotification(HANDLE hNotification, TCHAR *pwszAppName, SYSTEMTIME *lpTime, PCE_USER_NOTIFICATION lpUserNotification);
Header file: | Notify.h |
Platforms: | H/PC |
Versions: | 1.01 and later |
If the function succeeds, the return value is the handle to the notification. An application can use the handle to overwrite or delete the notification. The return value is zero if the notification could not be set.
The notification occurs at the specified time, without starting the application. The application can specify the notification options, including whether to light the LED, generate a sound, or display a dialog box. However, an application typically uses the CeGetUserNotificationPreferences function to allow the user to set the notification options.
The user can start the owning application after the notification occurs. In this case, the system starts a new instance of the application using the APP_RUN_TO_HANDLE_NOTIFICATION string as the prefix of the command line and the notification handle (converted to a string) as the postfix. If another instance of the application is already running, the new instance must pass a private message to the old instance and then shut down.
When writing applications for Windows CE version 1.0, use the function PegSetUserNotification.