+void rc2xml::ParseListCtrl(wxString label, wxString varname)
+{
+ wxString token;
+ //while (ReadOrs(token));
+ ReadOrs(token);
+ int x,y,width,height;
+ ReadRect(x,y,width,height);
+ m_xmlfile.Write("\t\t<object class=\"wxListCtrl\"");
+ WriteBasicInfo(x,y,width,height,varname);
+ m_xmlfile.Write("\t\t</object>\n");
+
+}
+
+void rc2xml::WriteBitmap(wxString bitmapname)
+{
+//Look up bitmap
+ wxNode *node=m_bitmaplist->Find(LookUpId(bitmapname));
+ if (node==NULL)
+ {
+ m_xmlfile.Write("\t\t\t<bitmap>missingfile</bitmap>\n");
+ wxLogError("Unable to find bitmap:"+bitmapname);
+ return;
+ }
+
+ wxString *bitmappath;
+ bitmappath=(wxString *)node->Data();
+
+ bitmapname=wxFileNameFromPath(*bitmappath);
+ wxBitmap bitmap;
+ if (!bitmap.LoadFile(*bitmappath,wxBITMAP_TYPE_BMP ))
+ wxLogError("Unable to load bitmap:"+*bitmappath);
+
+ //Make a bitmap file name
+ bitmapname=CleanName(bitmapname);
+ bitmapname+=".bmp";
+ m_xmlfile.Write("\t\t\t<bitmap>"+bitmapname+"</bitmap>\n");
+ bitmap.SaveFile(m_targetpath+bitmapname,wxBITMAP_TYPE_BMP);
+}
+
+void rc2xml::WriteIcon(wxString iconname)
+{
+wxNode *node=m_iconlist->Find(iconname);
+ if (node==NULL)
+ {
+ m_xmlfile.Write("\t\t\t<bitmap>missing_file</bitmap>\n");
+ wxLogError("Unable to find icon:"+iconname);
+ }
+ wxString *iconpath;
+ iconpath=(wxString *)node->Data();
+ wxIcon icon;
+ wxBitmap bitmap;
+ if (!icon.LoadFile(*iconpath,wxBITMAP_TYPE_ICO ))
+ wxLogError("Unable to load icon:"+*iconpath);
+#ifdef __WXMSW__
+ bitmap.CopyFromIcon(icon);
+#else
+ bitmap = icon;
+#endif
+ iconname=wxFileNameFromPath(*iconpath);
+ //Make a bitmap file name
+ iconname=CleanName(iconname);
+ iconname+=".bmp";
+ m_xmlfile.Write("\t\t\t<bitmap>"+iconname+"</bitmap>\n");
+ bitmap.SaveFile(m_targetpath+iconname,wxBITMAP_TYPE_BMP);
+
+
+}
+/*Unfortunately sometimes the great MSVC Resource editor decides
+to use numbers instead of the word id. I have no idea why they
+do this, but that is the way it is.
+*/
+/* this is a quick and dirty way to parse the resource.h file
+it will not recognize #ifdef so it can be easily fooled
+*/
+void rc2xml::ParseResourceHeader()