From: Rod O. <rod...@us...> - 2006-08-03 20:40:42
|
Update of /cvsroot/win32forth/win32forth/apps/Sudoku In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4176/apps/Sudoku Modified Files: Sudoku.f Log Message: Rod: Version 1.4, fixed bug in sizing, changed registry settings to current Win32Forth Index: Sudoku.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Sudoku/Sudoku.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Sudoku.f 6 Nov 2005 09:17:22 -0000 1.4 --- Sudoku.f 3 Aug 2006 20:40:39 -0000 1.5 *************** *** 1,2 **** --- 1,3 ---- + \ $Id$ \ Sudoku.f Application to play and solve Sudoku puzzles. \ September 2005 Rod Oakford *************** *** 6,12 **** anew -Sudoku.f ! Create SudokuVersion ," 1.3" s" apps\Sudoku" "fpath+ s" apps\Sudoku\res" "fpath+ WinLibrary Winmm.dll --- 7,15 ---- anew -Sudoku.f ! Create SudokuVersion ," 1.4" s" apps\Sudoku" "fpath+ s" apps\Sudoku\res" "fpath+ + : Sysgen ; \ define for turnkey + Create ToolBarLayoutKey 256 allot WinLibrary Winmm.dll *************** *** 393,400 **** --- 396,415 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ + PROGREG-SET-BASE-PATH \ to put registry entries under current version of Win32Forth (e.g. Win32Forth 6.11.09) + Create RegPath$ max-path allot + ProgReg count RegPath$ place s" Sudoku" RegPath$ +place + RegPath$ count RegistrySet Sudoku + RegPath$ count pad place s" \Window" pad +place pad count RegistrySet WindowSettings + RegPath$ count pad place s" \Options" pad +place pad count RegistrySet Options + RegPath$ count pad place s" \Recent Files" pad +place pad count RegistrySet RecentFilesList + + (( \ to put registry entries under Win32Forth s" Win32Forth\Sudoku" RegistrySet Sudoku s" Win32Forth\Sudoku\Window" RegistrySet WindowSettings s" Win32Forth\Sudoku\Options" RegistrySet Options s" Win32Forth\Sudoku\Recent Files" RegistrySet RecentFilesList + )) + + s" Software\" ToolBarLayoutKey place Options ProgReg count ToolBarLayoutKey +place : SaveRecentFiles ( -- ) *************** *** 487,493 **** ;M :M On_Init: ( -- ) On_Init: SUPER ! CS_DBLCLKS GCL_STYLE hWnd Call SetClassLong drop 101 appinst Call LoadIcon GCL_HICON hWnd Call SetClassLong drop 0 GCL_HBRBACKGROUND hWnd Call SetClassLong drop --- 502,510 ---- ;M + :M WndClassStyle: ( -- style ) CS_DBLCLKS ;M \ for newer versions of Win32Forth + :M On_Init: ( -- ) On_Init: SUPER ! \ CS_DBLCLKS GCL_STYLE hWnd Call SetClassLong drop \ needed for older versions of Win32Forth 101 appinst Call LoadIcon GCL_HICON hWnd Call SetClassLong drop 0 GCL_HBRBACKGROUND hWnd Call SetClassLong drop *************** *** 505,514 **** hBitmap SelectObject: mdc drop self start: SudokuToolbar ToolbarPopup SetPopupBar: self FlatToolbar? 0= to FlatToolbar? IDM_FLAT DoCommand ToolbarHeight IF ShowToolbar THEN - self start: SudokuStatusBar - StatusBarHeight IF ShowStatusBar THEN ;M --- 522,531 ---- hBitmap SelectObject: mdc drop + self start: SudokuStatusBar + StatusBarHeight IF ShowStatusBar THEN self start: SudokuToolbar ToolbarPopup SetPopupBar: self FlatToolbar? 0= to FlatToolbar? IDM_FLAT DoCommand ToolbarHeight IF ShowToolbar THEN ;M *************** *** 533,536 **** --- 550,554 ---- hBitmap DeleteObject: mdc Close: SudokuToolbar + MenuHandle: ToolbarPopup call DestroyMenu drop Turnkeyed? IF 0 Call PostQuitMessage THEN On_Done: super *************** *** 635,639 **** ;M ! :M Redraw: ( -- ) PrepareDC: self paint: self ;M :M WM_CLOSE ( h m w l -- res ) --- 653,660 ---- ;M ! :M Redraw: ( -- ) ! PrepareDC: self ! 0 ToolbarHeight Width Height StatusBarHeight - SetRect: TempRect ! 0 Temprect InvalidateRect: self ;M :M WM_CLOSE ( h m w l -- res ) *************** *** 742,746 **** width LeftM - RightM - 3 - 9 / height TopM - BottomM - StatusBarHeight - ToolbarHeight - 3 - 9 / min ! to size \ largest size that will fit SetFontSize width LeftM - RightM - size 9 * - 3 - 2 / dup LeftM + to LeftMargin RightM + to RightMargin --- 763,767 ---- width LeftM - RightM - 3 - 9 / height TopM - BottomM - StatusBarHeight - ToolbarHeight - 3 - 9 / min ! 1 max to size \ largest size that will fit SetFontSize width LeftM - RightM - size 9 * - 3 - 2 / dup LeftM + to LeftMargin RightM + to RightMargin *************** *** 1194,1198 **** :NoName ( -- ) initialization-chain do-chain default-application ; is default-hello ! : Su ( -- ) 96 to Resolution \ needs to be adjusted to make print size same as screen size DefaultPrinter --- 1215,1219 ---- :NoName ( -- ) initialization-chain do-chain default-application ; is default-hello ! : Main ( -- ) 96 to Resolution \ needs to be adjusted to make print size same as screen size DefaultPrinter *************** *** 1215,1226 **** Directory count 2dup SetDir: OpenDialog SetDir: SaveDialog NumberRecentFiles SetNumber: RecentFiles ! SudokuAccelerators EnableAccelerators ! Turnkeyed? IF OpenCommandLine MessageLoop bye THEN ; ! [defined] VIMAGE [if] also VIMAGE [then] ! [defined] CONSOLE-DLL? [if] false to CONSOLE-DLL? [then] ! ' Su turnkey Sudoku.exe ! needs SudokuResources ! 1 pause-seconds bye ! --- 1236,1249 ---- Directory count 2dup SetDir: OpenDialog SetDir: SaveDialog NumberRecentFiles SetNumber: RecentFiles ! Turnkeyed? IF SudokuAccelerators EnableAccelerators OpenCommandLine MessageLoop bye THEN ; ! [defined] sysgen [IF] ! [defined] VIMAGE [if] also VIMAGE [then] ! [defined] CONSOLE-DLL? [if] false to CONSOLE-DLL? [then] ! &forthdir count &appdir place \ make turnkey in Win32Forth folder ! ' Main turnkey Sudoku.exe ! Needs SudokuResources ! 1 pause-seconds bye ! [ELSE] Main ! [THEN] |