8325499@elecvax.eecs.unsw.oz (Gilbert Taylor-Wood) (07/13/88)
I am trying to get hold of the grafport associated with the MPW file diagnostic, ( I want to know the window width, font used etc.). I thought the following would work but it dosnt { of course :-( }. Result is set to -1. Any and all suggestions would be welcome, please reply by mail, I will summarize to the net if there is any interest. thanks Gilbert ------------------------------------------------------------------------------- program test; USES {$U PasLibIntf.p } PasLibIntf, {$U MemTypes.p } MemTypes, {$U QuickDraw.p } Quickdraw, {$U OSIntf.p } OSIntf, {$U ToolIntf.p } ToolIntf, {$U IntEnv.p } IntEnv; const Interactive = 0; type graf_port_handle_type = ^grafptr; var dummy : longint; graf_port_handle : graf_port_handle_type; result: longint; begin if ( IEIOCtl (diagnostic, FIOINTERACTIVE, dummy) = Interactive ) then begin writeln('Interactive'); plflush ( output); new ( graf_port_handle ); result := IEIOCtl ( diagnostic, TIOGPORT, graf_port_handle ); writeln ( 'graf port access result = ', result );plflush(output); end end. --- Gilbert Taylor-Wood P.O. Box 448 Kensington NSW ACSnet : 8325499@elecvax.eecs.unsw.oz AUSTRALIA 2033 Bitnet : 8325499@elecvax.eecs.unsw.oz@munnari.oz