Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Opening window during Drag-Drop crashes app.
Opening window during Drag-Drop crashes app. [message #10371] |
Wed, 04 July 2007 15:43  |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
I think this is due to the refactoring of the DnD mentioned here as this definitely not happen with 705-dev3. The reversing of the calling order seems to trigger some sort of infinite recursion/loop that only ends when Windows runs out of resources and CreateWindow fails.
It is very easy reproduce, just add a PromptOK to the ColumnListDnD example like so:
void DropSum(int ii, PasteClip& d) {
if(AcceptInternal<ColumnList>(d, "mydrag")) {
const ColumnList& src = GetInternal<ColumnList>(d);
int sum = 0;
for(int i = 0; i < src.GetCount(); i++)
if(src.IsSel(i))
sum += atoi(~String(src[i]));
list.Set(ii, AsString(sum));
d.SetAction(DND_COPY);
list.SetCursor(ii);
PromptOK("Sum");
}
}
This breaks a major application where I frequently use Prompts to get confirmation for Drag-Drops before completion (as they initiate a database update). So I would be grateful for a fix (Its a bit beyond me).
Cheers,
James
[Updated on: Wed, 04 July 2007 15:44] Report message to a moderator
|
|
|
|
|
|
|
Goto Forum:
Current Time: Tue May 13 20:13:23 CEST 2025
Total time taken to generate the page: 0.03349 seconds
|