home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame Game Cube 2: Parlor / aztechhalloffamegamecubedisc2-.iso / gnuchess / stats~1.pre < prev    next >
Text File  |  1995-02-20  |  2KB  |  89 lines

  1. #line 1 "STATS.c"
  2. /*    PortTool v2.2     STATS.C          */
  3.  
  4. /*
  5.   C source for GNU CHESS
  6.  
  7.   Revision: 1990-09-30
  8.  
  9.   Modified by Daryl Baker for use in MS WINDOWS environment
  10.  
  11.   This file is part of CHESS.
  12.  
  13.   CHESS is distributed in the hope that it will be useful, but WITHOUT ANY
  14.   WARRANTY.  No author or distributor accepts responsibility to anyone for
  15.   the consequences of using it or for whether it serves any particular
  16.   purpose or works at all, unless he says so in writing.  Refer to the CHESS
  17.   General Public License for full details.
  18.  
  19.   Everyone is granted permission to copy, modify and redistribute CHESS, but
  20.   only under the conditions described in the CHESS General Public License.
  21.   A copy of this license is supposed to have been given to you along with
  22.   CHESS so you can know your rights and responsibilities.  It should be in a
  23.   file named COPYING.  Among other things, the copyright notice and this
  24.  
  25. #define NOATOM 
  26. #define NOCLIPBOARD
  27. #define NOCREATESTRUCT
  28. #define NOFONT
  29. #define NOREGION
  30. #define NOSOUND
  31. #define NOWH
  32. #define NOWINOFFSETS
  33. #define NOCOMM
  34. #define NOKANJI
  35.  
  36. #include <windows.h>
  37. #include "gnuchess.h"
  38. #include "stats.h"
  39.  
  40. HWND hStats = NULL;
  41.  
  42.  
  43. BOOL FAR PASCAL StatDlgProc ( HWND hDlg, UINT message,
  44.                                WPARAM wParam, LPARAM lParam);
  45.  
  46.  
  47. int StatDialog ( HWND hWnd, HANDLE hInst)
  48. {
  49.  
  50.    FARPROC lpProcStat;
  51.  
  52.    lpProcStat = MakeProcInstance(StatDlgProc, hInst);
  53.     hStats = CreateDialog (hInst, MAKEINTRESOURCE(STATS), hWnd, lpProcStat);
  54.    return hStats;
  55. }
  56.  
  57.  
  58. BOOL FAR PASCAL StatDlgProc ( HWND hDlg, UINT message,
  59.                                WPARAM wParam, LPARAM lParam)
  60. {
  61.  
  62.    switch (message) {
  63.    case WM_INITDIALOG:           /* message: initialize dialog box */
  64.      
  65.      SetDlgItemText (hDlg, DEPTHTEXT,    " ");
  66.      SetDlgItemText (hDlg, POSITIONTEXT, " ");
  67.      SetDlgItemText (hDlg, NODETEXT,     " ");
  68.      SetDlgItemText (hDlg, BSTLINETEXT,  " ");
  69.      SetDlgItemText (hDlg, SCORETEXT,    " ");
  70.      SetDlgItemText (hDlg, NODESECTEXT,  " ");
  71.      
  72.      return (TRUE);
  73.      
  74.    case WM_SYSCOMMAND:
  75.      if ( (wParam&0xfff0) == SC_CLOSE ) {
  76.        DestroyWindow (hDlg);
  77.        return TRUE;
  78.      }
  79.      break;
  80.      
  81.    case WM_DESTROY:
  82.      hStats = NULL;
  83.      flag.post = false;
  84.      break;
  85.    }
  86.    
  87.    return (FALSE);                  /* Didn't process a message    */
  88. }
  89.