Simple programm with wxDev-C++ (HELP)

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Bongius
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jul 31, 2013 4:37 pm

Simple programm with wxDev-C++ (HELP)

Post by Bongius »

Hello to all,
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
}
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France

Re: Simple programm with wxDev-C++ (HELP)

Post by eranon »

Hello. In fact, what is your question ? I've understood that you're at the beginning, but I don't see any clear question...
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
jhernancanom
In need of some credit
In need of some credit
Posts: 5
Joined: Sat Nov 02, 2013 2:52 am
Location: Medellín, Antioquia, Colombia

Re: Simple programm with wxDev-C++ (HELP)

Post by jhernancanom »

Bongi:
if you need a tutorial try

Minimal Example
http://wxdsgn.sourceforge.net/?q=node/13

Extended wxDev-C++ Tutorial
http://wxdsgn.sourceforge.net/?q=node/11

By.

HERNAN CANO M.
Medellín, Antioquia, Colombia