On 29.04.2012, at 21:17, fltkCoder wrote:

> Those are not the problem.
> 
> The problems are the compiling problems! I have stated them clearly.


You posted the wrong code. Don't blame me! If you want help, stay friendly.

> Fl_Group *panes[3];
> (...)
> panes[3] = grp3;

If you allocate an array of three, valid indices are 0, 1, and 2. 3 is out of 
bounds and writes rampant somewhere into memory.


Fl_Window* make_window() {
  Fl_Window* w;
  Fl_Window* o = new Fl_Window(37, 29, 640, 480);
  w = o;
  
  myWizard = new Fl_Wizard(25, 75, 620, 605);
^^^ The wizard window is larger than the window. (25+620=645, but the window is 
only 640 pixels wide)
  myWizard->box(FL_UP_BOX);
  
  Fl_Group *grp1 = new Fl_Group(25, 75, 640, 605);
^^^ the group is even bigger than the wizard window. Events will be delivered 
in an unexpected way.
  panes[0] = grp1;
  grp1->end();
  
  Fl_Group *grp2 = new Fl_Group(25, 75, 640, 605);
  new Fl_Text_Display(145, 325, 400, 75);
  panes[1] = grp2;
  grp2->end();
  
  Fl_Group *grp3 = new Fl_Group(25, 75, 640, 605);
  panes[2] = grp3;
  grp3->end();
  
  myWizard->end();
  o->end();
  return w;
}

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to