#include "canvas.h"
-#ifndef __WXMSW__
+#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
m_zoom = 1.;
wxMenu *menu = new wxMenu;
- menu->Append(wxID_SAVE);
+ menu->Append(wxID_SAVEAS);
menu->AppendSeparator();
menu->AppendCheckItem(ID_PAINT_BG, wxT("&Paint background"),
"Uncheck this for transparent images");
wxString savefilename = wxFileSelector( wxT("Save Image"),
wxEmptyString,
wxEmptyString,
- (const wxChar *)NULL,
+ wxEmptyString,
wxT("BMP files (*.bmp)|*.bmp|")
#if wxUSE_LIBPNG
wxT("PNG files (*.png)|*.png|")
#endif
#if wxUSE_PCX
wxT("PCX files (*.pcx)|*.pcx|")
+#endif
+#if wxUSE_XPM
+ wxT("X PixMap files (*.xpm)|*.xpm|")
#endif
wxT("ICO files (*.ico)|*.ico|")
wxT("CUR files (*.cur)|*.cur"),
- wxFD_SAVE,
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT,
this);
if ( savefilename.empty() )
EVT_ERASE_BACKGROUND(MyImageFrame::OnEraseBackground)
EVT_PAINT(MyImageFrame::OnPaint)
- EVT_MENU(wxID_SAVE, MyImageFrame::OnSave)
+ EVT_MENU(wxID_SAVEAS, MyImageFrame::OnSave)
EVT_MENU_RANGE(ID_ROTATE_LEFT, ID_ROTATE_RIGHT, MyImageFrame::OnRotate)
EVT_MENU(ID_RESIZE, MyImageFrame::OnResize)