Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Showing bitmaps or Icons
Re: Showing bitmaps or Icons [message #2502 is a reply to message #117] |
Sat, 15 April 2006 13:20   |
gprentice
Messages: 260 Registered: November 2005 Location: New Zealand
|
Experienced Member |
|
|
Is the code below valid - it seems to work?
gp1 is the name of a bitmap in an .iml file, just like Smiley() in the reference/iml example. What does img1 = gp1() do - does img1 store a copy of the bitmap?
GUI_APP_MAIN
{
App w;
Label l1;
Image img1;
w.Add(l1);
l1.SetPos(l1.PosLeft(10, 100), l1.PosTop(10, 30));
img1= gp1();
l1.SetImage(img1);
w.Run();
}
In the iml example there is
w.DrawImage((sz.cx - isz.cx) / 2, (sz.cy - isz.cy) / 2, Smiley());
What does "Smiley()" do here - does it get the "address" of the Smiley bitmap that has been embedded in the app due to the iml file being part of the project?
Graeme
BTW - in the reference/events example, the Log("Paint") in the Paint function causes continuous events ... I can't remember if this was originally a commented line and I uncommented it myself or not.
[Updated on: Sun, 16 April 2006 11:35] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun May 11 17:18:02 CEST 2025
Total time taken to generate the page: 0.00572 seconds
|