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() {}
App loaded in memory, Window(wxFrame) not displayed Topic is solved
-
- Can't get richer than this
- Posts: 864
- Joined: Thu Jul 28, 2005 9:48 pm
- Location: New Forest, United Kingdom
- Contact:
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/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/