Yes i talking about tutorial from 1.6 version.
this is my sample code i just want to my window show.
#include <wx/wxprec.h>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <wx/wx.h>
class TestFrame : public wxFrame {
public:
TestFrame(const wxString& title);
~TestFrame();
};
class sfmlframe : public wxControl, public sf::RenderWindow
{
public:
sfmlframe(wxWindow* Parent = NULL, wxWindowID id = -1, wxPoint point = wxDefaultPosition, wxSize size = wxDefaultSize, long s = 0) : wxControl(Parent, id, point, size, s)
{
sf::WindowHandle h = this->GetHandle();
sf::RenderWindow::create(h);
};
~sfmlframe() {};
};
TestFrame::TestFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 600)) {
sfmlframe* frame = new sfmlframe(this, wxID_ANY, wxDefaultPosition, wxSize(200, 150),0);
}
TestFrame::~TestFrame() {
}
class MyApp : public wxApp {
public:
virtual bool OnInit();
};
bool MyApp::OnInit() {
TestFrame* frame = new TestFrame(wxT("Sample code"));
frame->Show(true);
return true;
}
wxIMPLEMENT_APP(MyApp);
thats happend after compile - nothing will show
after i comment the line:
// sfmlframe* frame = new sfmlframe(this, wxID_ANY, wxDefaultPosition, wxSize(200, 150),0);
and compile it the wxFrame will show