Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Image DnD into Upp app
Re: Image DnD into Upp app [message #44173 is a reply to message #44171] |
Thu, 15 January 2015 19:06 |
|
bushman
Messages: 134 Registered: February 2009
|
Experienced Member |
|
|
Hi, Mirek, tks for your help, it's weird indeed, I've run a number of tests on both of my systems and here's my feedback on some of the points you raised:
Quote:What is your OS exactly? Compiler?
Windows 7 - MSC9 and Windows 8.1 - MSC9 and MSC10
Quote:As first quick test, does DnD of text to theide work for you?
No, it doesn't work in Win 8.1, but it does work in Win 7.
Quote:Alternatively, you can test with examples/UWord, with Image.
Did that, pls review code posted below, which I used to run tests, along with attached table pics summarizing results:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : TopWindow {
virtual void CancelMode();
virtual void Paint(Draw& w);
virtual void DragAndDrop(Point p, PasteClip& d);
virtual void DragLeave();
Image img;
String txt;
bool dnd;
MyApp() { dnd = false; }
};
void MyApp::Paint(Draw& w)
{
Size sz = GetSize();
w.DrawRect(sz, dnd ? SColorInfo() : SColorFace());
w.DrawImage(0, 0, img);
w.DrawText(10, 10, txt);
}
void MyApp::DragAndDrop(Point p, PasteClip& d)
{
LOG("DragAndDrop");
if(AcceptImage(d)) {
img = GetImage(d);
txt = "";
} else if(AcceptText(d)) {
txt = GetString(d);
img.Clear();
}
dnd = d.IsAccepted();
Refresh();
}
void MyApp::DragLeave()
{
LOG("DragLeave");
CancelMode();
}
void MyApp::CancelMode()
{
LOG("CancelMode");
dnd = false;
Refresh();
}
GUI_APP_MAIN
{
MyApp().Run();
}
Could these erratic results be due to non-standardized Windows DnD obj formatting from one version to another?
Tks!
-
Attachment: table1.png
(Size: 37.62KB, Downloaded 812 times)
-
Attachment: table2.png
(Size: 38.76KB, Downloaded 733 times)
|
|
|
|
|
Image DnD into Upp app
By: bushman on Wed, 14 January 2015 15:28
|
|
|
Re: Image DnD into Upp app
By: mirek on Wed, 14 January 2015 19:21
|
|
|
Re: Image DnD into Upp app
By: bushman on Wed, 14 January 2015 22:09
|
|
|
Re: Image DnD into Upp app
By: mirek on Thu, 15 January 2015 08:51
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 15 January 2015 19:06
|
|
|
Re: Image DnD into Upp app
By: mirek on Thu, 15 January 2015 20:58
|
|
|
Re: Image DnD into Upp app
By: mirek on Thu, 15 January 2015 21:11
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 15 January 2015 23:26
|
|
|
Re: Image DnD into Upp app
By: mirek on Fri, 16 January 2015 09:16
|
|
|
Re: Image DnD into Upp app
By: bushman on Fri, 16 January 2015 21:41
|
|
|
Re: Image DnD into Upp app
By: mirek on Sat, 17 January 2015 16:19
|
|
|
Re: Image DnD into Upp app
By: bushman on Sat, 17 January 2015 18:10
|
|
|
Re: Image DnD into Upp app
By: mirek on Sun, 18 January 2015 09:18
|
|
|
Re: Image DnD into Upp app
By: bushman on Sun, 18 January 2015 11:44
|
|
|
Re: Image DnD into Upp app
By: koldo on Thu, 15 January 2015 08:51
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 15 January 2015 19:17
|
|
|
Re: Image DnD into Upp app
By: bushman on Sun, 18 January 2015 11:56
|
|
|
Re: Image DnD into Upp app
By: mirek on Mon, 19 January 2015 11:41
|
|
|
Re: Image DnD into Upp app
By: bushman on Mon, 19 January 2015 19:59
|
|
|
Re: Image DnD into Upp app
By: mirek on Tue, 20 January 2015 14:44
|
|
|
Re: Image DnD into Upp app
By: bushman on Thu, 22 January 2015 21:18
|
|
|
Re: Image DnD into Upp app
By: mirek on Fri, 23 January 2015 09:43
|
|
|
Re: Image DnD into Upp app
|
|
|
Re: Image DnD into Upp app
By: bushman on Fri, 23 January 2015 22:14
|
|
|
Re: Image DnD into Upp app
By: mirek on Sat, 24 January 2015 11:49
|
|
|
Re: Image DnD into Upp app
By: bushman on Sat, 24 January 2015 15:21
|
|
|
Re: Image DnD into Upp app
By: mirek on Mon, 26 January 2015 19:05
|
|
|
Re: Image DnD into Upp app
By: bushman on Mon, 26 January 2015 21:24
|
Goto Forum:
Current Time: Thu Oct 31 23:52:14 CET 2024
Total time taken to generate the page: 0.02806 seconds
|