|
From: Maya <Esc...@ne...> - 2004-01-17 02:46:47
|
What I have here is a very simple FLTK program, all it is supposed to do
is to create a window with a tab in it.
It compiles fine, but when it is executed MSW98 OS pops up a dialog box
that reads: "This program has performed an illegal operation and will be
shut down ....",
What am I doing wrong? but most importantly, how do I fix it?
#ifndef NEW_ACCOUNT_DLG_H
#define NEW_ACCOUNT_DLG_H
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Tabs.H>
#include <iostream>
namespace jme{
class NewAccountDlg : public Fl_Double_Window{
private:
Fl_Tabs* box;
public:
NewAccountDlg();
virtual ~NewAccountDlg();
void setWindow();
}; //NewAccount
}
#endif
#ifndef NEW_ACCOUNT_DLG_H
#include "NewAccountDlg.H"
#endif
jme::NewAccountDlg::NewAccountDlg()
: Fl_Double_Window(10,10,300,200,"Maya"){
try{ box = new Fl_Tabs(10,10,360,260,"Tab 1"); }
catch(std::bad_alloc& x){std::cout << x.what() << std::endl;}
}
void jme::NewAccountDlg::setWindow(){
box->box(FL_UP_BOX);
box->labelsize(36);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labeltype(FL_SHADOW_LABEL);
}
jme::NewAccountDlg::~NewAccountDlg(){}
#include "NewAccountDlg.H"
#include <iostream>
int main ()
{
jme::NewAccountDlg* ndd;
ndd->begin();
ndd->setWindow();
ndd->end();
ndd->show();
std::cin.get();
return Fl::run();
}
--
FYI
http://www.astro.umd.edu/~marshall/abbrev.html
E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
* "Innocent until proven guilty", no... not in Canada!!
|