From: Dirk B. <db...@us...> - 2005-11-05 13:22:23
|
Update of /cvsroot/win32forth/win32forth/demos/GdiDemo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12989/demos/GdiDemo Modified Files: Metafile.f Log Message: Fixed some problems in the gdiClass Library I found when trying the Metafile demo as a turnkey application. Index: Metafile.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/demos/GdiDemo/Metafile.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Metafile.f 5 Nov 2005 10:53:26 -0000 1.2 --- Metafile.f 5 Nov 2005 13:22:16 -0000 1.3 *************** *** 10,14 **** needs gdi/gdi.f \ the GDI class library ! 0 value create-tunkey? \ ---------------------------------------------------------------------- --- 10,14 ---- needs gdi/gdi.f \ the GDI class library ! 1 value create-tunkey? \ ---------------------------------------------------------------------- *************** *** 29,32 **** --- 29,33 ---- create Text1 ," This is a Text" create Text2 ,"TEXT" "This is a Text with a\TTAB" + int Created? winver 1 > [if] \ sorry only Win98 and better *************** *** 93,96 **** --- 94,98 ---- if \ save it FileName count Save: tMetaDC drop + true to Created? then Destroy: tMetaDC *************** *** 107,117 **** :M On_Paint: ( -- ) ! GetHandle: self GetDC: tDC ! if LoadAndDrawIt ! Release: tDC then ;M :M Start: ( -- ) \ create a Pen hWnd ChooseColor: tPen 0= --- 109,123 ---- :M On_Paint: ( -- ) ! Created? ! if hWnd GetDC: tDC ! if LoadAndDrawIt ! Release: tDC ! then then ;M :M Start: ( -- ) + FALSE to Created? \ we don't have a Metafile to display yet + \ create a Pen hWnd ChooseColor: tPen 0= *************** *** 148,160 **** :M On_Done: ( -- ) ! TURNKEYED? 0= ! if Destroy: tPen ! Destroy: tSolidBrush ! Destroy: tHatchBrush ! Destroy: tDC ! Destroy: tMetaDC ! then ! On_Done: super ;M ! ;object --- 154,160 ---- :M On_Done: ( -- ) ! On_Done: super ! turnkeyed? if bye then ! ;M ;object *************** *** 168,172 **** create-tunkey? [if] ! ' GdiDemo turnkey GdiDemo.exe [else] GdiDemo --- 168,172 ---- create-tunkey? [if] ! ' GdiDemo turnkey Metafile.exe [else] GdiDemo |