I have read some of the forum and tried if I found some info to add to the ones I found on google, to understand better, but I have not found the right threads for me and after a couple of hours I increased the confusion ....
Coming to the point:
It came to my mind to make me a simple window with buttons that click open a given file, because this so I could work to facilitate me not a little.
I got result with a mild Excel spreadsheet buttons remedied with geometric shapes and hyperlink to launch the file from C: \
The result did not satisfy me and then need to open excel with what ensues .. (memory, load etcetc)
Among the various programs I put on wxDev-C + + build 7.4.2.569, and I updated everything, I state that I am on a Windows XP system, I say softly that I am a Newbie, also because they are years that I have abandoned the basic, so I'm like a white paper .
Here's what I tried to do:
Start wxDev C + + and do New Project and choose "wxWidgets Frame"
Unless Progetto1.dev, then I leave all the selections as they are, and also the profile "MingW gcc"
I click on Create
Ok after other tests done so far have given a clean up the code, this is the base that works, the exe should open the window with the buttons, the first work that serves as verification, the second is there but does nothing (I've cleaned up and deleted by its code below:
void Progetto1Frm :: WxButton2Click (wxCommandEvent & event)
With the code at hand, any suggestion is perhaps easier for you, THANK YOU
Code: Select all
///-----------------------------------------------------------------
///
/// @file Progetto1Frm.cpp
/// @author
/// Created: 31/07/2013 8.05.42
/// @section DESCRIPTION
/// Progetto1Frm class implementation
///
///------------------------------------------------------------------
#include "Progetto1Frm.h"
#include <iostream>
#include <fstream>
#include <stdlib.h>
//Do not add custom headers between
//Header Include Start and Header Include End
//wxDev-C++ designer will remove them
////Header Include Start
////Header Include End
//----------------------------------------------------------------------------
// Progetto1Frm
//----------------------------------------------------------------------------
//Add Custom Events only in the appropriate block.
//Code added in other places will be removed by wxDev-C++
////Event Table Start
BEGIN_EVENT_TABLE(Progetto1Frm,wxFrame)
////Manual Code Start
////Manual Code End
EVT_CLOSE(Progetto1Frm::OnClose)
EVT_ACTIVATE(Progetto1Frm::Progetto1FrmActivate)
EVT_BUTTON(ID_WXBUTTON2,Progetto1Frm::WxButton2Click)
EVT_TEXT(ID_WXEDIT1,Progetto1Frm::WxEdit1Updated)
EVT_BUTTON(ID_WXBUTTON1,Progetto1Frm::WxButton1Click0)
END_EVENT_TABLE()
////Event Table End
Progetto1Frm::Progetto1Frm(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
: wxFrame(parent, id, title, position, size, style)
{
CreateGUIControls();
}
Progetto1Frm::~Progetto1Frm()
{
}
void Progetto1Frm::CreateGUIControls()
{
//Do not add custom code between
//GUI Items Creation Start and GUI Items Creation End
//wxDev-C++ designer will remove them.
//Add the custom code before or after the blocks
////GUI Items Creation Start
WxButton2 = new wxButton(this, ID_WXBUTTON2, _("Avvia File"), wxPoint(40, 79), wxSize(100, 35), 0, wxDefaultValidator, _("WxButton2"));
editText = new wxTextCtrl(this, ID_WXEDIT1, _(""), wxPoint(152, 32), wxSize(121, 35), 0, wxDefaultValidator, _("editText"));
WxButton1 = new wxButton(this, ID_WXBUTTON1, _("Verifica"), wxPoint(40, 32), wxSize(100, 35), 0, wxDefaultValidator, _("WxButton1"));
SetTitle(_("Progetto1"));
SetIcon(wxNullIcon);
SetSize(8,146,314,196);
Center();
////GUI Items Creation End
}
void Progetto1Frm::OnClose(wxCloseEvent& event)
{
Destroy();
}
/*
* WxEdit1Updated
*/
void Progetto1Frm::WxEdit1Updated(wxCommandEvent& event)
{
// insert your code here
}
/*
* WxButton1Click
*/
void Progetto1Frm::WxButton1Click(wxCommandEvent& event)
{
// insert your code here
}
/*
* Progetto1FrmActivate
*/
void Progetto1Frm::Progetto1FrmActivate(wxActivateEvent& event)
{
// insert your code here
}
/*
* WxButton1Click0
*/
void Progetto1Frm::WxButton1Click0(wxCommandEvent& event)
{
// insert your code here
editText->Clear();
editText->AppendText("Verifica: Funziona");
}
/*
* WxButton2Click
*/
void Progetto1Frm::WxButton2Click(wxCommandEvent& event)
{
// insert your code here
}