// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(__APPLE__)
- #pragma implementation "exec.cpp"
- #pragma interface "exec.cpp"
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#endif
// create a menu bar
- wxMenu *menuFile = new wxMenu(_T(""), wxMENU_TEAROFF);
+ wxMenu *menuFile = new wxMenu(wxEmptyString, wxMENU_TEAROFF);
menuFile->Append(Exec_Kill, _T("&Kill process...\tCtrl-K"),
_T("Kill a process by PID"));
menuFile->AppendSeparator();
execMenu->Append(Exec_DDERequest, _T("Send DDE &request...\tCtrl-R"));
#endif
- wxMenu *helpMenu = new wxMenu(_T(""), wxMENU_TEAROFF);
+ wxMenu *helpMenu = new wxMenu(wxEmptyString, wxMENU_TEAROFF);
helpMenu->Append(Exec_About, _T("&About...\tF1"), _T("Show about dialog"));
// now append the freshly created menu to the menu bar...
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
- wxMessageBox(_T("Exec wxWidgets Sample\n© 2000-2002 Vadim Zeitlin"),
+ wxMessageBox(_T("Exec wxWidgets Sample\n(c) 2000-2002 Vadim Zeitlin"),
_T("About Exec"), wxOK | wxICON_INFORMATION, this);
}
{
static wxString s_filename;
- wxString filename = wxLoadFileSelector(_T(""), _T(""), s_filename);
- if ( !filename )
+ wxString filename;
+
+#if wxUSE_FILEDLG
+ filename = wxLoadFileSelector(wxEmptyString, wxEmptyString, s_filename);
+#endif // wxUSE_FILEDLG
+
+ if ( filename.empty() )
return;
s_filename = filename;
wxString cmd;
bool ok = ft->GetOpenCommand(&cmd,
- wxFileType::MessageParameters(filename, _T("")));
+ wxFileType::MessageParameters(filename));
delete ft;
if ( !ok )
{
return;
wxDDEClient client;
- wxConnectionBase *conn = client.MakeConnection(_T(""), m_server, m_topic);
+ wxConnectionBase *conn = client.MakeConnection(wxEmptyString, m_server, m_topic);
if ( !conn )
{
wxLogError(_T("Failed to connect to the DDE server '%s'."),
return;
wxDDEClient client;
- wxConnectionBase *conn = client.MakeConnection(_T(""), m_server, m_topic);
+ wxConnectionBase *conn = client.MakeConnection(wxEmptyString, m_server, m_topic);
if ( !conn )
{
wxLogError(_T("Failed to connect to the DDE server '%s'."),
bool MyPipedProcess2::HasInput()
{
- if ( !!m_input )
+ if ( !m_input.empty() )
{
wxTextOutputStream os(*GetOutputStream());
os.WriteString(m_input);
wxPanel *panel = new wxPanel(this, wxID_ANY);
- m_textOut = new wxTextCtrl(panel, wxID_ANY, _T(""),
+ m_textOut = new wxTextCtrl(panel, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxTE_PROCESS_ENTER);
- m_textIn = new wxTextCtrl(panel, wxID_ANY, _T(""),
+ m_textIn = new wxTextCtrl(panel, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE | wxTE_RICH);
m_textIn->SetEditable(false);
- m_textErr = new wxTextCtrl(panel, wxID_ANY, _T(""),
+ m_textErr = new wxTextCtrl(panel, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE | wxTE_RICH);
m_textErr->SetEditable(false);
void MyPipeFrame::OnBtnSendFile(wxCommandEvent& WXUNUSED(event))
{
+#if wxUSE_FILEDLG
wxFileDialog filedlg(this, _T("Select file to send"));
if ( filedlg.ShowModal() != wxID_OK )
return;
DoGet();
}
+#endif // wxUSE_FILEDLG
}
void MyPipeFrame::DoGet()