Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Drawing Backgroud
Drawing Backgroud [message #7314] |
Thu, 21 December 2006 16:24  |
AngelPortal
Messages: 13 Registered: December 2006
|
Promising Member |
|
|
1)I have coded I GUI that uses a tree Ctrl as a menu of my program.
2)Than, I paintd the GUI as White.
3)But now I want to insert an image as a Background of the
GUI that is already displaing the tree menu.
4)Thats is possible.
5) Why the stand code to Display an image do not show any image.
6) If I take the lines that insert the Tree in the GUI the image
appears.
Any Sugestion?
Check the Code
--------------------------------
xadrez::xadrez()
{
Progress pi;
CtrlLayout(*this, "Xadrez Postal 1.0");
estadoxadrezpostal = "Bem vindo ao Xadrez Postal !";
AddFrame(menu);
menu.Add("Ajuda", THISBACK(ajuda));
menu.Add("Sobre Xadrez Postal", THISBACK(sobre));
menu.Add("Sair",THISBACK(sair));
AddFrame(estadoxadrezpostal);
horizontal.Add(arvoredeescolha);
Add(horizontal.Horz().SizePos());
arvoredeescolha.MultiSelect();
arvoredeescolha.WhenOpen = THISBACK(OpenDir);
arvoredeescolha.WhenClose = THISBACK(CloseDir);
arvoredeescolha.WhenCursor = THISBACK(ShowPath);
arvoredeescolha.WhenLeftDouble = THISBACK(TratarOpcoesDeArvore);
arvoredeescolha.SetRoot(CtrlImg::Dir(), "Entrada");
pi.AlignText(ALIGN_LEFT);
LoadTree(0, "Entrada", pi);
BackPaint();
}
And
void Paint(Draw& w)
{
Size sz = GetSize();
w.DrawRect(sz, SWhite);
Size isz = vacat().GetSize();
w.DrawImage((sz.cx - isz.cx) / 2, (sz.cy - isz.cy) / 2, vacat());
}
----------------------------------------------------------
Best Regards
|
|
|
Goto Forum:
Current Time: Tue Apr 29 22:15:10 CEST 2025
Total time taken to generate the page: 0.01138 seconds
|