Greetings,
I have the following code...

Code:
#include <ClanLib/core.h>
#include <ClanLib/display.h>
#include <ClanLib/gl.h>
#include <ClanLib/application.h>
using namespace std;

class cClanLibApp : public CL_ClanApplication
{
	virtual int main(int,char**)
	{
		try
		{
			CL_SetupCore core;
			CL_SetupDisplay display;
			CL_SetupGL gl;

			CL_DisplayWindow window("Welcome",350,350);

			while (!CL_Keyboard::get_keycode(CL_KEY_ESCAPE))
			{
			    CL_Display::clear();

			    CL_Surface * rec = new CL_Surface();
			    CL_Rect Rect;
			    Rect.left = 0;
			    Rect.top = 0;
			    Rect.right = 300;
			    Rect.bottom = 300;
                            rec -> draw(Rect);
			
			    CL_Display::flip();
			    CL_System::sleep(10);
			    CL_System::keep_alive();
			    delete rec;
			}
		}
		catch ( CL_Error err )
		{
			cout << "Error : " << err.message.c_str() << endl;
		}
		return 0;
	}
}app;
When executing this, i get a "Don't Send" error on window xp, and now am getting a run-time error... what's wrong with my code ?