From: Dirk B. <db...@us...> - 2005-01-23 16:32:28
|
Update of /cvsroot/win32forth/win32forth/src/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27858/src/console Modified Files: CONSOLE.F Log Message: dbu: New word SetConsoleFont ( hFont -- ) to set the font for the console window added Index: CONSOLE.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/console/CONSOLE.F,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CONSOLE.F 21 Dec 2004 00:19:09 -0000 1.1 --- CONSOLE.F 23 Jan 2005 16:32:19 -0000 1.2 *************** *** 189,192 **** --- 189,193 ---- 0 PROC c_maxcolrow 2 PROC c_setmaxcolrow + 1 PROC c_setfont : x_pushkey ( c1 -- ) \ push c1 into the keyboard input stream *************** *** 234,244 **** 3 PROC InvalidateRect : x_SetcharWH ( width height -- ) \ set the width and height of the Call c_setcharwh drop \ current console font ! 1 0 _conHndl call InvalidateRect drop ; \ force repaint : x_setcolrow ( cols rows -- ) \ set the console size Call c_resize drop ; synonym set-consize setcolrow --- 235,265 ---- 3 PROC InvalidateRect + : ConsoleRepaint ( -- ) \ redraw console window + 1 0 _conHndl call InvalidateRect drop ; + : x_SetcharWH ( width height -- ) \ set the width and height of the Call c_setcharwh drop \ current console font ! ConsoleRepaint ; \ force repaint : x_setcolrow ( cols rows -- ) \ set the console size Call c_resize drop ; + : SetConsoleFont ( hFont -- ) \ set the console font. If hFont is NULL the + \ default font will be set. + call c_setfont drop + ConsoleRepaint ; \ force repaint + + \ Usage: + \ + \ Font cFont + \ 16 Height: cFont + \ 8 Width: cFont + \ s" Courier New" SetFaceName: cFont + \ FW_NORMAL Weight: cFont + \ Create: cFont + \ Handle: cFont SetConsoleFont + \ zHandle: cFont \ don't let Win32Forth destroy the font; the console does it !!! + + synonym set-consize setcolrow *************** *** 369,370 **** --- 390,393 ---- SYNONYM _BYE k_BYE + + |