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 » TabCtrl » [BUG - FIXED] Add() crashes system
Re: [BUG] Add() crashes system [message #11115 is a reply to message #11114] Mon, 20 August 2007 20:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
luzr wrote on Mon, 20 August 2007 14:26

Wow, do I understand well that it causes XP to crash for you as well?

That is really something Smile

Going to investigate.

Mirek


Well, the fix is trivial:

TabCtrl::Item& TabCtrl::Add()
{
	Item& t = tab.Add();
	t.owner = this;
	if(sel < 0)
		Set(0);
	Layout(); //<<<<<<<<<<<< this was missing...
	return t;
}


and the reason why it has crashed XP is that there were some pretty bad numbers going into GDI, as the tab had wrong layout.. (obviously, M$ should take better care there, it looks like another vulnerability).

I have also added Refresh at the end of Layout (so that you do not have to do it manually, that was a bug too).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Deleting Tabs
Next Topic: Why this doesn't work ?
Goto Forum:
  


Current Time: Fri Jun 07 23:00:07 CEST 2024

Total time taken to generate the page: 0.02198 seconds