void rc2wxr::Convert(wxString wxrfile, wxString rcfile)
-
-{
-
-m_rc.Open(rcfile);
-
-m_filesize=m_rc.Length();
-
-if( (m_wxr = wxFopen( wxrfile, _T("wt") )) == NULL )
-
-{
-
- return;
-
-}
-
-
-
-
-
-wxString tok,prevtok;
-
-
-
-
-
-while (!m_done)
-
-{
-
-
-
-tok=GetToken();
-
-
-
-if (tok==_T("DIALOG"))
-
{
+ m_rc.Open(rcfile);
+ m_filesize=m_rc.Length();
+ if( (m_wxr = wxFopen( wxrfile, _T("wt") )) == NULL )
+ {
+ return;
+ }
-ParseDialog(prevtok);
-
-}
-
-
-
-
-
-if (tok==_T("MENU"))
-
-{
-
-ParseMenu(prevtok);
-
-}
-
-
-
-prevtok=tok;
-
-}
-
-
+ wxString tok,prevtok;
-fclose(m_wxr);
+ while (!m_done)
+ {
+ tok=GetToken();
-//fclose(m_rc);
+ if (tok==_T("DIALOG"))
+ {
+ ParseDialog(prevtok);
+ }
-m_rc.Close();
+ if (tok==_T("MENU"))
+ {
+ ParseMenu(prevtok);
+ }
+ prevtok=tok;
+ }
+ fclose(m_wxr);
+ m_rc.Close();
}
void rc2wxr::ReadChar(int &ch)
-
{
+ wxFileOffset result = m_rc.Tell();
- int result;
+ if ( result >= m_filesize )
+ m_done=true;
-result=m_rc.Tell();
+ result = m_rc.Read(&ch,1);
+ if ( result==wxInvalidOffset )
+ m_done=true;
-
-if((result>=m_filesize))
-
- m_done=true;
-
-
-
-result=m_rc.Read(&ch,1);
-
-
-
-if((result==-1))
-
- m_done=true;
-
-
-
-if(ch==EOF)
-
- m_done=true;
-
+ if(ch==EOF)
+ m_done=true;
}
void rc2wxr::ParseComboBox()
-
{
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |