Updated the Remstar ODBC files, got the db sample compiling; added Freq and SubString
to wxString git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,9 @@
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dbtest.h"
|
||||
#endif
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/dbtable.h>
|
||||
@@ -104,7 +106,7 @@ class DatabaseDemoApp: public wxApp
|
||||
{
|
||||
public:
|
||||
Cparameters params;
|
||||
wxFrame *OnInit(void);
|
||||
bool OnInit();
|
||||
}; // DatabaseDemoApp
|
||||
|
||||
DECLARE_APP(DatabaseDemoApp)
|
||||
@@ -117,14 +119,19 @@ class DatabaseDemoFrame: public wxFrame
|
||||
CparameterDlg *pParamDlg;
|
||||
|
||||
public:
|
||||
DatabaseDemoFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
|
||||
DatabaseDemoFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& sz);
|
||||
|
||||
void OnMenuCommand(int id);
|
||||
bool OnClose(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnCreate(wxCommandEvent& event);
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnEditParameters(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
|
||||
void CreateDataTable();
|
||||
void BuildEditorDialog();
|
||||
void BuildParameterDialog(wxWindow *parent);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
}; // DatabaseDemoFrame
|
||||
|
||||
|
||||
@@ -141,13 +148,13 @@ class CeditorDlg : public wxPanel
|
||||
wxButton *pCreateBtn, *pEditBtn, *pDeleteBtn, *pCopyBtn, *pSaveBtn, *pCancelBtn;
|
||||
wxButton *pPrevBtn, *pNextBtn, *pQueryBtn, *pResetBtn, *pDoneBtn, *pHelpBtn;
|
||||
wxButton *pNameListBtn;
|
||||
wxText *pNameTxt, *pAddress1Txt, *pAddress2Txt,*pCityTxt, *pStateTxt, *pCountryTxt,*pPostalCodeTxt;
|
||||
wxMessage *pNameMsg, *pAddress1Msg, *pAddress2Msg,*pCityMsg, *pStateMsg, *pCountryMsg,*pPostalCodeMsg;
|
||||
wxText *pJoinDateTxt,*pContribTxt, *pLinesTxt;
|
||||
wxMessage *pJoinDateMsg,*pContribMsg, *pLinesMsg;
|
||||
wxTextCtrl *pNameTxt, *pAddress1Txt, *pAddress2Txt,*pCityTxt, *pStateTxt, *pCountryTxt,*pPostalCodeTxt;
|
||||
wxStaticText *pNameMsg, *pAddress1Msg, *pAddress2Msg,*pCityMsg, *pStateMsg, *pCountryMsg,*pPostalCodeMsg;
|
||||
wxTextCtrl *pJoinDateTxt,*pContribTxt, *pLinesTxt;
|
||||
wxStaticText *pJoinDateMsg,*pContribMsg, *pLinesMsg;
|
||||
wxRadioBox *pDeveloperRadio;
|
||||
wxChoice *pNativeLangChoice;
|
||||
wxMessage *pNativeLangMsg;
|
||||
wxStaticText *pNativeLangMsg;
|
||||
|
||||
public:
|
||||
enum DialogModes mode;
|
||||
@@ -168,10 +175,51 @@ class CeditorDlg : public wxPanel
|
||||
bool GetRec(char *whereStr);
|
||||
}; // CeditorDlg
|
||||
|
||||
#define EDITOR_DIALOG 199
|
||||
|
||||
// Editor dialog control ids
|
||||
#define EDITOR_DIALOG_FN_GROUP 200
|
||||
#define EDITOR_DIALOG_SEARCH_GROUP 201
|
||||
#define EDITOR_DIALOG_CREATE 202
|
||||
#define EDITOR_DIALOG_EDIT 203
|
||||
#define EDITOR_DIALOG_DELETE 204
|
||||
#define EDITOR_DIALOG_COPY 205
|
||||
#define EDITOR_DIALOG_SAVE 206
|
||||
#define EDITOR_DIALOG_CANCEL 207
|
||||
#define EDITOR_DIALOG_PREV 208
|
||||
#define EDITOR_DIALOG_NEXT 209
|
||||
#define EDITOR_DIALOG_QUERY 211
|
||||
#define EDITOR_DIALOG_RESET 212
|
||||
#define EDITOR_DIALOG_NAME_MSG 213
|
||||
#define EDITOR_DIALOG_NAME_TEXT 214
|
||||
#define EDITOR_DIALOG_LOOKUP 215
|
||||
#define EDITOR_DIALOG_ADDRESS1_MSG 216
|
||||
#define EDITOR_DIALOG_ADDRESS1_TEXT 217
|
||||
#define EDITOR_DIALOG_ADDRESS2_MSG 218
|
||||
#define EDITOR_DIALOG_ADDRESS2_TEXT 219
|
||||
#define EDITOR_DIALOG_CITY_MSG 220
|
||||
#define EDITOR_DIALOG_CITY_TEXT 221
|
||||
#define EDITOR_DIALOG_COUNTRY_MSG 222
|
||||
#define EDITOR_DIALOG_COUNTRY_TEXT 223
|
||||
#define EDITOR_DIALOG_POSTAL_MSG 224
|
||||
#define EDITOR_DIALOG_POSTAL_TEXT 225
|
||||
#define EDITOR_DIALOG_LANG_MSG 226
|
||||
#define EDITOR_DIALOG_LANG_CHOICE 227
|
||||
#define EDITOR_DIALOG_DATE_MSG 228
|
||||
#define EDITOR_DIALOG_DATE_TEXT 229
|
||||
#define EDITOR_DIALOG_CONTRIB_MSG 230
|
||||
#define EDITOR_DIALOG_CONTRIB_TEXT 231
|
||||
#define EDITOR_DIALOG_LINES_MSG 232
|
||||
#define EDITOR_DIALOG_LINES_TEXT 233
|
||||
#define EDITOR_DIALOG_STATE_MSG 234
|
||||
#define EDITOR_DIALOG_STATE_TEXT 235
|
||||
#define EDITOR_DIALOG_DEVELOPER 236
|
||||
#define EDITOR_DIALOG_JOIN_MSG 237
|
||||
#define EDITOR_DIALOG_JOIN_TEXT 238
|
||||
|
||||
// *************************** CparameterDlg ***************************
|
||||
|
||||
class CparameterDlg : public wxDialogBox
|
||||
class CparameterDlg : public wxDialog
|
||||
{
|
||||
private:
|
||||
bool widgetPtrsSet;
|
||||
@@ -180,10 +228,10 @@ class CparameterDlg : public wxDialogBox
|
||||
Cparameters savedParamSettings;
|
||||
|
||||
// Pointers to all widgets on the dialog
|
||||
wxMessage *pParamODBCSourceMsg;
|
||||
wxStaticText *pParamODBCSourceMsg;
|
||||
wxListBox *pParamODBCSourceList;
|
||||
wxMessage *pParamUserNameMsg, *pParamPasswordMsg;
|
||||
wxText *pParamUserNameTxt, *pParamPasswordTxt;
|
||||
wxStaticText *pParamUserNameMsg, *pParamPasswordMsg;
|
||||
wxTextCtrl *pParamUserNameTxt, *pParamPasswordTxt;
|
||||
wxButton *pParamSaveBtn, *pParamCancelBtn;
|
||||
|
||||
public:
|
||||
@@ -199,6 +247,17 @@ class CparameterDlg : public wxDialogBox
|
||||
|
||||
}; // CparameterDlg
|
||||
|
||||
#define PARAMETER_DIALOG 400
|
||||
|
||||
// Parameter dialog control ids
|
||||
#define PARAMETER_DIALOG_SOURCE_MSG 401
|
||||
#define PARAMETER_DIALOG_SOURCE_LISTBOX 402
|
||||
#define PARAMETER_DIALOG_NAME_MSG 403
|
||||
#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
|
||||
|
||||
// *************************** CqueryDlg ***************************
|
||||
|
||||
@@ -230,7 +289,7 @@ char * const langQRY_LIKE = "% matches 0 or more of any char; _ matches
|
||||
char * const langQRY_BETWEEN = "column BETWEEN value AND value";
|
||||
|
||||
|
||||
class CqueryDlg : public wxDialogBox
|
||||
class CqueryDlg : public wxDialog
|
||||
{
|
||||
private:
|
||||
CcolInf *colInf; // Column inf. returned by db->GetColumns()
|
||||
@@ -243,20 +302,20 @@ class CqueryDlg : public wxDialogBox
|
||||
bool widgetPtrsSet;
|
||||
|
||||
// Widget pointers
|
||||
wxMessage *pQueryCol1Msg;
|
||||
wxStaticText *pQueryCol1Msg;
|
||||
wxChoice *pQueryCol1Choice;
|
||||
wxMessage *pQueryNotMsg;
|
||||
wxStaticText *pQueryNotMsg;
|
||||
wxCheckBox *pQueryNotCheck;
|
||||
wxMessage *pQueryOperatorMsg;
|
||||
wxStaticText *pQueryOperatorMsg;
|
||||
wxChoice *pQueryOperatorChoice;
|
||||
wxMessage *pQueryCol2Msg;
|
||||
wxStaticText *pQueryCol2Msg;
|
||||
wxChoice *pQueryCol2Choice;
|
||||
wxMessage *pQueryValue1Msg;
|
||||
wxText *pQueryValue1Txt;
|
||||
wxMessage *pQueryValue2Msg;
|
||||
wxText *pQueryValue2Txt;
|
||||
wxMessage *pQuerySqlWhereMsg;
|
||||
wxMultiText *pQuerySqlWhereMtxt;
|
||||
wxStaticText *pQueryValue1Msg;
|
||||
wxTextCtrl *pQueryValue1Txt;
|
||||
wxStaticText *pQueryValue2Msg;
|
||||
wxTextCtrl *pQueryValue2Txt;
|
||||
wxStaticText *pQuerySqlWhereMsg;
|
||||
wxTextCtrl *pQuerySqlWhereMtxt;
|
||||
wxButton *pQueryAddBtn;
|
||||
wxButton *pQueryAndBtn;
|
||||
wxButton *pQueryOrBtn;
|
||||
@@ -266,10 +325,10 @@ class CqueryDlg : public wxDialogBox
|
||||
wxButton *pQueryClearBtn;
|
||||
wxButton *pQueryCountBtn;
|
||||
wxButton *pQueryHelpBtn;
|
||||
wxGroupBox *pQueryHintGrp;
|
||||
wxMessage *pQueryHintMsg;
|
||||
wxStaticBox *pQueryHintGrp;
|
||||
wxStaticText *pQueryHintMsg;
|
||||
|
||||
wxText *pFocusTxt;
|
||||
wxTextCtrl *pFocusTxt;
|
||||
|
||||
CqueryDlg(wxWindow *parent, wxDB *pDb, char *tblName[], char *pWhereArg);
|
||||
|
||||
@@ -284,3 +343,32 @@ class CqueryDlg : public wxDialogBox
|
||||
bool ValidateWhereClause();
|
||||
|
||||
}; // CqueryDlg
|
||||
|
||||
#define QUERY_DIALOG 300
|
||||
|
||||
// Parameter dialog control ids
|
||||
#define QUERY_DIALOG_COL_MSG 301
|
||||
#define QUERY_DIALOG_COL_CHOICE 302
|
||||
#define QUERY_DIALOG_NOT_MSG 303
|
||||
#define QUERY_DIALOG_NOT_CHECKBOX 304
|
||||
#define QUERY_DIALOG_OP_MSG 305
|
||||
#define QUERY_DIALOG_OP_CHOICE 306
|
||||
#define QUERY_DIALOG_COL2_MSG 307
|
||||
#define QUERY_DIALOG_COL2_CHOICE 308
|
||||
#define QUERY_DIALOG_WHERE_MSG 309
|
||||
#define QUERY_DIALOG_WHERE_TEXT 310
|
||||
#define QUERY_DIALOG_ADD 311
|
||||
#define QUERY_DIALOG_AND 312
|
||||
#define QUERY_DIALOG_OR 313
|
||||
#define QUERY_DIALOG_LPAREN 314
|
||||
#define QUERY_DIALOG_RPAREN 315
|
||||
#define QUERY_DIALOG_DONE 316
|
||||
#define QUERY_DIALOG_CLEAR 317
|
||||
#define QUERY_DIALOG_COUNT 318
|
||||
#define QUERY_DIALOG_VALUE1_MSG 319
|
||||
#define QUERY_DIALOG_VALUE1_TEXT 320
|
||||
#define QUERY_DIALOG_VALUE2_MSG 321
|
||||
#define QUERY_DIALOG_VALUE2_TEXT 322
|
||||
#define QUERY_DIALOG_HINT_GROUP 323
|
||||
#define QUERY_DIALOG_HINT_MSG 324
|
||||
|
||||
|
@@ -103,7 +103,7 @@ Clookup2::Clookup2(char *tblName, char *colName1, char *colName2, wxDB *pDb)
|
||||
|
||||
// This is a generic lookup constructor that will work with any table and any column
|
||||
ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, char *colName,
|
||||
char *where, char *orderBy) : wxDialogBox (parent, "Select...", 1, -1, -1, 400, 290)
|
||||
char *where, char *orderBy) : wxDialog (parent, LOOKUP_DIALOG, "Select...", wxPoint(-1, -1), wxSize(400, 290))
|
||||
{
|
||||
wxBeginBusyCursor();
|
||||
|
||||
@@ -114,19 +114,9 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha
|
||||
noDisplayCols = 1;
|
||||
col1Len = 0;
|
||||
|
||||
// Build the dialog
|
||||
SetLabelPosition(wxVERTICAL);
|
||||
|
||||
wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD);
|
||||
wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL);
|
||||
|
||||
SetButtonFont(ButtonFont);
|
||||
SetLabelFont(TextFont);
|
||||
SetLabelPosition(wxVERTICAL);
|
||||
|
||||
pLookUpSelectList = new wxListBox(this, NULL, "", wxSINGLE|wxALWAYS_SB, 5, 15, 384, 195, 0, 0, 0, "LookUpSelectList");
|
||||
pLookUpOkBtn = new wxButton(this, NULL, "&Ok", 113, 222, 70, 35, 0, "LookUpOkBtn");
|
||||
pLookUpCancelBtn = new wxButton(this, NULL, "C&ancel", 212, 222, 70, 35, 0, "LookUpCancelBtn");
|
||||
pLookUpSelectList = new wxListBox(this, LOOKUP_DIALOG_SELECT, wxPoint(5, 15), wxSize(384, 195), 0, 0, wxLB_SINGLE|wxLB_ALWAYS_SB, wxDefaultValidator, "LookUpSelectList");
|
||||
pLookUpOkBtn = new wxButton(this, LOOKUP_DIALOG_OK, "&Ok", wxPoint(113, 222), wxSize(70, 35), 0, wxDefaultValidator, "LookUpOkBtn");
|
||||
pLookUpCancelBtn = new wxButton(this, LOOKUP_DIALOG_CANCEL, "C&ancel", wxPoint(212, 222), wxSize(70, 35), 0, wxDefaultValidator, "LookUpCancelBtn");
|
||||
|
||||
widgetPtrsSet = TRUE;
|
||||
|
||||
@@ -141,8 +131,8 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha
|
||||
if (!lookup->Open())
|
||||
{
|
||||
wxString tStr;
|
||||
tStr.sprintf("Unable to open the table '%s'.",tableName);
|
||||
wxMessageBox(tStr.GetData(),"ODBC Error...");
|
||||
tStr.Printf("Unable to open the table '%s'.",tableName);
|
||||
wxMessageBox(tStr,"ODBC Error...");
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
@@ -176,7 +166,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha
|
||||
SetTitle(windowTitle);
|
||||
Centre(wxBOTH);
|
||||
wxEndBusyCursor();
|
||||
Show(TRUE);
|
||||
ShowModal();
|
||||
|
||||
} // Generic lookup constructor
|
||||
|
||||
@@ -207,7 +197,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName, cha
|
||||
//
|
||||
ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName,
|
||||
char *dispCol1, char *dispCol2, char *where, char *orderBy, bool distinctValues,
|
||||
char *selectStmt, int maxLenCol1, wxDB *pDb, bool allowOk) : wxDialogBox (parent, "Select...", 1, -1, -1, 400, 290)
|
||||
char *selectStmt, int maxLenCol1, wxDB *pDb, bool allowOk) : wxDialog (parent, LOOKUP_DIALOG, "Select...", wxPoint(-1, -1), wxSize(400, 290))
|
||||
{
|
||||
wxBeginBusyCursor();
|
||||
|
||||
@@ -219,24 +209,16 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName,
|
||||
noDisplayCols = (strlen(dispCol2) ? 2 : 1);
|
||||
col1Len = 0;
|
||||
|
||||
// Build the dialog
|
||||
SetLabelPosition(wxVERTICAL);
|
||||
|
||||
wxFont *ButtonFont = new wxFont(12,wxSWISS,wxNORMAL,wxBOLD);
|
||||
wxFont *TextFont = new wxFont(12,wxSWISS,wxNORMAL,wxNORMAL);
|
||||
wxFont *FixedFont = new wxFont(12,wxMODERN,wxNORMAL,wxNORMAL);
|
||||
|
||||
SetButtonFont(ButtonFont);
|
||||
SetLabelFont(TextFont);
|
||||
SetLabelPosition(wxVERTICAL);
|
||||
wxFont fixedFont(12,wxMODERN,wxNORMAL,wxNORMAL);
|
||||
|
||||
// this is done with fixed font so that the second column (if any) will be left
|
||||
// justified in the second column
|
||||
SetButtonFont(FixedFont);
|
||||
pLookUpSelectList = new wxListBox(this, NULL, "", wxSINGLE|wxALWAYS_SB, 5, 15, 384, 195, 0, 0, 0, "LookUpSelectList");
|
||||
SetButtonFont(ButtonFont);
|
||||
pLookUpOkBtn = new wxButton(this, NULL, "&Ok", 113, 222, 70, 35, 0, "LookUpOkBtn");
|
||||
pLookUpCancelBtn = new wxButton(this, NULL, "C&ancel", 212, 222, 70, 35, 0, "LookUpCancelBtn");
|
||||
pLookUpSelectList = new wxListBox(this, LOOKUP_DIALOG_SELECT, wxPoint(5, 15), wxSize(384, 195), 0, 0, wxLB_SINGLE|wxLB_ALWAYS_SB, wxDefaultValidator, "LookUpSelectList");
|
||||
|
||||
pLookUpSelectList->SetFont(fixedFont);
|
||||
|
||||
pLookUpOkBtn = new wxButton(this, LOOKUP_DIALOG_OK, "&Ok", wxPoint(113, 222), wxSize(70, 35), 0, wxDefaultValidator, "LookUpOkBtn");
|
||||
pLookUpCancelBtn = new wxButton(this, LOOKUP_DIALOG_CANCEL, "C&ancel", wxPoint(212, 222), wxSize(70, 35), 0, wxDefaultValidator, "LookUpCancelBtn");
|
||||
|
||||
widgetPtrsSet = TRUE;
|
||||
|
||||
@@ -251,8 +233,8 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName,
|
||||
if (!lookup2->Open())
|
||||
{
|
||||
wxString tStr;
|
||||
tStr.sprintf("Unable to open the table '%s'.",tableName);
|
||||
wxMessageBox(tStr.GetData(),"ODBC Error...");
|
||||
tStr.Printf("Unable to open the table '%s'.",tableName);
|
||||
wxMessageBox(tStr,"ODBC Error...");
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
@@ -276,7 +258,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName,
|
||||
q += " WHERE ";
|
||||
q += where;
|
||||
}
|
||||
if (!lookup2->QueryBySqlStmt(q.GetData()))
|
||||
if (!lookup2->QueryBySqlStmt((char*) (const char*) q))
|
||||
{
|
||||
wxMessageBox("ODBC error during QueryBySqlStmt()","ODBC Error...");
|
||||
Close();
|
||||
@@ -321,7 +303,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName,
|
||||
s.Append(' ', (maxColLen + LISTDB_NO_SPACES_BETWEEN_COLS - strlen(lookup2->lookupCol1)));
|
||||
s.Append(lookup2->lookupCol2);
|
||||
}
|
||||
pLookUpSelectList->Append(s.GetData());
|
||||
pLookUpSelectList->Append(s);
|
||||
}
|
||||
|
||||
// Highlight the first list item
|
||||
@@ -342,7 +324,7 @@ ClookUpDlg::ClookUpDlg(wxWindow *parent, char *windowTitle, char *tableName,
|
||||
SetTitle(windowTitle);
|
||||
Centre(wxBOTH);
|
||||
wxEndBusyCursor();
|
||||
Show(TRUE);
|
||||
ShowModal();
|
||||
|
||||
} // Generic lookup constructor 2
|
||||
|
||||
@@ -382,12 +364,12 @@ void ClookUpDlg::OnCommand(wxWindow& win, wxCommandEvent& event)
|
||||
// Column 1
|
||||
s = s.SubString(0, col1Len-1);
|
||||
s = s.Strip();
|
||||
strcpy(ListDB_Selection, s.GetData());
|
||||
strcpy(ListDB_Selection, s);
|
||||
// Column 2
|
||||
s = pLookUpSelectList->GetStringSelection();
|
||||
s = s.From(col1Len + LISTDB_NO_SPACES_BETWEEN_COLS);
|
||||
s = s.Mid(col1Len + LISTDB_NO_SPACES_BETWEEN_COLS);
|
||||
s = s.Strip();
|
||||
strcpy(ListDB_Selection2, s.GetData());
|
||||
strcpy(ListDB_Selection2, s);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -9,7 +9,9 @@
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "listdb.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*
|
||||
@@ -54,7 +56,7 @@ class Clookup2 : public wxTable
|
||||
|
||||
}; // Clookup2
|
||||
|
||||
class ClookUpDlg : public wxDialogBox
|
||||
class ClookUpDlg : public wxDialog
|
||||
{
|
||||
private:
|
||||
bool widgetPtrsSet;
|
||||
@@ -120,6 +122,12 @@ class ClookUpDlg : public wxDialogBox
|
||||
void OnActivate(bool) {}; // necessary for hot keys
|
||||
};
|
||||
|
||||
#define LOOKUP_DIALOG 500
|
||||
|
||||
#define LOOKUP_DIALOG_SELECT 501
|
||||
#define LOOKUP_DIALOG_OK 502
|
||||
#define LOOKUP_DIALOG_CANCEL 503
|
||||
|
||||
#endif // LISTDB_DOT_H
|
||||
|
||||
// ************************************ listdb.h *********************************
|
||||
|
@@ -1,53 +1,31 @@
|
||||
#
|
||||
# File: makefile.nt
|
||||
# Author: George Tasker
|
||||
# Created: 1998
|
||||
# Author: Julian Smart
|
||||
# Created: 1993
|
||||
# Updated:
|
||||
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||
#
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile : Builds database example (MS VC++).
|
||||
|
||||
!if "$(FINAL)" == ""
|
||||
FINAL=0
|
||||
!endif
|
||||
|
||||
|
||||
!if "$(MSVCDIR)" == ""
|
||||
MSVCDIR=c:\devstudio\vc
|
||||
!endif
|
||||
# Makefile : Builds db example (MS VC++).
|
||||
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||
# info
|
||||
|
||||
# Set WXDIR for your system
|
||||
WXDIR = $(WXWIN)
|
||||
THISDIR = $(WXDIR)\samples\database
|
||||
WXODBCDIR = $(WXDIR)\utils\wxodbc
|
||||
WXDIR = $(WXWIN)
|
||||
|
||||
!if "$(MSVCDIR)" == ""
|
||||
DBLIBS=$(MSDEVDIR)\lib\odbc32.lib
|
||||
!else
|
||||
DBLIBS=$(MSVCDIR)\lib\odbc32.lib
|
||||
!endif
|
||||
|
||||
EXTRAINC = -I$(WXODBCDIR)\src
|
||||
EXTRALIBS = $(DBLIBS) $(WXODBCDIR)\lib\wxodbc.lib
|
||||
WXUSINGDLL=0
|
||||
|
||||
!include $(WXDIR)\src\ntwxwin.mak
|
||||
|
||||
PROGRAM=database
|
||||
THISDIR = $(WXDIR)\samples\db
|
||||
PROGRAM=dbtest
|
||||
|
||||
OBJECTS = $(PROGRAM).$(OBJSUFF) listdb.$(OBJSUFF)
|
||||
|
||||
all: wxodbc $(PROGRAM).exe
|
||||
OBJECTS = $(PROGRAM).obj listdb.obj
|
||||
|
||||
$(PROGRAM): $(PROGRAM).exe
|
||||
|
||||
gt:
|
||||
cd $(CPPFLAGS)
|
||||
|
||||
wxodbc:
|
||||
cd $(WXODBCDIR)\src
|
||||
nmake -f makefile.nt FINAL=$(FINAL)
|
||||
cd $(THISDIR)
|
||||
all: wx $(PROGRAM).exe
|
||||
|
||||
wx:
|
||||
cd $(WXDIR)\src\msw
|
||||
@@ -58,12 +36,8 @@ wxclean:
|
||||
cd $(WXDIR)\src\msw
|
||||
nmake -f makefile.nt clean
|
||||
cd $(THISDIR)
|
||||
cd $(WXODBCDIR)\src
|
||||
nmake -f makefile.nt clean
|
||||
cd $(THISDIR)
|
||||
|
||||
|
||||
$(PROGRAM).exe: $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
||||
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
||||
$(link) @<<
|
||||
-out:$(PROGRAM).exe
|
||||
$(LINKFLAGS)
|
||||
@@ -72,19 +46,17 @@ $(LIBS)
|
||||
<<
|
||||
|
||||
|
||||
listdb.$(OBJSUFF): $(*B).$(SRCSUFF) $(*B).h
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Fo$(*B).$(OBJSUFF) /Tp $(*B).$(SRCSUFF)
|
||||
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
|
||||
$(PROGRAM).$(OBJSUFF): $(PROGRAM).$(SRCSUFF) $(PROGRAM).h listdb.h
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Fo$(*B).$(OBJSUFF) /Tp $(*B).$(SRCSUFF)
|
||||
listdb.obj: listdb.cpp $(DUMMYOBJ)
|
||||
$(cc) @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
|
||||
$(PROGRAM).res: $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
||||
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
||||
|
||||
|
||||
|
@@ -1,71 +1,17 @@
|
||||
#
|
||||
# File: makefile.unx
|
||||
# Author: Terry Tompkins
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
# Copyright: (c) 1998, Remstar International
|
||||
# Copyright: (c) 1998 Julian Smart
|
||||
#
|
||||
# Makefile for wxDB (UNIX).
|
||||
# "%W% %G%"
|
||||
#
|
||||
# Makefile for dbtest example (UNIX).
|
||||
|
||||
OBJDIR=database
|
||||
OBJSUFF=.o
|
||||
SRCSUFF=.cpp
|
||||
WXDIR = $(WXWIN)
|
||||
PROGRAM=dbtest
|
||||
|
||||
# All common UNIX compiler flags and options are now in
|
||||
# this central makefile.
|
||||
include $(WXDIR)/src/make.env
|
||||
OBJECTS=$(PROGRAM).o listdb.o
|
||||
|
||||
PROGRAM=database
|
||||
|
||||
OBJECTS = $(OBJDIR)/$(PROGRAM).$(OBJSUFF) $(OBJDIR)/table.$(OBJSUFF) $(OBJDIR)/db.$(OBJSUFF) $(OBJDIR)/listdb.$(OBJSUFF)
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
all: $(OBJDIR) $(PROGRAM)$(GUISUFFIX)
|
||||
|
||||
wx:
|
||||
|
||||
|
||||
motif:
|
||||
$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
|
||||
|
||||
xview:
|
||||
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
|
||||
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
|
||||
|
||||
hp:
|
||||
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
|
||||
$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
|
||||
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
|
||||
|
||||
$(OBJDIR):
|
||||
mkdir $(OBJDIR)
|
||||
|
||||
$(PROGRAM)$(GUISUFFIX): $(DUMMYOBJ) $(DBLIBS) $(OBJECTS) $(WXLIB)
|
||||
$(CC) $(LDFLAGS) -o $(PROGRAM)$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
|
||||
|
||||
$(OBJDIR)/$(PROGRAM).$(OBJSUFF): $(PROGRAM).$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ $(PROGRAM).$(SRCSUFF)
|
||||
|
||||
$(OBJDIR)/table.$(OBJSUFF): table.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ table.$(SRCSUFF)
|
||||
|
||||
$(OBJDIR)/db.$(OBJSUFF): db.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ db.$(SRCSUFF)
|
||||
|
||||
$(OBJDIR)/listdb.$(OBJSUFF): listdb.$(SRCSUFF)
|
||||
$(CC) -c $(CPPFLAGS) -o $@ listdb.$(SRCSUFF)
|
||||
|
||||
clean_motif:
|
||||
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
|
||||
|
||||
clean_ol:
|
||||
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
|
||||
|
||||
clean_hp:
|
||||
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
|
||||
|
||||
cleanany:
|
||||
rm -f $(OBJECTS) $(PROGRAM)$(GUISUFFIX) core
|
||||
include ../../src/makeprog.env
|
||||
|
||||
|
Reference in New Issue
Block a user