Hi,

I have started programming in C++ and I have a newbie question:

How to get a wxEdit text value into a message box, like this:

void Project1Frm::WxButton1Click(wxCommandEvent& event)
{
MessageBox(NULL,"You typed: '" PLUS "wxEdit text" PLUS " in the textbox","Testing",MB_OK);
}

Any suggestion is welcome.

Thanks.

Hi,

I have started programming in C++ and I have a newbie question:

How to get a wxEdit text value into a message box, like this:

void Project1Frm::WxButton1Click(wxCommandEvent& event)
{
MessageBox(NULL,"You typed: '" PLUS "wxEdit text" PLUS " in the textbox","Testing",MB_OK);
}

Any suggestion is welcome.

Thanks.

Hi I guess you want just get a value of Edit into a MessageBox ...
so than just simply:
void Project1Frm::WxButton1Click(wxCommandEvent& event)
{
wxString str;
str << WxEdit1->GetValue();
wxMessageBox(str);
}
Thats all Easy peasy orange squeasy >

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.