Connecting Tech Pros Worldwide Help | Site Map

Show MessageBox in front of active Window

  #1  
Old November 17th, 2008, 04:25 AM
Prats
Guest
 
Posts: n/a
MessageBox::Show(Window, String)
How do I pass the value for the Window parameter, rather how do I get the
value for the active window


Also,there are two forms open at the same time, one overlapping the other.
Now if I click the form at behind how do I bring to to front. I tried giving
BringToFront() didn't work.

  #2  
Old November 17th, 2008, 10:15 AM
Pavel A.
Guest
 
Posts: n/a

re: Show MessageBox in front of active Window


Prats wrote:
Quote:
MessageBox::Show(Window, String)
How do I pass the value for the Window parameter, rather how do I get
the value for the active window
GetLastActivePopup() ?
Quote:
Also,there are two forms open at the same time, one overlapping the
other. Now if I click the form at behind how do I bring to to front. I
tried giving BringToFront() didn't work.
>
  #3  
Old November 17th, 2008, 03:55 PM
Ben Voigt [C++ MVP]
Guest
 
Posts: n/a

re: Show MessageBox in front of active Window


Prats wrote:
Quote:
MessageBox::Show(Window, String)
How do I pass the value for the Window parameter, rather how do I get
the value for the active window
You don't use the active window, you use the window from which the user
requested the modal task that generated the message. If the message box is
created from an asynchronous task on a worker thread you create it unowned
(standalone). Never create children of arbitrary windows, it might be an
ephemeral window (i.e. printing... page X/N) which automatically dismisses
itself when the task completes and your message box goes away with it
without giving the user any chance to read it.
Quote:
>
>
Also,there are two forms open at the same time, one overlapping the
other. Now if I click the form at behind how do I bring to to front.
I tried giving BringToFront() didn't work.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with messageboxes generated by Topmost window after losing focus Claire answers 2 November 17th, 2005 03:52 AM