如下代码在windows mobile手机上是可以弹出气泡的,但是在wince 5.0开发板上弹不出来.根据MSDN似乎应该是可以的。
SHNP_INFORM
Notification bubble displays for the set duration, then disappears.
Note For Windows Mobile, this enumerator indicates that a message balloon is shown for the notification, along with an icon in the notification area.
SHNOTIFICATIONDATA sn = {0};
sn.cbStruct = sizeof(sn);
sn.dwID = 1;
sn.npPriority = SHNP_INFORM;
sn.csDuration = 15;
sn.hicon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_MYNOTIFICATION));
sn.clsid = CLSID_SHNAPI_Test;
sn.grfFlags = 0;
sn.pszTitle = TEXT("Sample Notification");
sn.pszHTML = TEXT("This is sample html in a notification!");
SHNotificationAdd(&sn);
From MSDN :
Requirements
--------------------------------------------------------------------------------
Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later
http://msdn.microsoft.com/en-us/library/aa930981.aspx