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 » Draw, Display, Images, Bitmaps, Icons » Showing bitmaps or Icons
Re: Showing bitmaps or Icons [message #1806 is a reply to message #1803] Mon, 20 March 2006 09:12 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
fudadmin wrote on Mon, 20 March 2006 01:45

Why this doesn't work?
#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{     TopWindow w;
      Label l;
      Image img;

      w.Add(l);
	l.SetPos(l.PosLeft(0, 100), l.PosTop(0, 30));	

	img = BmpEncoder::NewBmp()->LoadImage("testImg.bmp");
	//img.Exclamation();    //at least this should work?
	l.SetImage(img);

	w.Run();
}



And how to check if image was loaded?


Are you sure that path is correct? (Well, there is no path, so it likely is not).

If it was not loaded, result will be empty (e.g. GetSize() == Size(0, 0))

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Image with Layout (iml) painted red, why?
Next Topic: When I added "Draw" package to my project (605dev1), I get "plugin\z" added...
Goto Forum:
  


Current Time: Tue May 21 00:47:52 CEST 2024

Total time taken to generate the page: 0.02782 seconds