]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/db/dbtest.h
removed pnghand from MSW sources - obsoleted
[wxWidgets.git] / samples / db / dbtest.h
index 516204e3897aeea72a468c422f208f005f3ac6b6..4d1f7458446ce1bcbc5fe21671669d3ef816c425 100644 (file)
@@ -24,6 +24,10 @@ enum         DialogModes {mView,mCreate,mEdit,mSearch};
 #define EDIT_PARAMETERS                200
 #define ABOUT_DEMO                     300
 
+// this seems to be missing, Robert Roebling (?)
+#ifndef MAX_PATH
+#define MAX_PATH   200
+#endif
 
 // Name of the table to be created/opened
 const char     CONTACT_TABLE_NAME[]            =       "contacts";
@@ -40,11 +44,7 @@ enum Language {langENGLISH, langFRENCH, langGERMAN, langSPANISH, langOTHER};
 class CeditorDlg;
 class CparameterDlg;
 
-#ifdef __WXGTK__
-const char paramFilename[] = "../database.cfg";
-#else
-const char paramFilename[] = "database.cfg";
-#endif
+const char paramFilename[] = "dbtest.cfg";
 
 
 /*
@@ -102,6 +102,7 @@ typedef struct Cparameters
        char    ODBCSource[100+1];
        char    UserName[25+1];
        char    Password[25+1];
+       char    DirPath[MAX_PATH+1];
 } Cparameters;
 
 
@@ -165,7 +166,7 @@ class CeditorDlg : public wxPanel
                Ccontact                                        *Contact;       // this is the table object that will be being manipulated
 
                CeditorDlg(wxWindow *parent);
-               bool    OnClose(void);
+               void    OnCloseWindow(wxCloseEvent& event);
                void    OnButton( wxCommandEvent &event );
                void    OnCommand(wxWindow& win, wxCommandEvent& event);
                void    OnActivate(bool) {};  // necessary for hot keys
@@ -236,14 +237,15 @@ class CparameterDlg : public wxDialog
 
                // Pointers to all widgets on the dialog
                wxStaticText    *pParamODBCSourceMsg;
-               wxListBox       *pParamODBCSourceList;
-               wxStaticText    *pParamUserNameMsg,             *pParamPasswordMsg;
-               wxTextCtrl              *pParamUserNameTxt,             *pParamPasswordTxt;
-               wxButton                *pParamSaveBtn,                 *pParamCancelBtn;
+               wxListBox               *pParamODBCSourceList;
+               wxStaticText    *pParamUserNameMsg,             *pParamPasswordMsg,     *pParamDirPathMsg;
+               wxTextCtrl              *pParamUserNameTxt,             *pParamPasswordTxt,     *pParamDirPathTxt;
+               wxButton                        *pParamSaveBtn,                 *pParamCancelBtn;
 
        public:
                CparameterDlg(wxWindow *parent);
-               bool    OnClose(void);
+               void    OnCloseWindow(wxCloseEvent& event);
+               void    OnButton( wxCommandEvent &event );
                void    OnCommand(wxWindow& win, wxCommandEvent& event);
                void    OnActivate(bool) {};  // necessary for hot keys
 
@@ -252,6 +254,7 @@ class CparameterDlg : public wxDialog
                bool    Save();
                void    FillDataSourceList();
 
+DECLARE_EVENT_TABLE()
 };  // CparameterDlg
 
 #define PARAMETER_DIALOG                    400
@@ -263,8 +266,10 @@ class CparameterDlg : public wxDialog
 #define PARAMETER_DIALOG_NAME_TEXT          404
 #define PARAMETER_DIALOG_PASSWORD_MSG       405
 #define PARAMETER_DIALOG_PASSWORD_TEXT      406
-#define PARAMETER_DIALOG_SAVE               407
-#define PARAMETER_DIALOG_CANCEL             408
+#define PARAMETER_DIALOG_DIRPATH_MSG       407
+#define PARAMETER_DIALOG_DIRPATH_TEXT      408
+#define PARAMETER_DIALOG_SAVE               409
+#define PARAMETER_DIALOG_CANCEL             410
 
 // *************************** CqueryDlg ***************************
 
@@ -341,7 +346,7 @@ class CqueryDlg : public wxDialog
 
                void    OnButton( wxCommandEvent &event );
                void            OnCommand(wxWindow& win, wxCommandEvent& event);
-               bool            OnClose();
+               void        OnCloseWindow(wxCloseEvent& event);
                void            OnActivate(bool) {};  // necessary for hot keys
 
 //             bool            SetWidgetPtrs();