[Dev-C++] Help with my first FLTK class
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Maya <Esc...@ne...> - 2004-01-12 13:03:02
|
I have been looking for in '..../doc/fltk-1.1.4/index.html/ for an
example that might help me resolve this problem.
If all the GUI operations are within a class, how would the main.cpp
look like. The code below does not work!!
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include "NewAccountDlg.H"
int main (int argc, char *argv[])
{
jme::NewAccountDlg nad(100,100, "Maya");
return Fl::run();
}
---------------------
#ifndef NEW_ACCOUNT_DLG_H
#define NEW_ACCOUNT_DLG_H
#include <FL/Fl_Window.H>
#include <FL/Fl_Double_Window.H>
#include <string>
namespace jme{
class NewAccountDlg : public Fl_Double_Window{
private:
public:
NewAccountDlg((int, int, const char*));
~NewAccountDlg();
}; //NewAccount
}
#endif
--------------------------------------------------
#ifndef NEW_ACCOUNT_DLG_H
#include "NewAccountDlg.H"
#endif
jme::NewAccountDlg::NewAccountDlg()(int w, int h, const char* t)
: Fl_Double_Window( w, h, t ){
Fl_Window* window = new Fl_Window (10,10,300, 180);
window->show ();
window->end ();
}
jme::NewAccountDlg::~NewAccountDlg(){}
--
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
|