home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2002 July / VPR0207A.ISO / OLS / UNRAR32007 / unrar32007.lzh / src.lzh / src / dialog.h < prev    next >
C/C++ Source or Header  |  2001-01-11  |  1KB  |  52 lines

  1. /*
  2.  *   Copyright (c) 1998-2001 T. Kamei (kamei@jsdlab.co.jp)
  3.  *
  4.  *   Permission to use, copy, modify, and distribute this software
  5.  * and its documentation for any purpose is hereby granted provided
  6.  * that the above copyright notice and this permission notice appear
  7.  * in all copies of the software and related documentation.
  8.  *
  9.  *                          NO WARRANTY
  10.  *
  11.  *   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY WARRANTIES;
  12.  * WITHOUT EVEN THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
  13.  * FOR A PARTICULAR PURPOSE.
  14.  */
  15.  
  16. #ifndef _dialog_h_
  17. # define _dialog_h_
  18.  
  19. # include "resource.h"
  20.  
  21. struct replace_param
  22. {
  23.   const char *old_name;
  24.   DWORD old_date;
  25.   long old_size;
  26.   const char *new_name;
  27.   DWORD new_date;
  28.   long new_size;
  29. };
  30.  
  31. int replace_dialog (HWND, const replace_param &);
  32.  
  33. class progress_dlg
  34. {
  35.   enum {PROGRESS_MAX = 100};
  36. public:
  37.   HWND hwnd;
  38.   int max_bytes;
  39.   progress_dlg () : hwnd (0), max_bytes (0) {}
  40.   ~progress_dlg () {if (hwnd) DestroyWindow (hwnd);}
  41.   int create (HWND);
  42.   int init (const char *, int);
  43.   int update (int) const;
  44.   friend BOOL CALLBACK progress_dlgproc (HWND, UINT, WPARAM, LPARAM);
  45.   BOOL wndproc (UINT, WPARAM, LPARAM);
  46. };
  47.  
  48. char *askpass_dialog (HWND);
  49. int change_vol_dialog (HWND, char *);
  50.  
  51. #endif
  52.