void OnSave(wxMouseEvent& WXUNUSED(event))
{
+#if wxUSE_FILEDLG
wxImage image = m_bitmap.ConvertToImage();
wxString savefilename = wxFileSelector( wxT("Save Image"),
- wxT(""),
- wxT(""),
+ wxEmptyString,
+ wxEmptyString,
(const wxChar *)NULL,
wxT("BMP files (*.bmp)|*.bmp|")
wxT("PNG files (*.png)|*.png|")
// (it may fail if the extension is not recognized):
image.SaveFile(savefilename);
}
+#endif // wxUSE_FILEDLG
}
private:
void MyFrame::OnNewFrame( wxCommandEvent &WXUNUSED(event) )
{
+#if wxUSE_FILEDLG
wxString filename = wxFileSelector(_T("Select image file"));
if ( !filename )
return;
}
(new MyImageFrame(this, wxBitmap(image)))->Show();
+#endif // wxUSE_FILEDLG
}
#ifdef wxHAVE_RAW_BITMAP
return true;
}
-