define class molistener as _reportlistener of home() + "ffc\_reportlistener.vcx" ogdigraphics = .NULL. function beforereport dodefault() * create an graphic object this.ogdigraphics = newobject ( "GPGraphics", home() + "ffc\_GDIPlus.vcx" ) endfunc procedure render ( nfrxrecno, nleft, ntop, nwidth, nheight, ; nobjectcontinuationtype, ccontentstoberendered, ; gdiplusimage ) private ismapobject private mocommand private myhdc * recover report session and look the object this.setfrxdatasession() go nfrxrecno in frx * is an map object? if frx.objtype = 7 and frx.user = "map" then ismapobject = .t. else ismapobject = .f. endif * return to the current session this.setcurrentdatasession() * execute default render code dodefault ( nfrxrecno, nleft, ntop, nwidth, nheight, nobjectcontinuationtype, ; ccontentstoberendered, gdiplusimage ) * is an map object? if ismapobject then local z, xx as integer * obtain handle this.ogdigraphics.sethandle ( this.gdiplusgraphics ) * save graphic status this.ogdigraphics.save(@z) * get hdc myhdc = this.ogdigraphics.gethdc () * render the map (ESRI map objects) mapform.map.outputmap2 ( myhdc, nleft, ntop, nwidth, nheight ) this.ogdigraphics.releasehdc ( myhdc ) * recover the graphic state this.ogdigraphics.restore(z) endif endproc enddefine