SHNotificationAdd takes message as HTML.

SHNOTIFICATIONDATA sn = {0};
sn.pszHTML = TEXT("<input type=\"button\" name=\"button1\" value=\"press
me\" />");

How can I catch button or hyperlink event being tapped?

Lisa

Re: How to catch button press in Notification message? by Vinod

Vinod
Wed Oct 03 20:56:05 PDT 2007

On Oct 3, 11:22 pm, "Lisa Pearlson" <n...@spam.plz> wrote:
> SHNotificationAdd takes message as HTML.
>
> SHNOTIFICATIONDATA sn = {0};
> sn.pszHTML = TEXT("<input type=\"button\" name=\"button1\" value=\"press
> me\" />");
>
> How can I catch button or hyperlink event being tapped?
>
> Lisa

sn.pszHTML = TEXT("<input type=\"button\" name=\"button1:100\" value=
\"press me\" />");

Window Handle passed to SHNotificationAdd function will receive
WM_COMMAND message with control id as 100.

Another way is to implement "IShellNotificationCallback". Check this
MSDN link http://msdn2.microsoft.com/en-us/library/aa458046.aspx


Re: How to catch button press in Notification message? by Lisa

Lisa
Thu Oct 04 08:23:24 PDT 2007

Embedding control id in html as you suggested did not work.
It does not generate WM_COMMAND setting. ;(

Lisa

"Vinod" <vinodkumarpr@gmail.com> wrote in message
news:1191470165.087466.80400@w3g2000hsg.googlegroups.com...
> On Oct 3, 11:22 pm, "Lisa Pearlson" <n...@spam.plz> wrote:
>> SHNotificationAdd takes message as HTML.
>>
>> SHNOTIFICATIONDATA sn = {0};
>> sn.pszHTML = TEXT("<input type=\"button\" name=\"button1\" value=\"press
>> me\" />");
>>
>> How can I catch button or hyperlink event being tapped?
>>
>> Lisa
>
> sn.pszHTML = TEXT("<input type=\"button\" name=\"button1:100\" value=
> \"press me\" />");
>
> Window Handle passed to SHNotificationAdd function will receive
> WM_COMMAND message with control id as 100.
>
> Another way is to implement "IShellNotificationCallback". Check this
> MSDN link http://msdn2.microsoft.com/en-us/library/aa458046.aspx
>



Re: How to catch button press in Notification message? by Scott

Scott
Thu Oct 04 09:48:26 PDT 2007

"Lisa Pearlson" <no@spam.plz> wrote:
>
>Embedding control id in html as you suggested did not work.
>It does not generate WM_COMMAND setting. ;(

Are you passing the correct window in .hwndSink

--
--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
Power tends to corrupt, and absolute power corrupts absolutely. Great
men are almost always bad men.
-- Lord Acton

Re: How to catch button press in Notification message? by Lisa

Lisa
Thu Oct 04 17:33:20 PDT 2007

Yes. I can catch the Left and Right soft key commands with WM_COMMAND just
fine, but the HTML button doesn't generate a WM_COMMAND.

Lisa

"Scott Seligman" <seligman@example.com> wrote in message
news:fe35gq$b5m$1@panix5.panix.com...
> "Lisa Pearlson" <no@spam.plz> wrote:
>>
>>Embedding control id in html as you suggested did not work.
>>It does not generate WM_COMMAND setting. ;(
>
> Are you passing the correct window in .hwndSink
>
> --
> --------- Scott Seligman <scott at <firstname> and michelle dot
> net> ---------
> Power tends to corrupt, and absolute power corrupts absolutely. Great
> men are almost always bad men.
> -- Lord Acton