|
Posted by Peter Foot [MVP] on September 11, 2007, 10:13 am
Please log in for more thread options To clarify, on Smartphone only Icon notifications are supported, on Pocket
PC you can do both icon and popup notifications.
Peter
--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility
> Peter Foot [MVP] wrote:
>> SHNotificationAdd or managed Microsoft.WindowsCE.Forms.Notification class
>> can be used for icon only or popup dialog notifications
>
> I always thought SHNotificationAdd was not supported on smartphone and
> I've
> never seen the SHNotificationAdd popup dialog notification ("bubble") on
> smartphone. The icon presentation does look the same though, but on the
> other hand I tried to use SHNotificationAdd both using the sample from
> code (from my ppc code) and it only returned an error
> (ERROR_INVALID_PARAMETER)
>
> SHNOTIFICATIONDATA sn = ;
>
> sn.cbStruct = sizeof(sn);
> sn.dwID = type;
> sn.npPriority = SHNP_INFORM;
> sn.csDuration = 0xFFFF;
> sn.hicon = LoadIcon(AfxGetResourceHandle(),
> MAKEINTRESOURCE(IDI_MAINICON));
>
> CString leftSoftkeyText, rightSoftkeyText;
> // load strings
>
> sn.clsid = CLSID_MYAPP_NOTIFY;
>
> sn.rgskn[0].pszTitle = leftSoftkeyText;
> sn.rgskn[0].skc.wpCmd = ID_NOTIFY_FOREGROUND;
> sn.rgskn[0].skc.grfFlags = NOTIF_SOFTKEY_FLAGS_DISMISS;
>
> sn.rgskn[1].pszTitle = rightSoftkeyText;
> sn.rgskn[1].skc.wpCmd = 0;
> sn.rgskn[1].skc.grfFlags = NOTIF_SOFTKEY_FLAGS_HIDE;
>
> sn.grfFlags = 0;
> sn.hwndSink = m_hWnd;
> sn.pszTitle = L"Title";
> sn.pszHTML = ConstructNotificationMessage();
>
> SHNotificationAdd(&sn);
>
> Daniel
>
>
|