home *** CD-ROM | disk | FTP | other *** search
- #define __DLGBOX_H
-
- #ifndef __AWNDOBJ_H
- #include "awndobj.h"
- #endif
-
- class dlgboxobj:public abswndobj
- {
- int isdel;
-
- public:
-
- dlgboxobj(int isdelx = 0)
- {
- dlg = 0;
-
- isdel = isdelx;
- }
- ~dlgboxobj()
- {
- if (isdel)
- {
- del();
- }
- }
- void del()
- {
- if (dlg != 0)
- {
- DestroyWindow(dlg);
- }
- dlg = 0;
- }
- void setret(LRESULT r)
- {
- SetWindowLong(dlg, DWL_MSGRESULT, r);
- }
- void end(int r)
- {
- EndDialog(dlg, r);
- }
- HWND getdlg()
- {
- return dlg;
- }
- HWND getwnd()
- {
- return dlg;
- }
-
- HWND dlg;
-
- virtual BOOL onmsg(UINT msg, WPARAM wp, LPARAM lp) = 0;
-
- int go(HWND owner, int dlgid);
- int go(HWND owner, char dlgname[]);
- int create(HWND owner, int dlgid);
- int create(HWND owner, char dlgname[]);
-
- static int dlgtopixelx(int x);
- static int dlgtopixely(int y);
- };
-
-