App loaded in memory, Window(wxFrame) not displayed Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
Jimmo
Knows some wx things
Knows some wx things
Posts: 32
Joined: Wed Feb 20, 2008 7:30 pm

App loaded in memory, Window(wxFrame) not displayed

Post 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() {}
winampis
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Jul 16, 2009 11:03 am
Location: Dublin
Contact:

Hi

Post by winampis »

Hi
Frist what program you writing the code at??? :?:
Jimmo
Knows some wx things
Knows some wx things
Posts: 32
Joined: Wed Feb 20, 2008 7:30 pm

Post by Jimmo »

Hi, just trying to display an empty frame...
jb
Sof_T
Can't get richer than this
Can't get richer than this
Posts: 864
Joined: Thu Jul 28, 2005 9:48 pm
Location: New Forest, United Kingdom
Contact:

Post 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.
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
Jimmo
Knows some wx things
Knows some wx things
Posts: 32
Joined: Wed Feb 20, 2008 7:30 pm

Post by Jimmo »

Hi, no, this is about the wxDEV-C++ IDE, the empty project module, and I suspect the linker.
Post Reply