Hi,

I just can't understand why the child window doesn't appear when I execute the 
code below:

class ChildWnd : public Fl_Double_Window
{
    public:

      ChildWnd(int x, int y, int w, int h, const char *l):
      Fl_Double_Window(x, y, w, h, l)
      {
       set_non_modal();
       clear_border();
       box(FL_UP_BOX);
       color((Fl_Color) FL_RED);
      }
};

class Application : public Fl_Double_Window
{
   ChildWnd *childWnd;

   public:

   Application(int w, int h, const char *l, int argc, char *argv[])
   : Fl_Double_Window(w, h, l)
   {
     begin();
     childWnd = new ChildWnd(20,20,200,50, "child window");
     add(childWnd);
     childWnd->show();
     end();

     resizable(this);
     show(argc, argv);
   }

};

int main (int argc, char ** argv)
{
   Application myApp(500, 300, "Main Window", argc, argv);

  return(Fl::run());
}

If I use the the 3 arguments constructor (int w, int h, const char* title = 0), 
the child windows appears at the top lefft corner of the screen. But if I use 
the 5 arguments constructor, nothing appears. Why ?


Thanks

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to