Esempio n. 1
0
void Control::WriteRes(ResFile &resFile, bool ex, bool last)
{
    resFile.Align();
    if (!ex)
    {
        resFile.WriteDWord(style);
        resFile.WriteDWord(exStyle);
    }
    else
    {
        resFile.WriteDWord(helpIndex);
        resFile.WriteDWord(exStyle);
        resFile.WriteDWord(style);
    }
    pos.WriteRes(resFile);
    size.WriteRes(resFile);
    if (ex)
        resFile.WriteDWord(id);
    else
        resFile.WriteWord(id);
    cls.WriteRes(resFile);
    text.WriteRes(resFile);
    int len = 0;
    for (iterator it = begin() ; it != end(); ++it)
    {
        len += (*it)->GetLen();
    }
    resFile.WriteWord(len);
    if (len)
    {
        resFile.Align();
        for (iterator it = begin() ; it != end(); ++it)
        {
            if ((*it)->GetLen())
            {
                resFile.WriteData((*it)->GetData(), (*it)->GetLen());
            }
        }
    }
}
Esempio n. 2
0
void ResourceData::WriteRes(ResFile &resFile) 
{ 
    if (data) 
        resFile.WriteData(data, len); 
}