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++ Widgets - General questions or Mixed problems » ChildMouseEvent problems
ChildMouseEvent problems [message #34089] Mon, 17 October 2011 09:54 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi,

if I delete a control from inside ChildMouseEvent handler, the app will crash because Upp try to dispatch the event to it AFTER the control deletion :

Image Ctrl::MouseEventH(int event, Point p, int zdelta, dword keyflags)
{
	GuiLock __;
	for(int i = 0; i < mousehook().GetCount(); i++)
		if((*mousehook()[i])(this, false, event, p, zdelta, keyflags))
			return Image::Arrow();
	LogMouseEvent(NULL, this, event, p, zdelta, keyflags);
	if(parent)
		parent->ChildMouseEvent(this, event, p, zdelta, keyflags);
	return MouseEvent(event, p, zdelta, keyflags);  <---HERE
}



I don't know if a solution is possible, either.
By now I solved posting a callback from inside ChildMouseEvent instead doing the process there.

Max
Re: ChildMouseEvent problems [message #34166 is a reply to message #34089] Wed, 26 October 2011 08:24 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hopefully fixed using Ptr<Ctrl>...

Please test.

Mirek
Previous Topic: Theide 3938 drag&drop fault
Next Topic: EditField-Style - paper - just black!
Goto Forum:
  


Current Time: Fri Mar 29 12:35:36 CET 2024

Total time taken to generate the page: 0.01363 seconds