New Notification API in Pocket PC 2002
Microsoft Corporation
June 2002
Summary: Describes the New Notification API of Pocket PC 2002, Which Allows Your Application To Send Notification To The Top of The Visible Screen. (5 Printed Pages)
Applies TO: Microsoft® Windows® Powered Pocket PC 2002 Microsoft Embedded Visual Tools Version 3.0 Pocket PC 2002 Software Development Kit
Gotchas
The Notification API is not part of Microsoft Messenger. This means if you have subscribed to Microsoft .NET Alerts you will not get the notification automatically in Messenger. Microsoft Messenger uses the Notification API to display incoming chat request and text during a chat session.
Contents
Why notifications? Introducing the notification apistep 1: adding a simple notificationstep 2: Receiving Notifications from the NotificationConclusion
Why notifications?
You are probably as addicted to Instant Messaging * as I am. You immediately look to the corner of the screen that shows you if one of your buddies has logged on or if someone has sent you an instant message. Well, the heart of Instant Messaging And especially the little "toast" That Shows Up, IS A Notification System. by Definition a Notification IS A Little Message That Pops Up on The Screen No Matter What You Are Doing Or What Application Has The Window Focus.
Starting with the idea of Instant Messaging you can imagine all sorts of interesting usages for notifications: incoming phone calls, incoming e-mails, incoming messages, stock quote updates, downloads of complete messages, alerts of critical states in your application, and so on WHILE IN PC 2002 and You Will Encounter The Up To US, THE DEVELOPERS, TO CREATE.FIGURE 1. A Sample "New Mail" Notification
Introducing the Notification API
Pocket PC 2002 is a great communication platform. To qualify for a great communication platform, at least in my eyes, it has to support notifications. The new Notification API included in Pocket PC 2002 has everything to create exiting applications that benefit from notifications. The notification system is intended for applications that are not in the foreground in order to notify the user of some activity without stealing the context of which the user is in at that moment. It is nOT a replacement for message box or Information Dialog, which request general Information During the Use of an Application.
The application programming interface (API) consists of a series of calls all starting with "SH ..." because they belong to the family of Shell-APIs The three most important calls are:. SHNotificationAdd-to add a new notification to the notification Subsystem of the pocket pc shell; shNotificationRemove-to remove it again; and shNotificationUpdate-to update a notification.
I assembled a short list of step to show you what needed to be done to include the appi in your application.
Step 1: Add a Simple Notification
The following codes show how you can add a simple notification to your application. As you can see you can even send well-formatted HTML as a notification. Even form fields and hyperlinks are shown correctly. # Include "stdafx.h"
#include
#include "resource.h"
#define ids_defaulttitle text ("Sample Notification ...")
#define ids_defaulthtmlMessage text ("
HREF = / "cmd: 11 /"> Test Link