[3] | -> wxPen
The handle table works as follows.
- When a GDI object is created whilst reading in the
+ When a GDI object is created while reading in the
metafile, the (e.g.) createpen record is added to the
first free entry in the handle table. The createpen
record's param1 is a pointer to the actual wxPen, and
{
HandleTableSize = 0;
- FILE *handle = wxFopen(file, wxT("rb"));
+ FILE *handle = wxFopen(wxFNCONV(file), wxT("rb"));
if (!handle) return false;
// Read placeable metafile header, if any
wxXMetaFile::~wxXMetaFile(void)
{
- wxNode *node = metaRecords.GetFirst();
+ wxObjectList::compatibility_iterator node = metaRecords.GetFirst();
while (node)
{
wxMetaRecord *rec = (wxMetaRecord *)node->GetData();
delete rec;
- wxNode *next = node->GetNext();
- delete node;
+ wxObjectList::compatibility_iterator next = node->GetNext();
+ metaRecords.Erase(node);
node = next;
}
}
bool wxXMetaFile::Play(wxDC *dc)
{
- wxNode *node = metaRecords.GetFirst();
+ wxObjectList::compatibility_iterator node = metaRecords.GetFirst();
while (node)
{
wxMetaRecord *rec = (wxMetaRecord *)node->GetData();