From: nki00 on
Can someone explain why the following locks up the main UI thread?


I have a worker thread that may display a message in a form of a popup
balloon. To do so I send a private message from this worker thread into the
main UI thread like this:

CWnd* pMainWnd = AfxGetMainWnd();
pMainWnd->SendMessage(MY_MESSAGE_POPUP_BALLOON, (WPARAM)pBalloonText,
nBalloonIcon);

The main thread processes this message by filling out the
NOTIFYICONDATA and calling Shell_NotifyIcon(NIM_MODIFY). Then it returns.

The code above works on Windows XP. It works under Vista if a desktop is
active. But in case the request to show a popup balloon is broadcast while
that user's desktop is not active it deadlocks the main thread. (I can tell
that when I switch users and the app is not responding, although CPU usage
remains at 0%.) It really baffles me..... what's going on?



From: nki00 on
I'm canceling this thread.

The Shell_NotifyIcon does not lock up a UI thread. It's causing shell to
send strange notifications that made me think that it's locking the thread.


From: Richard Heathfield on
nki00 wrote:
> I'm canceling this thread.

Just so's you know, you can't cancel a Usenet thread.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
From: nki00 on
> Just so's you know, you can't cancel a Usenet thread.
>
> --
> Richard Heathfield <http://www.cpax.org.uk>
> Email: -http://www. +rjh@
> "Usenet is a strange place" - dmr 29 July 1999
> Sig line vacant - apply within

Yeah, I know :) But, I thought I'd try....


From: Jackie on
nki00 wrote:
>> Just so's you know, you can't cancel a Usenet thread.
>>
>> --
>> Richard Heathfield<http://www.cpax.org.uk>
>> Email: -http://www. +rjh@
>> "Usenet is a strange place" - dmr 29 July 1999
>> Sig line vacant - apply within
>
> Yeah, I know :) But, I thought I'd try....
>
>

Haha.. Thunderbird also fooled me into thinking just *maybe* I could
cancel them.. Nope..

--
Regards,
Jackie