1. wxStaticBox doesn't draw over the underlying controls any more

2. a couple of new helper functions in msw/private.h: wxColourToRGB and
   wxRGBToColour are handy to avoid writing horribly long and ugly RGB <-> wxColour
   conversions explicitly
3. modified wxDirDialog to be more comprehensible (to me), hopefully it also
   works better


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-11 00:25:57 +00:00
parent e0473f5f5a
commit 3f2711d5c1
7 changed files with 274 additions and 229 deletions

View File

@@ -889,6 +889,7 @@ void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
textData.AddFile( "/file2.txt" );
*/
wxDropSource source(textData, this
#ifdef __WXMSW__
,wxCURSOR_PENCIL, // for copy
wxCURSOR_SPRAYCAN, // for move
@@ -1043,15 +1044,23 @@ void DnDFrame::OnPasteBitmap(wxCommandEvent& WXUNUSED(event))
void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
{
#ifdef __WXMSW__
wxFileDataObject *dobj = new wxFileDataObject;
wxFileDialog dialog(this, "Select a file to copy", "", "",
"All files (*.*)|*.*", 0);
if ( dialog.ShowModal() == wxID_OK )
wxArrayString filenames;
while ( dialog.ShowModal() == wxID_OK )
{
wxString filename = dialog.GetPath();
dobj->AddFile(filename);
filenames.Add(dialog.GetPath());
}
if ( !filenames.IsEmpty() )
{
wxFileDataObject *dobj = new wxFileDataObject;
size_t count = filenames.GetCount();
for ( size_t n = 0; n < count; n++ )
{
dobj->AddFile(filenames[n]);
}
wxClipboardLocker locker;
if ( !locker )
@@ -1062,12 +1071,12 @@ void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
{
if ( !wxTheClipboard->AddData(dobj) )
{
wxLogError("Can't copy file to the clipboard");
wxLogError("Can't copy file(s) to the clipboard");
}
else
{
wxLogStatus(this, "File '%s' copied to the clipboard",
filename.c_str());
wxLogStatus(this, "%d file%s copied to the clipboard",
count, count == 1 ? "" : "s");
}
}
}