Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » Cannot get modal owned window
Re: Cannot get modal owned window [message #15561 is a reply to message #15557] Tue, 29 April 2008 10:08 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
The problem is calling Run. From the manual:
Quote:

Run
Execute modal loop for TopWindow. If TopWindow is not open, it calls Open before starting loop, but it does not close it.
Execute
Similar to Run, but closes TopWindow when loop exits.

So you should call Execute instead.

This can be easy to miss as often modal dialogs are declared locally:
void ShowAWindow 
{
    AWindow wnd;
    wnd.Run();
}

in which case the window would be closed when it ran out-of-scope anyway, hiding the problem.

James
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem, prompt when moving the window.
Next Topic: Wrong LeftUp Message send
Goto Forum:
  


Current Time: Tue May 14 11:44:53 CEST 2024

Total time taken to generate the page: 0.01473 seconds