After learning some wxWidgets basic, lets open new article for discussing a simple application.
In this article we will cover a basic in creating a wxWidget frame and show how to display an icon. Next we will create a simple example demonstrating usage of an event. Finally, we will see, how widgets communicate in wxWidgets applications.
A simple application
First we create the very basic wxWidgets program.
#include <wx/wx.h>
class Simple : public wxFrame
{
public:
Simple(const wxString& title);
};
#include "simple.h"
Simple::Simple(const wxString& title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150))
{
Centre();
}
/** filename: main.h **/
#include <wx/wx.h>
class MyApp : public wxApp
{
public:
...











Recent Comments