I've started to use Win32-GUI.
In the first stage I've created a simple window with 2 button: =
"Continue" and "Exit":
=3D> 400, -height =3D> 200);
If I click on "Exit", the program end.
If I click on "Continue" obviously the program continue.
In this case, I want work in the same window.
How can I destroy the 2 buttons ?=20
Most general: How can destroy any controls so I can reuse the same =
window to put in it other controls ??
From: Johan Lindstrom <johanl@ba...> - 2001-09-03 15:46:18
>In this case, I want work in the same window.
>How can I destroy the 2 buttons ?
>Most general: How can destroy any controls so I can reuse the same window
>to put in it other controls ??
Short answer: you don't. At least I don't think that's the best option,
although it may be possible. What you can do is this:
Hide the controls you don't want and simply create new ones to replace
them. This will involve losing the memory until the program ends, but if
we're not talking about long-running processes here (and my guess is that
we're not), that should remain a theoretical problem (were it not for the
fact that memory leaks hurt our perfectionist egos :).
It is possible to create event handler subs on the fly (with eval string)
if that should be needed. But maybe you already know exactly which controls
to create? In that case, I suggest that you create them from the beginning
and just keep them hidden until they are needed.
------ ---- --- -- -- -- - - - - -
Johan Lindström Boss Casinos
If the only tool you have is a hammer,
everything tends to look
like a nail
Get latest updates about Open Source Projects, Conferences and News.