bsp
|
00001 #ifndef _WDIALOG_H_ 00002 #define _WDIALOG_H_ 00003 00004 // dialog 00005 00006 00007 /* 00008 00009 this dialog class cant inherit from Window classes because they work completely differently. 00010 but it has to be possible somehow right? modal dialogs wont return a hwnd, let alone allow 00011 you to process any code while the dialog is up. modeless require IsDialogMessage handling 00012 to be set up in message pump. can WDialog inherit from Windows somehow? Maybe make a new 00013 class containing common members and have both classes inherit from that... 00014 00015 */ 00016 00017 class WDialog 00018 { 00019 public: 00020 WDialog(HWND parent, int dlgId); 00021 virtual ~WDialog(); 00022 static BOOL CALLBACK DialogProcRouter(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 00023 virtual BOOL DialogProc(UINT uMsg, WPARAM wParam, LPARAM lParam) = 0; 00024 00025 HWND hwnd, parent; 00026 int dlgId; 00027 00028 int Execute(); 00029 HWND CreateModeless(); 00030 }; 00031 00032 // 00033 // InputDialog 00034 // 00035 class InputDialog : public WDialog 00036 { 00037 public: 00038 InputDialog(HWND parent,char *title,char*prompt,char*buffer,int bufsize); 00039 BOOL DialogProc(UINT msg, WPARAM wParam, LPARAM lParam); 00040 00041 char *title, *prompt, *buffer; 00042 int bufsize; 00043 }; 00044 00045 #endif //_WDIALOG_H_ 00046