Parent window and children



        Good day,
        Developers. I have a beginners question:

        In an APP I have main window, and windows for inputing data, showing
results, ... Since some of these windows, need to send data back to main
window, what is the best way for this to be done? If I have input
window, fill needed data, and click OK, the data shud be sent to main
window. I solved this by creating children windows as structures and
puting pointer to main window, something like:
        
        typedef strcut _ChildWindow ChildWindow;

        struct _ChildWindow {
                ParentWindow *parent;
                ...
        };

        Then, when I need to send data or change something on the main window I
do it by 'talking' to >> parent << in ChildWindow struct. Is there a
better way to do this?

        THANKS,
        Vladimir.


-- 
"This is it... This is where I belong..."





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]