]>
git.saurik.com Git - wxWidgets.git/blob - contrib/utils/convertrc/rc2xml.cpp
1 // rc2xml.cpp: implementation of the wxRC2XML class.
3 //////////////////////////////////////////////////////////////////////
4 // For compilers that support precompilation, includes "wx/wx.h".
9 #include "wx/resource.h"
10 //////////////////////////////////////////////////////////////////////
11 // Construction/Destruction
12 //////////////////////////////////////////////////////////////////////
17 m_bitmaplist
=new wxList(wxKEY_STRING
);
18 m_stringtable
=new wxList(wxKEY_STRING
);
19 m_iconlist
= new wxList(wxKEY_STRING
);
29 bool wxRC2XML::Convert(wxString rcfile
, wxString xmlfile
)
31 m_rc
.Open(rcfile
.c_str());
32 m_filesize
=m_rc
.Length();
35 result
=m_xmlfile
.Open(xmlfile
.c_str(),"w+t");
36 wxASSERT_MSG(result
,"Couldn't create XML file");
41 /* Write Basic header for XML file */
42 m_xmlfile
.Write("<?xml version=\"1.0\" ?>\n");
43 m_xmlfile
.Write("<resource>\n");
45 //Gather all the resource we need for toolbars,menus, and etc
49 //Read in dialogs, toolbars,menus
52 m_xmlfile
.Write("</resource>\n");
60 void wxRC2XML::ParseDialog(wxString dlgname
)
65 /* Make sure that this really is a dialog
66 microsoft reuses the keyword DIALOG for other things
70 if (token
=="DISCARDABLE")
75 //Error isn't a Dialog resource eject eject
76 if (!token
.IsNumber())
79 //Record x,y,width,height
81 ReadRect(x
,y
,width
,height
);
86 while ((token
!="BEGIN")&(token
!="{"))
90 title
=GetQuoteField();
94 m_xmlfile
.Write(" <dialog");
95 //Avoid duplicate names this way
96 dlgname
.Replace("IDD_","DLG_");
98 WriteBasicInfo(x
,y
,width
,height
,dlgname
);
100 m_xmlfile
.Write(" <children>\n");
102 m_xmlfile
.Write(" </children>\n");
103 m_xmlfile
.Write(" </dialog>\n");
108 EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT
110 LTEXT "Bands",IDC_STATIC,11,86,21,8
111 EDITTEXT IDC_NAME,10,3,75,14,ES_AUTOHSCROLL
114 void wxRC2XML::ParseControls()
119 while ((token
!="END")&(token
!="}"))
123 else if (token
=="EDITTEXT")
125 else if (token
=="PUSHBUTTON")
127 else if (token
=="DEFPUSHBUTTON")
129 else if (token
=="GROUPBOX")
131 else if (token
=="COMBOBOX")
133 else if (token
=="CONTROL")
135 else if (token
=="LISTBOX")
137 else if (token
=="ICON")
139 else if (token
=="SCROLLBAR")
145 //LTEXT "Radius",IDC_STATIC,9,67,23,8
146 void wxRC2XML::ParseStaticText()
149 wxString phrase
,varname
;
150 phrase
=GetQuoteField();
152 int x
,y
,width
,height
;
153 ReadRect(x
,y
,width
,height
);
155 m_xmlfile
.Write(" <statictext");
156 WriteBasicInfo(x
,y
,width
,height
,varname
);WriteLabel(phrase
);
157 m_xmlfile
.Write(" </statictext>\n");
160 //EDITTEXT IDC_RADIUS,36,65,40,14,ES_AUTOHSCROLL
161 void wxRC2XML::ParseTextCtrl()
164 wxString varname
,style
;
166 int x
,y
,width
,height
;
167 ReadRect(x
,y
,width
,height
);
171 m_xmlfile
.Write(" <textctrl");
172 WriteBasicInfo(x
,y
,width
,height
,varname
);
173 m_xmlfile
.Write("\n </textctrl>\n");
176 //PUSHBUTTON "Create/Update",IDC_CREATE,15,25,53,13,NOT WS_TABSTOP
177 void wxRC2XML::ParsePushButton()
180 wxString phrase
,varname
;
181 phrase
=GetQuoteField();
185 int x
,y
,width
,height
;
186 ReadRect(x
,y
,width
,height
);
188 m_xmlfile
.Write(" <button");
189 WriteBasicInfo(x
,y
,width
,height
,varname
);
191 m_xmlfile
.Write(" </button>\n");
196 bool wxRC2XML::Seperator(int ch
)
198 //if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='|')|(ch=='\t'))
199 if ((ch
==' ')|(ch
==',')|(ch
==13)|(ch
==10)|(ch
=='\t'))
210 void wxRC2XML::ParseGroupBox()
212 // GROUPBOX "Rotate",IDC_STATIC,1,1,71,79
214 wxString phrase
,varname
;
215 phrase
=GetQuoteField();
217 int x
,y
,width
,height
;
218 ReadRect(x
,y
,width
,height
);
220 m_xmlfile
.Write(" <staticbox");
221 WriteBasicInfo(x
,y
,width
,height
,varname
);
223 m_xmlfile
.Write(" </staticbox>\n");
228 void wxRC2XML::ReadRect(int & x
, int & y
, int & width
, int & height
)
232 width
=atoi(GetToken());
233 height
=atoi(GetToken());
237 wxString
wxRC2XML::GetToken()
255 while (Seperator(ch
))
269 while (!Seperator(ch
))
283 wxString
wxRC2XML::GetQuoteField()
303 void wxRC2XML::ReadChar(int &ch
)
308 if((result
>=m_filesize
))
311 result
=m_rc
.Read(&ch
,1);
320 void wxRC2XML::ParseComboBox()
322 /* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
323 WS_VSCROLL | WS_TABSTOP */
327 int x
,y
,width
,height
;
328 ReadRect(x
,y
,width
,height
);
330 m_xmlfile
.Write(" <combobox");
331 WriteBasicInfo(x
,y
,width
,height
,varname
);
332 m_xmlfile
.Write("\n </combobox>\n");
338 void wxRC2XML::ParseMenu(wxString varname
)
342 //Write menubar to xml file
343 m_xmlfile
.Write(" <menubar");
344 //Avoid duplicate names this way
345 varname
.Replace("IDR_","MB_");
347 m_xmlfile
.Write(">\n");
348 m_xmlfile
.Write(" <children>\n");
350 while ((token
!="BEGIN")&(token
!="{"))
353 while ((token
!="END")&(token
!="}"))
361 m_xmlfile
.Write(" </children>\n");
362 m_xmlfile
.Write(" </menubar>\n");
365 void wxRC2XML::ParsePopupMenu()
369 wxString token
,name
,msg
,longhelp
,tip
;
370 token
=GetQuoteField();
372 //Remove /t because it causes problems
374 spot
=token
.First("\\t");
375 token
=token
.Left(spot
);
378 //Generate a fake name since RC menus don't have one
379 name
<<"Menu_"<<menucount
;
380 m_xmlfile
.Write(" <menu");
382 m_xmlfile
.Write(">\n");
384 m_xmlfile
.Write(" <children>\n");
386 while ((token
!="BEGIN")&(token
!="{"))
389 while ((token
!="END")&(token
!="}"))
396 if (token
=="MENUITEM")
400 m_xmlfile
.Write(" </children>\n");
401 m_xmlfile
.Write(" </menu>\n");
404 wxString
wxRC2XML::PeekToken()
414 //MS Windows pain in the butt CONTROL
415 void wxRC2XML::ParseControlMS()
417 wxString label
,varname
,kindctrl
,token
;
420 if (token
.Contains("\""))
421 ParseNormalMSControl();
423 ParseWeirdMSControl();
427 /* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
428 TBS_NOTICKS | WS_TABSTOP,52,73,100,15
431 void wxRC2XML::ParseSlider(wxString label
, wxString varname
)
434 while (ReadOrs(token
));
436 //fprintf(m_wxrfile," control = [%i,wxSlider,'','wxSL_HORIZONTAL','%s',",m_controlid,varname);
437 int x
,y
,width
,height
;
438 ReadRect(x
,y
,width
,height
);
439 m_xmlfile
.Write(" <slider");
440 WriteBasicInfo(x
,y
,width
,height
,varname
);
441 m_xmlfile
.Write("\n </slider>\n");
445 CONTROL "Progress1",CG_IDC_PROGDLG_PROGRESS,"msctls_progress32",
446 WS_BORDER,15,52,154,13
448 void wxRC2XML::ParseProgressBar(wxString label
, wxString varname
)
451 while (ReadOrs(token
));
452 int x
,y
,width
,height
;
453 ReadRect(x
,y
,width
,height
);
455 //Always horizontal in MFC
456 style
+="wxGA_HORIZONTAL";
457 m_xmlfile
.Write(" <gauge");
458 WriteBasicInfo(x
,y
,width
,height
,varname
);
460 m_xmlfile
.Write(" </gauge>\n");
463 /* FIXME: this function needs to be rewritten */
464 bool wxRC2XML::ReadOrs(wxString
& w
)
469 if (token
.IsNumber())
476 //Is it a check button or a radio button
477 void wxRC2XML::ParseCtrlButton(wxString label
, wxString varname
)
481 int x
,y
,width
,height
;
483 if (token
=="BS_AUTOCHECKBOX")
485 while (ReadOrs(token
));
486 ReadRect(x
,y
,width
,height
);
487 m_xmlfile
.Write(" <checkbox");
488 WriteBasicInfo(x
,y
,width
,height
,varname
);
490 m_xmlfile
.Write(" </checkbox>\n");
493 if (token
=="BS_AUTORADIOBUTTON")
495 while(ReadOrs(token
));
496 ReadRect(x
,y
,width
,height
);
497 m_xmlfile
.Write(" <radiobutton");
498 WriteBasicInfo(x
,y
,width
,height
,varname
);
500 m_xmlfile
.Write(" </radiobutton>\n");
508 void wxRC2XML::WriteSize(int width
, int height
)
511 msg
<<" <size>"<<width
<<","<<height
<<"d</size>";
512 m_xmlfile
.Write(msg
);
515 void wxRC2XML::WritePosition(int x
, int y
)
518 msg
<<" <pos>"<<x
<<","<<y
<<"d</pos>";
519 m_xmlfile
.Write(msg
);
522 void wxRC2XML::WriteTitle(wxString title
)
525 msg
=_T(" <title>"+title
+"</title>\n");
526 m_xmlfile
.Write(msg
);
529 void wxRC2XML::WriteName(wxString name
)
532 //Replace common MS ids with wxWindows ids
533 //I didn't do everyone of them
536 else if (name
=="IDCANCEL")
538 else if (name
=="IDAPPLY")
540 else if (name
=="ID_FILE_OPEN")
542 else if (name
=="ID_FILE_CLOSE")
544 else if (name
=="ID_FILE_SAVE")
546 else if (name
=="ID_FILE_SAVE_AS")
548 else if (name
=="ID_APP_EXIT")
550 else if (name
=="ID_FILE_PRINT")
552 else if (name
=="ID_FILE_PRINT_PREVIEW")
554 else if (name
=="ID_FILE_PRINT_SETUP")
555 name
="wxID_PRINT_SETUP";
556 else if (name
=="ID_APP_ABOUT")
558 else if (name
=="ID_EDIT_UNDO")
560 else if (name
=="ID_EDIT_CUT")
562 else if (name
=="ID_EDIT_COPY")
564 else if (name
=="ID_EDIT_PASTE")
567 m_xmlfile
.Write(" name= \""+name
+"\"");
570 void wxRC2XML::WriteLabel(wxString label
)
572 label
.Replace("&","$");
573 m_xmlfile
.Write(" <label>"+label
+"</label>\n");
576 void wxRC2XML::WriteBasicInfo(int x
, int y
, int width
, int height
, wxString name
)
579 m_xmlfile
.Write(">\n");
580 m_xmlfile
.Write(" ");
582 WriteSize(width
,height
);
583 m_xmlfile
.Write("\n");
587 void wxRC2XML::WriteStyle(wxString style
)
589 if (style
.Length()==0)
591 m_xmlfile
.Write("\n <style>"+style
+"</style>\n");
594 LISTBOX IDC_LIST1,16,89,48,40,LBS_SORT | LBS_MULTIPLESEL |
595 LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
597 void wxRC2XML::ParseListBox()
603 int x
,y
,width
,height
;
604 ReadRect(x
,y
,width
,height
);
606 m_xmlfile
.Write(" <listbox");
607 WriteBasicInfo(x
,y
,width
,height
,varname
);
608 m_xmlfile
.Write("\n </listbox>\n");
612 CONTROL "",IDC_RICHEDIT1,"RICHEDIT",ES_AUTOHSCROLL | WS_BORDER |
613 WS_TABSTOP,103,110,40,14
615 void wxRC2XML::ParseRichEdit(wxString label
, wxString varname
)
618 while (ReadOrs(token
));
619 int x
,y
,width
,height
;
620 ReadRect(x
,y
,width
,height
);
622 //Make it a rich text control
623 style
+="wxTE_MULTILINE ";
624 m_xmlfile
.Write(" <textctrl");
625 WriteBasicInfo(x
,y
,width
,height
,varname
);
627 m_xmlfile
.Write(" </textctrl>\n");
631 CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,209,72,
634 void wxRC2XML::ParseSpinCtrl(wxString label
, wxString varname
)
637 while (ReadOrs(token
));
638 int x
,y
,width
,height
;
639 ReadRect(x
,y
,width
,height
);
641 m_xmlfile
.Write(" <spinbutton");
642 WriteBasicInfo(x
,y
,width
,height
,varname
);
644 m_xmlfile
.Write("\n </spinbutton>\n");
649 void wxRC2XML::FirstPass()
651 wxString token
,prevtok
;
656 ParseBitmap(prevtok
);
657 else if (token
=="STRINGTABLE")
658 ParseStringTable(prevtok
);
659 else if (token
=="ICON")
665 void wxRC2XML::ParseBitmap(wxString varname
)
667 wxString token
,*bitmapfile
;
668 bitmapfile
=new wxString
;
670 //Microsoft notation?
671 if (token
=="DISCARDABLE")
677 *bitmapfile
=GetQuoteField();
678 m_bitmaplist
->Append(varname
,bitmapfile
);
683 void wxRC2XML::SecondPass()
685 wxString token
,prevtok
;
690 ParseDialog(prevtok
);
691 else if (token
=="MENU")
693 else if (token
=="TOOLBAR")
694 ParseToolBar(prevtok
);
700 void wxRC2XML::ParseToolBar(wxString varname
)
704 wxASSERT_MSG(token
=="DISCARDABLE","Error in toolbar parsing");
706 //Look up bitmap for toolbar and load
707 wxNode
*node
=m_bitmaplist
->Find(varname
);
708 wxString
*bitmappath
;
709 bitmappath
=(wxString
*)node
->Data();
711 if (!bitmap
.LoadFile(*bitmappath
,wxBITMAP_TYPE_BMP
))
712 wxLogError("Unable to load bitmap:"+*bitmappath
);
714 //Write toolbar to xml file
715 m_xmlfile
.Write(" <toolbar");
716 //Avoid duplicate names this way
717 varname
.Replace("IDR_","TB_");
719 m_xmlfile
.Write(">\n");
724 m_xmlfile
.Write(" <children>\n");
726 //Grab width and height
728 width
=atoi(GetToken());
729 height
=atoi(GetToken());
732 wxString buttonname
,msg
,tip
,longhelp
;
734 while ((token
!="BEGIN"))
737 while ((token
!="END")&(token
!="}"))
741 buttonname
=GetToken();
742 m_xmlfile
.Write(" <tool");
743 WriteName(buttonname
);
744 m_xmlfile
.Write(">\n");
745 //Write tool tip if any
746 if (LookUpString(buttonname
,msg
))
748 SplitHelp(msg
,tip
,longhelp
);
749 m_xmlfile
.Write(" <tooltip>"+tip
+"</tooltip>\n");
750 m_xmlfile
.Write(" <longhelp>"+longhelp
+"</longhelp>\n");
752 //Make a bitmap file name
753 buttonname
=CleanName(buttonname
);
755 m_xmlfile
.Write(" <bitmap>"+buttonname
+"</bitmap>\n");
756 WriteToolButton(buttonname
,c
,width
,height
,bitmap
);
757 m_xmlfile
.Write(" </tool>\n");
760 else if (token
=="SEPARATOR")
762 m_xmlfile
.Write(" <separator/>\n");
766 m_xmlfile
.Write(" </children>\n");
767 m_xmlfile
.Write(" </toolbar>\n");
770 //Extract bitmaps from larger toolbar bitmap
771 void wxRC2XML::WriteToolButton(wxString name
,int index
, int width
, int height
, wxBitmap bitmap
)
775 wxRect
r(x
,0,width
,height
);
778 little
=bitmap
.GetSubBitmap(r
);
779 little
.SaveFile(name
,wxBITMAP_TYPE_BMP
);
782 void wxRC2XML::ParseStringTable(wxString varname
)
786 while ((token
!="BEGIN"))
791 while ((token
!="END")&(token
!="}"))
794 *msg
=GetQuoteField();
795 m_stringtable
->Append(token
,msg
);
801 bool wxRC2XML::LookUpString(wxString strid
,wxString
& st
)
803 wxNode
*node
=m_stringtable
->Find(strid
);
808 s
=(wxString
*)node
->Data();
814 bool wxRC2XML::SplitHelp(wxString msg
, wxString
&shorthelp
, wxString
&longhelp
)
817 spot
=msg
.Find("\\n");
824 longhelp
=msg
.Left(spot
);
825 spot
=msg
.Length()-spot
-2;
826 shorthelp
=msg
.Right(spot
);
830 void wxRC2XML::ParseMenuItem()
832 wxString token
,name
,msg
,tip
,longhelp
;
834 if (PeekToken()=="SEPARATOR")
836 m_xmlfile
.Write(" <separator/>\n");
840 token
=GetQuoteField();
842 //Remove /t because it causes problems
843 spot
=token
.First("\\t");
844 token
=token
.Left(spot
);
845 m_xmlfile
.Write(" <menuitem");
847 m_xmlfile
.Write(">\n");
849 //Look up help if any listed in stringtable
850 if (LookUpString(name
,msg
))
852 SplitHelp(msg
,tip
,longhelp
);
853 m_xmlfile
.Write(" <help>"
854 +longhelp
+"</help>\n");
856 //look for extra attributes like checked and break
859 while ((ptoken
!="MENUITEM")&(ptoken
!="POPUP")&(ptoken
!="END"))
862 if (token
=="CHECKED")
863 m_xmlfile
.Write(" <checkable>1</checkable>\n");
864 else if (token
=="MENUBREAK");
865 //m_xmlfile.Write(" </break>\n");
866 else if (token
=="GRAYED");
868 wxLogError("Unknown Menu Item token:"+token
);
871 m_xmlfile
.Write(" </menuitem>\n");
875 //ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
876 void wxRC2XML::ParseIconStatic()
879 wxString varname
,iconname
;
882 wxNode
*node
=m_iconlist
->Find(iconname
);
884 iconpath
=(wxString
*)node
->Data();
887 if (!icon
.LoadFile(*iconpath
,wxBITMAP_TYPE_ICO
))
888 wxLogError("Unable to load icon:"+*iconpath
);
889 bitmap
.CopyFromIcon(icon
);
892 int x
,y
,width
,height
;
893 ReadRect(x
,y
,width
,height
);
895 m_xmlfile
.Write(" <staticbitmap");
896 WriteBasicInfo(x
,y
,width
,height
,varname
);
897 //Save icon as a bitmap
898 //Make a bitmap file name
899 iconname
=CleanName(iconname
);
901 m_xmlfile
.Write(" <bitmap>"+iconname
+"</bitmap>\n");
902 bitmap
.SaveFile(iconname
,wxBITMAP_TYPE_BMP
);
903 m_xmlfile
.Write(" </staticbitmap>\n");
906 //IDR_MAINFRAME ICON DISCARDABLE "res\\mfcexample.ico"
907 void wxRC2XML::ParseIcon(wxString varname
)
909 wxString token
,*iconfile
;
910 iconfile
=new wxString
;
913 *iconfile
=GetQuoteField();
914 m_iconlist
->Append(varname
,iconfile
);
918 wxString
wxRC2XML::CleanName(wxString name
)
921 name
.Replace("id_","");
922 name
.Replace("idr_","");
923 name
.Replace("idb_","");
924 name
.Replace("idc_","");
927 // And the award for most messed up control goes to...
928 // CONTROL IDB_FACE,IDC_STATIC,"Static",SS_BITMAP,26,62,32,30
929 void wxRC2XML::ParseStaticBitmap(wxString bitmapname
, wxString varname
)
936 wxNode
*node
=m_bitmaplist
->Find(bitmapname
);
937 wxString
*bitmappath
;
938 bitmappath
=(wxString
*)node
->Data();
940 if (!bitmap
.LoadFile(*bitmappath
,wxBITMAP_TYPE_BMP
))
941 wxLogError("Unable to load bitmap:"+*bitmappath
);
943 int x
,y
,width
,height
;
944 ReadRect(x
,y
,width
,height
);
946 m_xmlfile
.Write(" <staticbitmap");
947 WriteBasicInfo(x
,y
,width
,height
,varname
);
948 //Make a bitmap file name
949 bitmapname
=CleanName(bitmapname
);
951 m_xmlfile
.Write(" <bitmap>"+bitmapname
+"</bitmap>\n");
952 bitmap
.SaveFile(bitmapname
,wxBITMAP_TYPE_BMP
);
953 m_xmlfile
.Write(" </staticbitmap>\n");
958 void wxRC2XML::ParseNormalMSControl()
960 wxString label
,varname
,kindctrl
;
962 label
=GetQuoteField();
964 kindctrl
=GetQuoteField();
965 kindctrl
.MakeUpper();
967 if (kindctrl
=="MSCTLS_UPDOWN32")
968 ParseSpinCtrl(label
,varname
);
969 if (kindctrl
=="MSCTLS_TRACKBAR32")
970 ParseSlider(label
,varname
);
971 if (kindctrl
=="MSCTLS_PROGRESS32")
972 ParseProgressBar(label
,varname
);
973 if (kindctrl
=="SYSTREEVIEW32")
974 ParseTreeCtrl(label
,varname
);
975 if (kindctrl
=="SYSMONTHCAL32")
976 ParseCalendar(label
,varname
);
977 if (kindctrl
=="SYSLISTVIEW32")
978 ParseListCtrl(label
,varname
);
979 if (kindctrl
=="BUTTON")
980 ParseCtrlButton(label
,varname
);
981 if (kindctrl
=="RICHEDIT")
982 ParseRichEdit(label
,varname
);
986 void wxRC2XML::ParseWeirdMSControl()
993 kindctrl
=GetQuoteField();
994 kindctrl
.MakeUpper();
995 // CONTROL IDB_FACE,IDC_STATIC,"Static",SS_BITMAP,26,62,32,30
996 if (kindctrl
=="STATIC")
998 if (PeekToken()=="SS_BITMAP")
999 ParseStaticBitmap(id
,varname
);
1001 wxLogError("Unknown MS Control Static token");
1005 //SCROLLBAR IDC_SCROLLBAR1,219,56,10,40,SBS_VERT
1007 void wxRC2XML::ParseScrollBar()
1013 int x
,y
,width
,height
;
1014 ReadRect(x
,y
,width
,height
);
1016 //Default MFC style is horizontal
1017 style
=_T("wxSB_HORIZONTAL");
1019 while (ReadOrs(token))
1021 if (token=="SBS_VERT")
1022 style=_T("wxSB_VERTICAL");
1025 m_xmlfile
.Write(" <scrollbar");
1026 WriteBasicInfo(x
,y
,width
,height
,varname
);
1028 m_xmlfile
.Write("\n </scrollbar>\n");
1032 // CONTROL "Tree1",IDC_TREE1,"SysTreeView32",WS_BORDER | WS_TABSTOP,
1035 void wxRC2XML::ParseTreeCtrl(wxString label
, wxString varname
)
1038 while (ReadOrs(token
));
1039 int x
,y
,width
,height
;
1040 ReadRect(x
,y
,width
,height
);
1041 m_xmlfile
.Write(" <treectrl");
1042 WriteBasicInfo(x
,y
,width
,height
,varname
);
1043 m_xmlfile
.Write(" </treectrl>\n");
1046 // CONTROL "MonthCalendar1",IDC_MONTHCALENDAR1,"SysMonthCal32",
1047 //MCS_NOTODAY | WS_TABSTOP,105,71,129,89
1049 void wxRC2XML::ParseCalendar(wxString label
, wxString varname
)
1052 while (ReadOrs(token
));
1053 int x
,y
,width
,height
;
1054 ReadRect(x
,y
,width
,height
);
1055 m_xmlfile
.Write(" <calendarctrl");
1056 WriteBasicInfo(x
,y
,width
,height
,varname
);
1057 m_xmlfile
.Write(" </calendarctrl>\n");
1059 // CONTROL "List1",IDC_LIST1,"SysListView32",WS_BORDER | WS_TABSTOP,
1062 void wxRC2XML::ParseListCtrl(wxString label
, wxString varname
)
1065 while (ReadOrs(token
));
1066 int x
,y
,width
,height
;
1067 ReadRect(x
,y
,width
,height
);
1068 m_xmlfile
.Write(" <listctrl");
1069 WriteBasicInfo(x
,y
,width
,height
,varname
);
1070 m_xmlfile
.Write(" </listctrl>\n");