S
Du hast Recht, Dolphin sucht im Dokumentenverzeichnis nach. Damit habe ich überhaupt nicht gerechnet. Jetzt ergibt das Ganze für mich ein Sinn. Danke für deine Mühe! Ich sehe, es gibt noch einige Dinge, die ich bachten muss. Als dankeschön, findest Du unten die Quelltexte für den Testprogramm (für das wxWidgets-Framework).
base.h:
////////////////////////////////////////////////////////////////////////////////
/// Die wxWidgets-Schablone
////////////////////////////////////////////////////////////////////////////////
#ifndef _srBase_h_
#define _srBase_h_
#include <iostream>
#include <wx/app.h>
class srBase : public wxApp
{
public:
virtual bool OnInit();
};
#endif
base.cpp:
////////////////////////////////////////////////////////////////////////////////
/// Die wxWidgets-Implementierung
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include "base.h"
#include "frame.h"
IMPLEMENT_APP(srBase)
bool srBase::OnInit()
{
////////////////////////////////////////////////////////////////////////////////
/// Die Konfiguration
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////
srFrame *frame = new srFrame(NULL);
this->SetTopWindow(frame);
frame->Show(TRUE);
return TRUE;
////////////////////////////////////////
}
frame.h:
////////////////////////////////////////////////////////////////////////////////
/// Die srFrame-Schablone
////////////////////////////////////////////////////////////////////////////////
#ifndef _srFrame_h_
#define _srFrame_h_
#include <wx/colour.h>
#include <wx/font.h>
#include <wx/frame.h>
#include <wx/gdicmn.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/filefn.h>
#include <wx/stdpaths.h>
#include <wx/string.h>
class srFrame : public wxFrame
{
private:
wxBoxSizer *srBoxSizer[2];
wxStaticText *srStaticText[2];
wxPanel *srPanel;
public:
srFrame(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title =
wxT("Dolphin Test"), const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxSize(640, 480), long style = wxDEFAULT_FRAME_STYLE,
const wxString &name = wxT("srFrame"));
~srFrame();
};
#endif
frame.cpp:
////////////////////////////////////////////////////////////////////////////////
/// Die srFrame-Implementierung
////////////////////////////////////////////////////////////////////////////////
#include "frame.h"
srFrame::srFrame(wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos, const wxSize &size, long style, const wxString &name)
: wxFrame(parent, id, title, pos, size, style, name)
{
////////////////////////////////////////////////////////////////////////////////
/// Die Konfiguration
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////
wxString buffer;
wxStandardPaths stdpath;
this->SetSizeHints(wxDefaultSize, wxDefaultSize);
this->srBoxSizer[0] = new wxBoxSizer(wxVERTICAL);
this->srBoxSizer[1] = new wxBoxSizer(wxVERTICAL);
this->srPanel = new wxPanel(this, wxID_ANY);
this->srStaticText[0] = new wxStaticText(srPanel, wxID_ANY, wxEmptyString);
this->srStaticText[1] = new wxStaticText(srPanel, wxID_ANY, wxEmptyString);
this->srStaticText[0]->Wrap(-1);
this->srStaticText[1]->Wrap(-1);
buffer.Printf(wxT("Binary Path: %s"), stdpath.GetExecutablePath().c_str());
this->srStaticText[0]->SetLabel(buffer);
buffer.Printf(wxT("Current Path: %s"), wxGetCwd().c_str());
this->srStaticText[1]->SetLabel(buffer);
this->srBoxSizer[1]->Add(srStaticText[0], 0, wxEXPAND, 5);
this->srBoxSizer[1]->Add(srStaticText[1], 0, wxEXPAND, 5);
this->srPanel->SetSizer(srBoxSizer[1]);
this->srPanel->Layout();
this->srBoxSizer[1]->Fit(srPanel);
this->srBoxSizer[0]->Add(srPanel, 1, wxEXPAND, 5);
this->SetSizer(srBoxSizer[0]);
this->Layout();
////////////////////////////////////////
}
srFrame::~srFrame()
{
}
Jetzt muss ich nur noch herraus finden, welches Pfad unter Microsfot Windows als Standard definiert ist, damit ich später meine Quelltexte entsprechend mit MinGW weitergeben kann. Microsoft Windows habe ich schon seit 2 Jahre nicht mehr benutzt. Auf mein Notebook ist nur Linux drauf, deshalb kann ich es nicht einschätzen wie es mit Microsfot Windows ausschaut.