#include <gtkmm.h>

class MyDialog : public Gtk::Dialog
{
public:
   MyDialog()
   {
      get_vbox()->set_spacing(0);
  }
};

class MainWin : public Gtk::Window
{
public:
  MainWin()
  {
    Gtk::Button *pB = manage(new class Gtk::Button("open"));
    add(*pB);
    pB->signal_clicked().connect( SigC::slot(*this, &MainWin::on_button_clicked) );
   
    show_all_children();
  }

  void on_button_clicked()
  {
    MyDialog d;
    int res = d.run();
  }

};

int main(int argc, char**argv)
{
  Gtk::Main app(&argc, &argv);

  MainWin mainwin;

  app.run(mainwin);
}
