Home » U++ Library support » U++ Widgets - General questions or Mixed problems » ChildMouseEvent problems 
	
		
		
			| ChildMouseEvent problems [message #34089] | 
			Mon, 17 October 2011 09:54   | 
		 
		
			
				
				
				
					
						  
						mdelfede
						 Messages: 1310 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 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 14:56:12 CET 2025 
 Total time taken to generate the page: 0.04706 seconds 
 |