home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 04 / chkdupe.h < prev    next >
C/C++ Source or Header  |  1992-01-31  |  3KB  |  104 lines

  1. // chkdupe.h RHS 8/4/91
  2.  
  3. #if !defined(CHKDUPE_H)
  4. #define CHKDUPE_H
  5.  
  6. #include<stdlib.h>
  7. #include"stdapp.h"
  8. #include"myscroll.h"
  9. #include"inifile.h"
  10.  
  11. char *ShowDupe =         
  12.         "ShowDupe v1.0 (C) 1992, Richard Hale Shaw    "
  13.         "1st published, PC Magazine 02/25/92";
  14.  
  15.  
  16. char *ShowDupeHelp = 
  17. "Finds and displays all the duplicate files on one or more hard disks.\n\n"
  18.  
  19. "Usage: SHOWDUPE <drive\\dir> [drive\\dir]\n"
  20. "   ex: showdupe c:\\ d:\\\n"
  21. "   ex: showdupe c:\\dos d:\\newdos e:\\olddos\n\n"
  22.  
  23. "You can limit the duplicate file search to specific directories by\n"
  24. "specifying them.\n\n"
  25.  
  26. "Other settings can be controlled via SHOWDUPE.INI\n";
  27.  
  28.  
  29. #define NUMSETTINGS 21              // always adjust this to size of array
  30. #define SCREENMODE  NUMSETTINGS-3   // don't change these
  31. #define VIEWER      NUMSETTINGS-2
  32. #define SEARCHDIRS  NUMSETTINGS-1
  33. #define MAXCOLORS   NUMSETTINGS-3
  34. #define SCROLL_NBG  6
  35. #define SCROLL_NFG  SCROLL_NBG+1
  36. #define SCROLL_CBG  SCROLL_NBG+2
  37. #define SCROLL_CFG  SCROLL_NBG+3
  38. #define SCROLL_SNBG  SCROLL_NBG+4
  39. #define SCROLL_SNFG  SCROLL_NBG+5
  40. #define SCROLL_SCBG  SCROLL_NBG+6
  41. #define SCROLL_SCFG  SCROLL_NBG+7
  42. #define SCROLL_DNBG  SCROLL_NBG+8
  43. #define SCROLL_DNFG  SCROLL_NBG+9
  44. #define SCROLL_DCBG  SCROLL_NBG+10
  45. #define SCROLL_DCFG  SCROLL_NBG+11
  46.  
  47.  
  48. struct _settings
  49.     {
  50.     char    *name;
  51.     char    *value;
  52.     } MySettings[NUMSETTINGS] = 
  53.     {
  54.     {   "DeskTopBackGround",    "LIGHTGRAY"     },
  55.     {   "DeskTopForeGround",    "BLUE"          },
  56.     {   "ScreenBackGround",     "BLUE"          },
  57.     {   "ScreenForeGround",     "WHITE"         },
  58.     {   "WindowBackGround",     "BLUE"          },
  59.     {   "WindowForeGround",     "YELLOW"        },
  60.     {   "ScrollNrmBackGround",  "BLUE"          },
  61.     {   "ScrollNrmForeGround",  "WHITE"         },
  62.     {   "ScrollCurBackGround",  "LIGHTGRAY"     },
  63.     {   "ScrollCurForeGround",  "WHITE"         },
  64.     {   "ScrollSelNrmBackGround","BLUE"         },
  65.     {   "ScrollSelNrmForeGround","YELLOW"       },
  66.     {   "ScrollSelCurBackGround","LIGHTGRAY"    },
  67.     {   "ScrollSelCurForeGround","YELLOW"       },
  68.     {   "ScrollDelNrmBackGround","BLUE"         },
  69.     {   "ScrollDelNrmForeGround","LIGHTGRAY"    },
  70.     {   "ScrollDelCurBackGround","LIGHTGRAY"    },
  71.     {   "ScrollDelCurForeGround","DARKGRAY"     },
  72.     {   "ScreenMode",           "Default"       },  // always 3rd from end
  73.     {   "Viewer",               "SMOOTH.COM"    },  // always next to last
  74.     {   "SearchDirectories",    ""              }   // always last
  75.     };
  76.  
  77. class ChkDupe : public StandardApplication
  78.     {
  79.     int show_stats;
  80.     MyScroller *myScroller;
  81.     BYTE desktop_colors;
  82.     BYTE default_colors;
  83.     IniFile Settings;
  84.     Window *Status;
  85.     Window *pathW;
  86.     BYTE colors[MAXCOLORS];
  87.  
  88.     void terminate(void);
  89.     void terminate(char *msg);
  90.     BOOL FilesExist(void);
  91.     BOOL ScreenMgr(int key);
  92.     void ShowStats(void);
  93.     void ShowDupes(void);
  94.     BOOL FindDuplicates(void);
  95.     void InitApp(void);
  96. public:
  97.     ChkDupe(void);
  98.     ~ChkDupe(void);
  99.     };
  100.  
  101.  
  102. #endif
  103.  
  104.