Home » U++ Library support » TopWindow&PopUp, TrayIcon » Modal vs non-modal window
Re: Modal vs non-modal window [message #12009 is a reply to message #12008] |
Sun, 07 October 2007 20:32 |
NeonN
Messages: 8 Registered: September 2007 Location: Czech Republic
|
Promising Member |
|
|
For example:
I have one window with button. The button has assigned callback to function that creates another window...
If I just do this:
void ClassName::InitDialog()
{
WithLayout<TopWindow> laySomething;
CtrlLayoutOKCancel(laySomething, "Something");
laySomething.OpenMain();
}
... the window disappear after the function is over. I'd have to Execute() the window or ... (I don't know... I'm new in C++ and Ultimate++. I'm trying to understand how to work with the window - what is the best method...)
But when I do this:
void ClassName::InitDialog()
{
laySomething = new WithSomethingLayout<TopWindow>;
CtrlLayoutOKCancel(*laySomething, "Something");
laySomething->OpenMain();
}
... the window is still opened. I can do anything with the window because the pointer to it is declared in the private part of class but the memmory is allocated only when I need it. And when I close the window, the widgets are automatically cleared (destroyed).
So that's why i don't understand why is using new/delete less alegant or less easier... and why I shouldn't do this...
[Updated on: Sun, 07 October 2007 20:56] Report message to a moderator
|
|
|
|
|
Modal vs non-modal window
By: NeonN on Wed, 03 October 2007 20:13
|
|
|
Re: Modal vs non-modal window
By: mrjt on Thu, 04 October 2007 13:08
|
|
|
Re: Modal vs non-modal window
By: NeonN on Thu, 04 October 2007 18:59
|
|
|
Re: Modal vs non-modal window
By: NeonN on Thu, 04 October 2007 20:08
|
|
|
Re: Modal vs non-modal window
By: mrjt on Fri, 05 October 2007 12:09
|
|
|
Re: Modal vs non-modal window
By: NeonN on Fri, 05 October 2007 13:47
|
|
|
Re: Modal vs non-modal window
By: mrjt on Fri, 05 October 2007 14:47
|
|
|
Re: Modal vs non-modal window
By: mirek on Sat, 06 October 2007 18:07
|
|
|
Re: Modal vs non-modal window
By: NeonN on Sun, 07 October 2007 18:33
|
|
|
Re: Modal vs non-modal window
By: mirek on Sun, 07 October 2007 19:37
|
|
|
Re: Modal vs non-modal window
By: NeonN on Sun, 07 October 2007 20:32
|
|
|
Re: Modal vs non-modal window
By: mirek on Sun, 07 October 2007 23:46
|
|
|
Re: Modal vs non-modal window
By: NeonN on Mon, 08 October 2007 09:14
|
|
|
Re: Modal vs non-modal window
By: mirek on Mon, 08 October 2007 10:52
|
|
|
Re: Modal vs non-modal window
By: NeonN on Mon, 08 October 2007 14:58
|
|
|
Re: Modal vs non-modal window
By: mirek on Sat, 06 October 2007 17:59
|
|
|
Re: Modal vs non-modal window
By: exolon on Fri, 05 October 2007 11:55
|
Goto Forum:
Current Time: Mon May 06 05:55:35 CEST 2024
Total time taken to generate the page: 0.02644 seconds
|