home *** CD-ROM | disk | FTP | other *** search
- #if !defined(DLGBASE_H)
- #include <windows.h>
-
- class Dialog {
- FARPROC lpfnDlgProc;
- HANDLE hinst;
- HWND hwnd;
- LPSTR DlgTemplate;
- public:
- Dialog(HANDLE hInstance, LPSTR dlgtemp, HWND winparent) {
- hinst = hInstance;
- DlgTemplate = dlgtemp;
- hwnd = winparent;
- }
- int Show(void) {
- int ret;
- ret = DialogBox(hinst,DlgTemplate,hwnd,lpfnDlgProc);
- return(ret);
- }
- void SetDlgProc(BOOL (FAR PASCAL *proc)(HWND, WORD, WORD, LONG ))
- { lpfnDlgProc = MakeProcInstance((FARPROC)proc,hinst); }
- };
- #define DLGBASE_H
- #endif
-