home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / source / winclass / dlgbase.h next >
C/C++ Source or Header  |  1991-03-18  |  615b  |  25 lines

  1. #if !defined(DLGBASE_H)
  2. #include <windows.h>
  3.  
  4. class Dialog {
  5.     FARPROC lpfnDlgProc;
  6.     HANDLE hinst;
  7.     HWND hwnd;
  8.     LPSTR DlgTemplate;
  9. public:
  10.     Dialog(HANDLE hInstance, LPSTR dlgtemp, HWND winparent) {
  11.         hinst = hInstance;
  12.         DlgTemplate = dlgtemp;
  13.         hwnd = winparent;
  14.     }
  15.     int Show(void) {
  16.         int ret;
  17.         ret = DialogBox(hinst,DlgTemplate,hwnd,lpfnDlgProc);
  18.         return(ret);
  19.     }
  20.     void SetDlgProc(BOOL (FAR PASCAL *proc)(HWND, WORD, WORD, LONG ))
  21.         { lpfnDlgProc = MakeProcInstance((FARPROC)proc,hinst); }
  22. };
  23. #define DLGBASE_H
  24. #endif
  25.