class DnDFrame : public wxFrame
{
public:
- DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h);
+ DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h);
virtual ~DnDFrame();
void OnPaint(wxPaintEvent& event);
#if wxUSE_DRAG_AND_DROP || wxUSE_CLIPBOARD
-DnDFrame::DnDFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h)
+DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h)
: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)),
m_strText(_T("wxWidgets drag & drop works :-)"))
wxLB_HSCROLL | wxLB_ALWAYS_SB );
#if wxUSE_LOG
- m_ctrlLog = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize,
+ m_ctrlLog = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE | wxTE_READONLY |
wxSUNKEN_BORDER );
void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
{
#if wxUSE_DRAG_AND_DROP
- if ( !m_strText.IsEmpty() )
+ if ( !m_strText.empty() )
{
// start drag operation
wxTextDataObject textData(m_strText);
{
// PNG support is not always compiled in under Windows, so use BMP there
#if wxUSE_LIBPNG
- wxFileDialog dialog(this, _T("Open a PNG file"), _T(""), _T(""), _T("PNG files (*.png)|*.png"), 0);
+ wxFileDialog dialog(this, _T("Open a PNG file"), wxEmptyString, wxEmptyString, _T("PNG files (*.png)|*.png"), 0);
#else
- wxFileDialog dialog(this, _T("Open a BMP file"), _T(""), _T(""), _T("BMP files (*.bmp)|*.bmp"), 0);
+ wxFileDialog dialog(this, _T("Open a BMP file"), wxEmptyString, wxEmptyString, _T("BMP files (*.bmp)|*.bmp"), 0);
#endif
if (dialog.ShowModal() != wxID_OK)
return;
}
- if (dialog.GetPath().IsEmpty())
+ if (dialog.GetPath().empty())
{
wxLogMessage( _T("Returned empty string.") );
return;
void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
{
#ifdef __WXMSW__
- wxFileDialog dialog(this, _T("Select a file to copy"), _T(""), _T(""),
+ wxFileDialog dialog(this, _T("Select a file to copy"), wxEmptyString, wxEmptyString,
_T("All files (*.*)|*.*"), 0);
wxArrayString filenames;
else
{
wxLogStatus(this, wxT("%d file%s copied to the clipboard"),
- count, count == 1 ? wxT("") : wxT("s"));
+ count, count == 1 ? wxEmptyString : wxEmptyString);
}
}
}
DnDShapeDialog::DnDShapeDialog(wxFrame *parent, DnDShape *shape)
:wxDialog( parent, 6001, wxT("Choose Shape"), wxPoint( 10, 10 ),
wxSize( 40, 40 ),
- wxRAISED_BORDER|wxCAPTION|wxTHICK_FRAME|wxSYSTEM_MENU )
+ wxDEFAULT_DIALOG_STYLE | wxRAISED_BORDER | wxRESIZE_BORDER )
{
m_shape = shape;
wxBoxSizer* topSizer = new wxBoxSizer( wxVERTICAL );