#include "dragimag.h"
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
-#include "mondrian.xpm"
-#include "dragicon.xpm"
+#if !defined(__WXMSW__) && !defined(__WXPM__)
+ #include "../sample.xpm"
+ #include "dragicon.xpm"
#endif
// main program
m_dragImage->Hide();
m_dragImage->EndDrag();
- delete m_dragImage;
- m_dragImage = NULL;
+ wxDELETE(m_dragImage);
m_draggedShape->SetShow(true);
}
case SHAPE_DRAG_TEXT:
{
- m_dragImage = new MyDragImage(this, wxString(_T("Dragging some test text")), wxCursor(wxCURSOR_HAND));
+ m_dragImage = new MyDragImage(this, wxString(wxT("Dragging some test text")), wxCursor(wxCURSOR_HAND));
break;
}
case SHAPE_DRAG_ICON:
if (!m_dragImage->BeginDrag(beginDragHotSpot, this, fullScreen))
{
- delete m_dragImage;
- m_dragImage = (wxDragImage*) NULL;
+ wxDELETE(m_dragImage);
m_dragMode = TEST_DRAG_NONE;
} else
END_EVENT_TABLE()
MyFrame::MyFrame()
-: wxFrame( (wxFrame *)NULL, wxID_ANY, _T("wxDragImage sample"),
+: wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxDragImage sample"),
wxPoint(20,20), wxSize(470,360) )
{
wxMenu *file_menu = new wxMenu();
- file_menu->Append( wxID_ABOUT, _T("&About..."));
- file_menu->AppendCheckItem( TEST_USE_SCREEN, _T("&Use whole screen for dragging"), _T("Use whole screen"));
- file_menu->Append( wxID_EXIT, _T("E&xit"));
+ file_menu->Append( wxID_ABOUT, wxT("&About..."));
+ file_menu->AppendCheckItem( TEST_USE_SCREEN, wxT("&Use whole screen for dragging"), wxT("Use whole screen"));
+ file_menu->Append( wxID_EXIT, wxT("E&xit"));
wxMenuBar *menu_bar = new wxMenuBar();
- menu_bar->Append(file_menu, _T("&File"));
+ menu_bar->Append(file_menu, wxT("&File"));
- SetIcon(wxICON(mondrian));
+ SetIcon(wxICON(sample));
SetMenuBar( menu_bar );
#if wxUSE_STATUSBAR
void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) )
{
- (void)wxMessageBox( _T("wxDragImage demo\n")
- _T("Julian Smart (c) 2000"),
- _T("About wxDragImage Demo"),
+ (void)wxMessageBox( wxT("wxDragImage demo\n")
+ wxT("Julian Smart (c) 2000"),
+ wxT("About wxDragImage Demo"),
wxICON_INFORMATION | wxOK );
}
#endif
wxImage image;
- if (image.LoadFile(_T("backgrnd.png"), wxBITMAP_TYPE_PNG))
+ if (image.LoadFile(wxT("backgrnd.png"), wxBITMAP_TYPE_PNG))
{
m_background = wxBitmap(image);
}
MyFrame *frame = new MyFrame();
- wxString rootName(_T("shape0"));
+ wxString rootName(wxT("shape0"));
for (int i = 1; i < 4; i++)
{