U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Sun May 10 08:19:13 GMT+2 2026

Total time taken to generate the page: 0.00540 seconds