Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
mrjt is currently offline  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 Smile (Its a bit beyond me).

Cheers,
James

[Updated on: Wed, 04 July 2007 15:44]

Report message to a moderator

Re: Opening window during Drag-Drop crashes app. [message #10387 is a reply to message #10371] Thu, 05 July 2007 07:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Fixed. However, one problem remains - the arrow cursor keeps its D&D image override. Hopefully I will look into this later today....
Re: Opening window during Drag-Drop crashes app. [message #10388 is a reply to message #10387] Thu, 05 July 2007 11:25 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Can't I just use
Ctrl::OverrideCursor(Image());


Thanks for the quick fix.
James

[Updated on: Thu, 05 July 2007 11:27]

Report message to a moderator

Re: Opening window during Drag-Drop crashes app. [message #10393 is a reply to message #10388] Thu, 05 July 2007 18:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mrjt wrote on Thu, 05 July 2007 05:25

Can't I just use
Ctrl::OverrideCursor(Image());




Most likely yes, but it should work without such troubles...

Mirek
Re: Opening window during Drag-Drop crashes app. [message #10394 is a reply to message #10388] Thu, 05 July 2007 20:09 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mrjt wrote on Thu, 05 July 2007 05:25

Can't I just use
Ctrl::OverrideCursor(Image());


Thanks for the quick fix.
James


OK, now fixed this too.

In fact, the fix was placing above into "Drop" handler Wink

Mirek
Previous Topic: GetHomeDirectory() not supported on Windows?
Next Topic: How to read from and write to a table in a file (CSV)?
Goto Forum:
  


Current Time: Thu Apr 25 01:01:30 CEST 2024

Total time taken to generate the page: 0.03225 seconds