> I created a window. This window creates on demand new windows. > > In the first window I have a list with opened windows. > > If I close one of the new windows, the window should be > erased from the list. I thought I could use the parent > function to get the parent window, but the derrived pointer > is always NULL.
A window that is a child of another window (i.e. probably this would be embedded within it) will have a parent. But any free-floating top-level window may have no parent (other than the window manager) so it's parent is NULL. > How could I get the parent window? A number of possibilities exist: - (the easy but hackish way) Make a global pointer to your master window that all the subsidiary windows can utilise. - (bit harder) make all your subsidiary windows based on a subclassed window that has a member function you can set that contains a reference to the master window. - and so on... SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

