Ok I looked into this for Qt since I'm using Qt :)

I added the
        dispatch_to_tableau(vgui_DESTROY);
to vgui_qt_adaptor.cxx but this didn't do what it had to do since the destructor isn't even called when the window is closed

so I changed the constructors in vgui_qt_window.cxx to fix this


//-----------------------------------------------------------------------------
vgui_qt_window::vgui_qt_window(int w, int h, const char* title)
:  QMainWindow(0, "vgui_qt_mainwindow_without_menu",
               Qt::WStyle_Customize | Qt::WDestructiveClose |
               Qt::WStyle_NormalBorder | Qt::WStyle_SysMenu |
               Qt::WStyle_MinMax),
   statusbar (this),
   use_menubar(false),
   use_statusbar(true)
{
   setup_widget(w, h, title);
}


//--------------------------------------------------------------------------------
vgui_qt_window::vgui_qt_window(int w, int h, const vgui_menu& menu, const char* title)
:  QMainWindow(0, "vgui_qt_mainwindow_with_menu",
               Qt::WStyle_Customize | Qt::WDestructiveClose |
               Qt::WStyle_NormalBorder | Qt::WStyle_SysMenu |
               Qt::WStyle_MinMax),
   statusbar (this),
   use_menubar(true),
   use_statusbar(true)
{
   setup_widget(w, h, title);
   set_menubar(menu);
}


this is what they look like now and it seems to do his job :)

it didn't really solve my problem since the destroy event is dispatched to the shell_tableau but the tableau that creates this window (with the shell tableau in it) has no way of knowing when the window is closed as far as I see it...

--
Grtz
Rowin Heymans


On 2/23/06, Karen McGaul <mcgaul@gmail.com> wrote:
Hi, I looked in vgui/impl and a vgui_DESTROY event is dispatched when a window is destroyed using GToK but not in the other implementations.  If you are using MFC then there are no vgui_DESTRY events at all so it wouldn't work.  You probably can fix this by adding something like:

  dispatch_to_tableau(vgui_DESTROY);

to the destructor ~vgui_mfc_adaptor() in vgui/impl/vgui_mfc_adaptor.cxx. If you do fix this could you post the solution to the VXL mailing lists so it can be fixed properly.  Thanks,
Karen McGaul