Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Porting a Delphi Application
Re: Porting a Delphi Application [message #11690 is a reply to message #11656] |
Fri, 21 September 2007 20:12   |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
Well compiling Cairo under U++ sure is hell, I couldn’t get any significant progress so I decided to use the precompiled Windows dll and try to integrate that into U++ control drawing. But before that I have some problems with accessing TreeControl items.
I am trying to insert an TreeNodes with the key as the tag name of a xml tag and the value as the actual XmlNode. On WhenSel I need to obtain that XmlNode and create an object based on it's content.
But I get a dynamic_cast exception when I try to do this.
void MainWindow::Load(int parent, const XmlNode& p)
{
int t = xml.Add(parent, CBPImages::Move(), p.GetTag(), p);
for (int i = 0; i < p.GetCount(); i++)
Load(t, p[i]);
}
void MainWindow::Load(const char *filename)
{
try
{
XmlNode node = ParseXML(LoadFile(filename));
int t = xml.Add(0, CBPImages::Move(), "Image", node);
for (int i = 0; i < node.GetCount(); i++)
Load(t, node[i]);
}
catch (XmlError e)
{
PromptOK("XMLError");
}
}
void MainWindow::SelectItem()
{
const XmlNode& node = ValueTo<XmlNode>(xml.GetValue());
lbl.SetLabel(node.GetTag());
}
|
|
|
 |
|
Porting a Delphi Application
By: cbpporter on Sat, 15 September 2007 03:40
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Sat, 15 September 2007 13:44
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sun, 16 September 2007 12:30
|
 |
|
Re: Porting a Delphi Application
By: mirek on Tue, 18 September 2007 20:57
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Tue, 18 September 2007 21:16
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Wed, 19 September 2007 11:07
|
 |
|
Re: Porting a Delphi Application
By: mirek on Wed, 19 September 2007 12:21
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Wed, 19 September 2007 12:49
|
 |
|
Re: Porting a Delphi Application
By: mirek on Wed, 19 September 2007 14:56
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Wed, 19 September 2007 20:32
|
 |
|
Re: Porting a Delphi Application
By: zsolt on Wed, 19 September 2007 21:42
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Wed, 19 September 2007 21:49
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Wed, 19 September 2007 22:26
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Thu, 20 September 2007 18:24
|
 |
|
Re: Porting a Delphi Application
By: mirek on Wed, 19 September 2007 12:18
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Sun, 16 September 2007 11:16
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sun, 16 September 2007 12:32
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sun, 16 September 2007 12:24
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Sun, 16 September 2007 15:49
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Sun, 16 September 2007 15:51
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sun, 16 September 2007 20:53
|
 |
|
Re: Porting a Delphi Application
By: mr_ped on Sun, 16 September 2007 23:06
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sun, 16 September 2007 23:42
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Mon, 17 September 2007 05:48
|
 |
|
Re: Porting a Delphi Application
By: mirek on Mon, 17 September 2007 09:50
|
 |
|
Re: Porting a Delphi Application
By: mirek on Mon, 17 September 2007 10:03
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Mon, 17 September 2007 19:40
|
 |
|
Re: Porting a Delphi Application
By: mirek on Mon, 17 September 2007 22:34
|
 |
|
Re: Porting a Delphi Application
By: mr_ped on Thu, 20 September 2007 19:37
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Fri, 21 September 2007 20:12
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sat, 22 September 2007 00:22
|
 |
|
Re: Porting a Delphi Application
By: cbpporter on Sat, 22 September 2007 00:25
|
 |
|
Re: Porting a Delphi Application
By: mirek on Sat, 22 September 2007 01:39
|
Goto Forum:
Current Time: Fri Jul 18 06:41:28 CEST 2025
Total time taken to generate the page: 0.04229 seconds
|