Hello!
I'm currently modifying the sample MapiRule to send a notification
balloon with two catch button when a SMS is received. Definition of
the structure SHNOTIFICATIONDATA is:

SHNOTIFICATIONDATA sn = {0};

sn.cbStruct = sizeof(sn);
sn.dwID = 1;
sn.npPriority = SHNP_INFORM;
sn.grfFlags = SHNF_FORCEMESSAGE;
sn.csDuration = INFINITE;
sn.hwndSink = hWndWin;
sn.grfFlags = 0;
sn.pszTitle = TEXT("New Sms");
sn.pszHTML =TEXT("<html><body>This is a sample notification balloon</
body><p align=right><input type=button name='cmd:1001'
value='OK'><input type=button name='cmd:1002'value='Cancel'></p></
body></html>");

When a SMS is received a message to sn.hwndSink is sent:

PostMessage(hWndWin, WM_SETTEXT, 0, (LPARAM)g_pSmsBuffer-
>g_szMessageBody);

and then the window hWndWin manages the messages:

switch (message)
{
case WM_SETTEXT:
SHNotificationAdd(&sn);
break;
case WM_COMMAND:
switch(LOWORD (wParam)) {
case 1001:
// do something
break;
default:
break;
}
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWndWin, message, wParam, lParam);
}

I'm developing with eVC++ 4.0 and this code works fine in Windows
Mobile 2003 but in Windows Mobile 5 seems that the notification
balloon not appear.
Do I need to modify something for working with WM5?