Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can I have multiple MessageBox'es with MB_SERVICE_NOTIFICATION?

8 views
Skip to first unread message

Stephane Barizien

unread,
Dec 9, 2009, 5:31:28 AM12/9/09
to
Hi,

We need to display some status and error information from a console binary
that's launched by a service (that's all part of the startup mechanism for
our entire Windows Embedded-based application).

So far we are using MessageBox() with the MB_SERVICE_NOTIFICATION flag.

Recently we needed to have the MessageBox() that displays information about
the application startup's configuration to be displayed permanently, so we
moved the call to a separate thread that basically loops forever (JIC
someone hits the OK button).

We have found out today that this seems to prevent any other (error)
MessageBox() to be displayed from that same process.

I cannot find any information that states that one cannot have more than one
such message box displayed at the same time. Is this the case?


Thx in advance.

P.S. we had tried using CreateDialog() but our process is unable to interact
with the desktop, even if its parent service has the "interact with desktop"
flag...


Tim Roberts

unread,
Dec 10, 2009, 1:22:13 AM12/10/09
to
"Stephane Barizien" <s...@nospam.nospam> wrote:
>
>We need to display some status and error information from a console binary
>that's launched by a service (that's all part of the startup mechanism for
>our entire Windows Embedded-based application).
>
>So far we are using MessageBox() with the MB_SERVICE_NOTIFICATION flag.
>
>Recently we needed to have the MessageBox() that displays information about
>the application startup's configuration to be displayed permanently, so we
>moved the call to a separate thread that basically loops forever (JIC
>someone hits the OK button).
>
>We have found out today that this seems to prevent any other (error)
>MessageBox() to be displayed from that same process.
>
>I cannot find any information that states that one cannot have more than one
>such message box displayed at the same time. Is this the case?

Yes. MessageBoxes are modal.

>P.S. we had tried using CreateDialog() but our process is unable to interact
>with the desktop, even if its parent service has the "interact with desktop"
>flag...

Right. You might consider launching a normal application to handle the UI
tasks for your service.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

0 new messages