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++ Library : Other (not classified elsewhere) » Cannot draw icon on a window
Cannot draw icon on a window [message #15479] Fri, 25 April 2008 21:22 Go to next message
indiocolifa is currently offline  indiocolifa
Messages: 49
Registered: January 2008
Location: Argentina
Member
I'm trying to draw some keys picture on a window. It does not appears altough the image is good at the .iml file.

This is the class and constructor:

class LoginWindow : public WithLoginLayout<TopWindow> 
{

public:
	typedef LoginWindow CLASSNAME;
	LoginWindow();	
		
	void BtnOkPush();
	void BtnOkCancel();
	virtual	void Activate();

};

LoginWindow::LoginWindow()
{
	CtrlLayout(*this, "Iniciar sesión");
	editPassword.Password(true);	
	btnOk.WhenAction = THISBACK(BtnOkPush);
	btnCancel.WhenAction = THISBACK(BtnOkCancel);	
	WhenClose = THISBACK(BtnOkCancel);		
	
	Picture pic;
	Image m = imgpak::LOGINKEYS();
	DrawingDraw iw(m.GetSize());
	iw.DrawImage(0, 0, m);
	Drawing dr = iw;
	pic = dr;
	this->Add(pic);
}


Maybe I should modify the layout file manually to include the Picture object? Rolling Eyes
Re: Cannot draw icon on a window [message #15486 is a reply to message #15479] Sat, 26 April 2008 07:47 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Picture gets destryoed at the end of constructor.

You need to make it a member variable.

Mirek
Previous Topic: Report printing bug
Next Topic: Bass audio library issue?
Goto Forum:
  


Current Time: Sat Apr 20 00:03:34 CEST 2024

Total time taken to generate the page: 0.05764 seconds