Page 1 of 1

App loaded in memory, Window(wxFrame) not displayed

Posted: Mon Jul 13, 2009 4:31 pm
by Jimmo
Hi, I'm on windows XP, wxDEV-C++ 6.10.2, wxWidgets 2.8.7:

I'm starting with an empty project, the code compiles ok, it is loaded in memory ( I can see the process in the Taskmanager), but there is no window display. I've going blind looking at the code (listed below). Can anyone see what I am missing? Much appreciated in advance,
jb
-----------------------------------------------------------
#ifndef __BFPC_CPP
#define __BFPC_CPP
#endif

#ifdef __BORLANDC__
#pragma hdrstop
#endif
/* PRE-COMPILER CHECK */
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/frame.h>
#else
#include <wx/wxprec.h>
#endif
/* End pre-compiler check */

#include <wx/string.h>
#include <wx/menu.h>
#include <string>
#include <iostream>

using namespace std;

class BFPCApp : public wxApp
{
public:
virtual bool onInit();
};

class Chart : public wxFrame
{
public:
Chart(wxWindow *parent,wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size);
virtual ~Chart();
wxMenu *Main,*Search;

private:
DECLARE_EVENT_TABLE()
};

enum
{
IDMain = 2,
IDSearch = 3,
};

BEGIN_EVENT_TABLE(Chart, wxFrame)

END_EVENT_TABLE()

IMPLEMENT_APP(BFPCApp)

bool BFPCApp::onInit()
{
wxInitAllImageHandlers();
if (wxGetCwd()!="c:/BF Productions/") {wxSetWorkingDirectory("c:/BF Productions/");}
Chart *frame = new Chart(NULL,1,_T("BF Productions"),wxPoint(10,10),wxSize(500,500));
frame->SetBackgroundColour(wxColour(69,139,116)); //aquamarine - change to money shades
frame->Show(true);
SetTopWindow(frame);
return true;
}

Chart::Chart(wxWindow * parent,wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size):
wxFrame((wxFrame *)NULL,1,title,pos,size,wxRESIZE_BORDER | wxCAPTION |
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX)
{

}

Chart::~Chart() {}

Hi

Posted: Thu Jul 16, 2009 11:32 am
by winampis
Hi
Frist what program you writing the code at??? :?:

Posted: Thu Jul 16, 2009 2:25 pm
by Jimmo
Hi, just trying to display an empty frame...
jb

Posted: Fri Jul 17, 2009 6:52 am
by Sof_T
Hi since this forum is dedicated to users of wxDev-C++ and your question is more about C++ programming, you might find you get more response in the C++ forum, as not so many users come through here.

Posted: Sat Jul 18, 2009 3:49 pm
by Jimmo
Hi, no, this is about the wxDEV-C++ IDE, the empty project module, and I suspect the linker.