home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1999 October / VPR9910A.BIN / OLS / unrar32005 / unrar32005.lzh / src / dialog.h < prev    next >
C/C++ Source or Header  |  1998-04-03  |  1KB  |  49 lines

  1. /*
  2.  *   Copyright (c) 1998 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. public:
  36.   HWND hwnd;
  37.   progress_dlg () : hwnd (0) {}
  38.   ~progress_dlg () {if (hwnd) DestroyWindow (hwnd);}
  39.   int create (HWND);
  40.   int init (const char *, int) const;
  41.   int update (int) const;
  42.   friend BOOL CALLBACK progress_dlgproc (HWND, UINT, WPARAM, LPARAM);
  43.   BOOL wndproc (UINT, WPARAM, LPARAM);
  44. };
  45.  
  46. char *askpass_dialog (HWND);
  47.  
  48. #endif
  49.