Hello,
I am using dev-c++ on a windows computer. I download a gui package off of the bloodshed dev site. I installed and everything seem to work. I was making a simple gui off of this tutorial I found online that used the library. The library is wxWindows. Here is the code of the header file and of the main file.
The header file (base.h)
#ifndef __BASE_H
#define __BASE_H
class MainApp: public wxApp
{
public:
virtual bool OnInit();
};
class MainFrame: public wxFrame
{
public:
MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size);
};
#endif
the main program (base.cpp)
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <base.h>
IMPLEMENT_APP(MainApp)
bool MainApp::OnInit()
{
MainFrame *MainWin = new MainFrame("Hello, World!", wxDefaultPosition,
wxSize(300, 200));
MainWin->Show(TRUE);
SetTopWindow(MainWin);
return TRUE;
}
MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size)
:wxFrame((wxFrame *) NULL, -1, title, pos, size)
{
//this is not needed right now. From what i know this does the controls of the program, and it was not needed for a simple window.
}