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 » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » Constructor with parameter
Re: Constructor with parameter [message #9517 is a reply to message #9516] Mon, 14 May 2007 10:07 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
class EditDialog : public TopWindow
{
	Button b;
	
	void DoClose()
	{
		Close();
    }
	
	public :
	
	typedef EditDialog CLASSNAME;
	
	EditDialog(const char *title)
	{
    	SetRect(0, 0, 200, 50);
    	Title(title);
    	Add(b.SetLabel("Close EditDialog").SizePos());
    	b <<= THISBACK(DoClose);
	}
};


The question is whether it is worth the trouble.

In most cases, calling the Title method is as complicated as this.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unable to compile with Irrlicht
Next Topic: How to access other classes variables?
Goto Forum:
  


Current Time: Thu May 16 11:46:09 CEST 2024

Total time taken to generate the page: 0.01678 seconds