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 » Drawing Backgroud
Drawing Backgroud [message #7314] Thu, 21 December 2006 16:24 Go to previous message
AngelPortal is currently offline  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 Embarassed
 
Read Message
Read Message
Read Message icon6.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to NOT dlopen libgtk and stuff....?
Next Topic: Wrong Size problem..
Goto Forum:
  


Current Time: Tue Mar 19 06:22:19 CET 2024

Total time taken to generate the page: 0.01057 seconds