From: mihamih on
Hi,

Is it possible to have a system modal message box on Pocket PC? My device is
HTC Touch Pro.

I use MessageBox to show a message box yes no question. Problem is that when
I click with stylus on an area of the screen outside the message box window,
the message box is placed in the background which is undesired in my case.
My SDK does not appear to have MB_SYSTEMMODAL defined at all so I took the
windows one and defined it myslef as:

#ifndef MB_SYSTEMMODAL

#define MB_SYSTEMMODAL 0x00001000L

#endif

This however results in me getting a system modal message box sometimes.
Sometimes clicking outside the messagebox still results in messagebox being
placed in background.

Finally I use the following flags:

MB_YESNO | MB_TOPMOST | MB_ICONQUESTION|MB_SETFOREGROUND

in addition to the system modal that I defined myself.



Thanks much!

Mihaela


From: mihamih on
I did not need the MB_SYSTEMMODAL. I fixed it by passing GetDesktopWindow as
the first parameter to MessageBox. We used to pass in NULL which caused the
window to go to background when one clicks outside the window.

Thanks!
Mihaela

"mihamih" <abc(a)abc.com> wrote in message
news:eYxbDjW5KHA.5476(a)TK2MSFTNGP06.phx.gbl...
> Hi,
>
> Is it possible to have a system modal message box on Pocket PC? My device
> is HTC Touch Pro.
>
> I use MessageBox to show a message box yes no question. Problem is that
> when I click with stylus on an area of the screen outside the message box
> window, the message box is placed in the background which is undesired in
> my case. My SDK does not appear to have MB_SYSTEMMODAL defined at all so I
> took the windows one and defined it myslef as:
>
> #ifndef MB_SYSTEMMODAL
>
> #define MB_SYSTEMMODAL 0x00001000L
>
> #endif
>
> This however results in me getting a system modal message box sometimes.
> Sometimes clicking outside the messagebox still results in messagebox
> being placed in background.
>
> Finally I use the following flags:
>
> MB_YESNO | MB_TOPMOST | MB_ICONQUESTION|MB_SETFOREGROUND
>
> in addition to the system modal that I defined myself.
>
>
>
> Thanks much!
>
> Mihaela
>
>