git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3830
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( !wxTheClipboard->IsSupported( wxDF_TEXT ) )
{
if ( !wxTheClipboard->IsSupported( wxDF_TEXT ) )
{
- wxLogMessage( _T("No text is on the clipboard") );
+ wxLogMessage( _T("No text on the clipboard") );
- wxLogMessage( _T("There is text is on the clipboard") );
+ wxLogMessage( _T("There is text on the clipboard") );
}
wxTheClipboard->Close();
}
wxTheClipboard->Close();
if ( !wxTheClipboard->IsSupported( wxDF_BITMAP ) )
{
if ( !wxTheClipboard->IsSupported( wxDF_BITMAP ) )
{
- wxLogMessage( _T("No bitmap is on the clipboard") );
+ wxLogMessage( _T("No bitmap on the clipboard") );
- wxLogMessage( _T("A bitmap is on the clipboard") );
+ wxLogMessage( _T("There is a bitmap on the clipboard") );
}
wxTheClipboard->Close();
}
wxTheClipboard->Close();
void DnDFrame::OnCopyBitmap(wxCommandEvent& WXUNUSED(event))
{
void DnDFrame::OnCopyBitmap(wxCommandEvent& WXUNUSED(event))
{
+ // PNG support is not always compiled in under Windows, so use BMP there
+#ifdef __WXMSW__
+ wxFileDialog dialog(this, "Open a BMP file", "", "", "BMP files (*.bmp)|*.bmp", 0);
+#else
wxFileDialog dialog(this, "Open a PNG file", "", "", "PNG files (*.png)|*.png", 0);
wxFileDialog dialog(this, "Open a PNG file", "", "", "PNG files (*.png)|*.png", 0);
if (dialog.ShowModal() != wxID_OK)
{
if (dialog.ShowModal() != wxID_OK)
{
- image.LoadFile( dialog.GetPath(), wxBITMAP_TYPE_PNG );
+ image.LoadFile( dialog.GetPath(),
+#ifdef __WXMSW__
+ wxBITMAP_TYPE_BMP
+#else
+ wxBITMAP_TYPE_PNG
+#endif
+ );
if (!image.Ok())
{
wxLogMessage( _T("Invalid image file...") );
if (!image.Ok())
{
wxLogMessage( _T("Invalid image file...") );