summaryrefslogtreecommitdiff
path: root/examples/windoze
diff options
context:
space:
mode:
Diffstat (limited to 'examples/windoze')
-rw-r--r--examples/windoze/Makefile14
-rw-r--r--examples/windoze/bcowl25/multimod/applsdi.icobin0 -> 766 bytes
-rw-r--r--examples/windoze/bcowl25/multimod/bookcb.cpp39
-rw-r--r--examples/windoze/bcowl25/multimod/bookcb.h34
-rw-r--r--examples/windoze/bcowl25/multimod/serchdlg.cpp104
-rw-r--r--examples/windoze/bcowl25/multimod/serchdlg.h55
-rw-r--r--examples/windoze/bcowl25/multimod/sword.idebin0 -> 68924 bytes
-rw-r--r--examples/windoze/bcowl25/multimod/swordapp.cpp135
-rw-r--r--examples/windoze/bcowl25/multimod/swordapp.def19
-rw-r--r--examples/windoze/bcowl25/multimod/swordapp.h59
-rw-r--r--examples/windoze/bcowl25/multimod/swordapp.rc369
-rw-r--r--examples/windoze/bcowl25/multimod/swordapp.rh196
-rw-r--r--examples/windoze/bcowl25/multimod/swrdabtd.cpp175
-rw-r--r--examples/windoze/bcowl25/multimod/swrdabtd.h60
-rw-r--r--examples/windoze/bcowl25/multimod/swrtdlgc.cpp213
-rw-r--r--examples/windoze/bcowl25/multimod/swrtdlgc.h71
-rw-r--r--examples/windoze/bcowl25/multimod/tversedt.cpp110
-rw-r--r--examples/windoze/bcowl25/multimod/tversedt.h50
-rw-r--r--examples/windoze/delphi20/multimo1/LogoMain.dfmbin0 -> 3868 bytes
-rw-r--r--examples/windoze/delphi20/multimo1/LogoMain.pas213
-rw-r--r--examples/windoze/delphi20/multimo1/Multimod.icobin0 -> 766 bytes
-rw-r--r--examples/windoze/delphi20/multimo1/about.dfmbin0 -> 851 bytes
-rw-r--r--examples/windoze/delphi20/multimo1/about.pas31
-rw-r--r--examples/windoze/delphi20/multimo1/multimod.dpr15
-rw-r--r--examples/windoze/delphi20/multimo2/LogoMain.dfmbin0 -> 4408 bytes
-rw-r--r--examples/windoze/delphi20/multimo2/LogoMain.pas151
-rw-r--r--examples/windoze/delphi20/multimo2/Multimod.icobin0 -> 766 bytes
-rw-r--r--examples/windoze/delphi20/multimo2/about.dfmbin0 -> 851 bytes
-rw-r--r--examples/windoze/delphi20/multimo2/about.pas31
-rw-r--r--examples/windoze/delphi20/multimo2/multimod.dpr15
-rw-r--r--examples/windoze/delphi20/multimo3/LogoMain.dfmbin0 -> 4884 bytes
-rw-r--r--examples/windoze/delphi20/multimo3/LogoMain.pas166
-rw-r--r--examples/windoze/delphi20/multimo3/about.dfmbin0 -> 1811 bytes
-rw-r--r--examples/windoze/delphi20/multimo3/about.pas31
-rw-r--r--examples/windoze/delphi20/multimo3/multimod.dpr18
-rw-r--r--examples/windoze/delphi20/multimo3/searchdlg.dfmbin0 -> 575 bytes
-rw-r--r--examples/windoze/delphi20/multimo3/searchdlg.pas35
-rw-r--r--examples/windoze/delphi20/multimo4/LogoMain.dfmbin0 -> 5659 bytes
-rw-r--r--examples/windoze/delphi20/multimo4/LogoMain.pas171
-rw-r--r--examples/windoze/delphi20/multimo4/Multimod.dpr17
-rw-r--r--examples/windoze/delphi20/multimo4/Searchdlg.dfmbin0 -> 682 bytes
-rw-r--r--examples/windoze/delphi20/multimo4/Searchdlg.pas60
-rw-r--r--examples/windoze/delphi20/multimo4/about.dfmbin0 -> 1811 bytes
-rw-r--r--examples/windoze/delphi20/multimo4/about.pas31
-rw-r--r--examples/windoze/delphi20/svertf/LogoMain.dfmbin0 -> 6567 bytes
-rw-r--r--examples/windoze/delphi20/svertf/LogoMain.pas170
-rw-r--r--examples/windoze/delphi20/svertf/Multimod.dpr17
-rw-r--r--examples/windoze/delphi20/svertf/Searchdlg.dfmbin0 -> 651 bytes
-rw-r--r--examples/windoze/delphi20/svertf/Searchdlg.pas59
-rw-r--r--examples/windoze/delphi20/svertf/about.dfmbin0 -> 1811 bytes
-rw-r--r--examples/windoze/delphi20/svertf/about.pas31
51 files changed, 2965 insertions, 0 deletions
diff --git a/examples/windoze/Makefile b/examples/windoze/Makefile
new file mode 100644
index 0000000..4147d02
--- /dev/null
+++ b/examples/windoze/Makefile
@@ -0,0 +1,14 @@
+
+root := ../..
+subdirs :=
+pre-targets :=
+include ${root}/Makefile.cfg
+
+
+s = $(c) $(cpp)
+d = $(c:%.c=%.d) $(cpp:%.cpp=%.d)
+o = $(c:%.c=%.o) $(cpp:%.cpp=%.o)
+
+ifneq ($(nodeps),yes)
+-include $(d)
+endif
diff --git a/examples/windoze/bcowl25/multimod/applsdi.ico b/examples/windoze/bcowl25/multimod/applsdi.ico
new file mode 100644
index 0000000..95a9986
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/applsdi.ico
Binary files differ
diff --git a/examples/windoze/bcowl25/multimod/bookcb.cpp b/examples/windoze/bcowl25/multimod/bookcb.cpp
new file mode 100644
index 0000000..837b2b9
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/bookcb.cpp
@@ -0,0 +1,39 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.apx Application
+ FILE: bookcb.cpp
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Source file for implementation of BookCB (TComboBox).
+*/
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include "bookcb.h"
+
+
+//{{BookCB Implementation}}
+
+
+BookCB::BookCB (TWindow* parent, int id, int x, int y, int w, int h, uint32 style, uint textLen, TModule* module):
+ TComboBox(parent, id, x, y, w, h, style, textLen, module)
+{
+ // INSERT>> Your constructor code here.
+
+}
+
+
+BookCB::~BookCB ()
+{
+ Destroy();
+
+ // INSERT>> Your destructor code here.
+
+}
+
diff --git a/examples/windoze/bcowl25/multimod/bookcb.h b/examples/windoze/bcowl25/multimod/bookcb.h
new file mode 100644
index 0000000..ce770fd
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/bookcb.h
@@ -0,0 +1,34 @@
+#if !defined(__bookcb_h) // Sentry, use file only if it's not already included.
+#define __bookcb_h
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.apx Application
+ FILE: bookcb.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Class definition for BookCB (TComboBox).
+*/
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+
+#include "swordapp.rh" // Definition of all resources.
+
+
+//{{TComboBox = BookCB}}
+class BookCB : public TComboBox {
+public:
+ BookCB (TWindow* parent, int id, int x, int y, int w, int h, uint32 style, uint textLen, TModule* module = 0);
+ virtual ~BookCB ();
+}; //{{BookCB}}
+
+
+#endif // __bookcb_h sentry.
+
diff --git a/examples/windoze/bcowl25/multimod/serchdlg.cpp b/examples/windoze/bcowl25/multimod/serchdlg.cpp
new file mode 100644
index 0000000..c58b12c
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/serchdlg.cpp
@@ -0,0 +1,104 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.apx Application
+ FILE: serchdlg.cpp
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Source file for implementation of SearchDlg (TDialog).
+*/
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include "serchdlg.h"
+#include <swdisp.h>
+#include <versekey.h>
+#include <swmodule.h>
+#include <listkey.h>
+
+extern SWDisplay *edit1disp;
+extern SWDisplay *edit2disp;
+extern SWDisplay *edit3disp;
+extern VerseKey *masterkey;
+extern SWModule *webster;
+extern SWModule *mhc;
+extern SWModule *eastons;
+extern SWModule *vines;
+
+ListKey searchlist;
+
+//
+// Build a response table for all messages/commands handled
+// by the application.
+//
+DEFINE_RESPONSE_TABLE1(SearchDlg, TDialog)
+//{{SearchDlgRSP_TBL_BEGIN}}
+ EV_BN_CLICKED(IDC_FIND, FindClicked),
+ EV_LBN_DBLCLK(IDC_LISTBOX1, searchlbox_Dblclk),
+//{{SearchDlgRSP_TBL_END}}
+END_RESPONSE_TABLE;
+
+
+//{{SearchDlg Implementation}}
+
+
+static SearchDlgXfer SearchDlgData;
+
+SearchDlg::SearchDlg (TWindow* parent, TResId resId, TModule* module):
+ TDialog(parent, resId, module)
+{
+//{{SearchDlgXFER_USE}}
+ searchlbox = new TListBox(this, IDC_LISTBOX1);
+
+ SetTransferBuffer(&SearchDlgData);
+//{{SearchDlgXFER_USE_END}}
+
+ // INSERT>> Your constructor code here.
+
+}
+
+
+SearchDlg::~SearchDlg ()
+{
+ Destroy();
+
+ // INSERT>> Your destructor code here.
+
+}
+
+
+void SearchDlg::FindClicked ()
+{
+ char buf[80];
+ int loop;
+
+ SetCaption("Search for Text (Searching...)");
+ GetDlgItemText(IDC_FINDTEXT, buf, 79);
+ searchlbox->ClearList();
+ if (*buf) {
+ for (searchlist = webster->Search(buf); !searchlist.Error(); searchlist++)
+ searchlbox->AddString((char *)searchlist);
+ }
+ SetCaption("Search for Text");
+}
+
+
+void SearchDlg::searchlbox_Dblclk ()
+{
+ char buf[80];
+
+ searchlbox->GetString(buf, searchlbox->GetCaretIndex());
+
+ masterkey->AutoNormalize(0);
+ *masterkey = buf;
+
+ webster->Display();
+ mhc->Display();
+ masterkey->AutoNormalize(0);
+}
+
diff --git a/examples/windoze/bcowl25/multimod/serchdlg.h b/examples/windoze/bcowl25/multimod/serchdlg.h
new file mode 100644
index 0000000..dfb2ad7
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/serchdlg.h
@@ -0,0 +1,55 @@
+#if !defined(__serchdlg_h) // Sentry, use file only if it's not already included.
+#define __serchdlg_h
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.apx Application
+ FILE: serchdlg.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Class definition for SearchDlg (TDialog).
+*/
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include <owl\listbox.h>
+
+#include "swordapp.rh" // Definition of all resources.
+
+
+//{{TDialog = SearchDlg}}
+struct SearchDlgXfer {
+//{{SearchDlgXFER_DATA}}
+ TListBoxData searchlbox;
+//{{SearchDlgXFER_DATA_END}}
+};
+
+
+class SearchDlg : public TDialog {
+public:
+ SearchDlg (TWindow* parent, TResId resId = DIALOG_1, TModule* module = 0);
+ virtual ~SearchDlg ();
+
+//{{SearchDlgRSP_TBL_BEGIN}}
+protected:
+ void FindClicked ();
+ void searchlbox_Dblclk ();
+//{{SearchDlgRSP_TBL_END}}
+DECLARE_RESPONSE_TABLE(SearchDlg);
+
+//{{SearchDlgXFER_DEF}}
+protected:
+ TListBox *searchlbox;
+
+//{{SearchDlgXFER_DEF_END}}
+}; //{{SearchDlg}}
+
+
+#endif // __serchdlg_h sentry.
+
diff --git a/examples/windoze/bcowl25/multimod/sword.ide b/examples/windoze/bcowl25/multimod/sword.ide
new file mode 100644
index 0000000..2072c49
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/sword.ide
Binary files differ
diff --git a/examples/windoze/bcowl25/multimod/swordapp.cpp b/examples/windoze/bcowl25/multimod/swordapp.cpp
new file mode 100644
index 0000000..4175f84
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swordapp.cpp
@@ -0,0 +1,135 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swordapp.cpp
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Source file for implementation of swordApp (TApplication).
+*/
+
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+
+#include "swordapp.h"
+#include "swrtdlgc.h" // Definition of client class.
+#include "swrdabtd.h" // Definition of about dialog.
+#include "serchdlg.h"
+
+//{{swordApp Implementation}}
+
+
+//
+// Build a response table for all messages/commands handled
+// by the application.
+//
+DEFINE_RESPONSE_TABLE1(swordApp, TApplication)
+//{{swordAppRSP_TBL_BEGIN}}
+ EV_COMMAND(CM_HELPABOUT, CmHelpAbout),
+//{{swordAppRSP_TBL_END}}
+END_RESPONSE_TABLE;
+
+
+//////////////////////////////////////////////////////////
+// swordApp
+// =====
+//
+swordApp::swordApp () : TApplication("sword")
+{
+
+ // INSERT>> Your constructor code here.
+}
+
+
+swordApp::~swordApp ()
+{
+ // INSERT>> Your destructor code here.
+}
+
+
+//////////////////////////////////////////////////////////
+// swordApp
+// =====
+// Application intialization.
+//
+void swordApp::InitMainWindow ()
+{
+ if (nCmdShow != SW_HIDE)
+ nCmdShow = (nCmdShow != SW_SHOWMINNOACTIVE) ? SW_SHOWNORMAL : nCmdShow;
+
+ SDIDecFrame *frame = new SDIDecFrame(0, GetName(), 0, false);
+ frame->SetFlag(wfShrinkToClient);
+
+ //
+ // Assign ICON w/ this application.
+ //
+ frame->SetIcon(this, IDI_SDIAPPLICATION);
+
+ //
+ // Menu associated with window and accelerator table associated with table.
+ //
+ frame->AssignMenu(SDI_MENU);
+
+ //
+ // Associate with the accelerator table.
+ //
+ frame->Attr.AccelTable = SDI_MENU;
+
+
+ SetMainWindow(frame);
+
+ frame->SetMenuDescr(TMenuDescr(SDI_MENU));
+}
+
+
+//{{SDIDecFrame Implementation}}
+
+
+SDIDecFrame::SDIDecFrame (TWindow *parent, const char far *title, TWindow *clientWnd, bool trackMenuSelection, TModule *module)
+ : TDecoratedFrame(parent, title, clientWnd == 0 ? new swordTDLGClient(0) : clientWnd, trackMenuSelection, module)
+{
+}
+
+
+SDIDecFrame::~SDIDecFrame ()
+{
+ // INSERT>> Your destructor code here.
+
+}
+
+
+//////////////////////////////////////////////////////////
+// swordApp
+// ===========
+// Menu Help About sword.exe command
+void swordApp::CmHelpAbout ()
+{
+ //
+ // Show the modal dialog.
+ //
+ swordAboutDlg(MainWindow).Execute();
+}
+int OwlMain (int , char* [])
+{
+ try {
+ swordApp app;
+ return app.Run();
+ }
+ catch (xmsg& x) {
+ ::MessageBox(0, x.why().c_str(), "Exception", MB_OK);
+ }
+
+ return -1;
+}
+
+void swordApp::SearchText ()
+{
+ SearchDlg(MainWindow).Execute();
+}
+
diff --git a/examples/windoze/bcowl25/multimod/swordapp.def b/examples/windoze/bcowl25/multimod/swordapp.def
new file mode 100644
index 0000000..6fead0f
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swordapp.def
@@ -0,0 +1,19 @@
+;------------------------------------------------
+; Project sword
+;
+; GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+;
+; SUBSYSTEM: sword.exe Module Defintion File
+; FILE: swordapp.def
+; AUTHOR: The Sword Project Team
+;
+;------------------------------------------------
+
+NAME sword
+
+DESCRIPTION 'sword Application - GNU Copyleft GPL © 1995. Almost No Rights Reserved.'
+EXETYPE WINDOWS
+CODE PRELOAD MOVEABLE DISCARDABLE
+DATA PRELOAD MOVEABLE
+HEAPSIZE 4096
+STACKSIZE 8192
diff --git a/examples/windoze/bcowl25/multimod/swordapp.h b/examples/windoze/bcowl25/multimod/swordapp.h
new file mode 100644
index 0000000..776d025
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swordapp.h
@@ -0,0 +1,59 @@
+#if !defined(__swordapp_h) // Sentry, use file only if it's not already included.
+#define __swordapp_h
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swordapp.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Class definition for swordApp (TApplication).
+*/
+
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+
+#include "swordapp.rh" // Definition of all resources.
+
+
+//
+// FrameWindow must be derived to override Paint for Preview and Print.
+//
+//{{TDecoratedFrame = SDIDecFrame}}
+class SDIDecFrame : public TDecoratedFrame {
+public:
+ SDIDecFrame (TWindow *parent, const char far *title, TWindow *clientWnd, bool trackMenuSelection = false, TModule *module = 0);
+ ~SDIDecFrame ();
+}; //{{SDIDecFrame}}
+
+
+//{{TApplication = swordApp}}
+class swordApp : public TApplication {
+private:
+
+public:
+ swordApp ();
+ virtual ~swordApp ();
+
+//{{swordAppVIRTUAL_BEGIN}}
+public:
+ virtual void InitMainWindow();
+//{{swordAppVIRTUAL_END}}
+
+//{{swordAppRSP_TBL_BEGIN}}
+protected:
+ void CmHelpAbout ();
+ void SearchText ();
+//{{swordAppRSP_TBL_END}}
+DECLARE_RESPONSE_TABLE(swordApp);
+}; //{{swordApp}}
+
+
+#endif // __swordapp_h sentry.
diff --git a/examples/windoze/bcowl25/multimod/swordapp.rc b/examples/windoze/bcowl25/multimod/swordapp.rc
new file mode 100644
index 0000000..4f3492a
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swordapp.rc
@@ -0,0 +1,369 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swordapp.rc
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ All resources defined here.
+*/
+
+#if !defined(WORKSHOP_INVOKED)
+#include <windows.h>
+#endif
+#include "swordapp.rh"
+
+SDI_MENU MENU
+{
+ POPUP "&File"
+ {
+ MENUITEM "E&xit\tAlt+F4", CM_EXIT
+ }
+
+ MENUITEM SEPARATOR
+ POPUP "&Search"
+ {
+ MENUITEM "&New Search Window", CM_EDITFIND, INACTIVE
+ }
+
+ MENUITEM SEPARATOR
+ MENUITEM SEPARATOR
+ MENUITEM SEPARATOR
+ MENUITEM SEPARATOR
+ POPUP "&Help"
+ {
+ MENUITEM "&About...", CM_HELPABOUT
+ }
+
+}
+
+
+// Accelerator table for short-cut to menu commands. (include\owl\editfile.rc)
+SDI_MENU ACCELERATORS
+BEGIN
+ VK_DELETE, CM_EDITDELETE, VIRTKEY
+ VK_DELETE, CM_EDITCUT, VIRTKEY, SHIFT
+ VK_INSERT, CM_EDITCOPY, VIRTKEY, CONTROL
+ VK_INSERT, CM_EDITPASTE, VIRTKEY, SHIFT
+ VK_DELETE, CM_EDITCLEAR, VIRTKEY, CONTROL
+ VK_BACK, CM_EDITUNDO, VIRTKEY, ALT
+ VK_F3, CM_EDITFINDNEXT, VIRTKEY
+END
+
+
+//
+// Table of help hints displayed in the status bar.
+//
+STRINGTABLE
+BEGIN
+ -1, "File/document operations"
+ CM_FILENEW, "Creates a new window"
+ CM_FILEOPEN, "Opens a window"
+ CM_FILECLOSE, "Close this document"
+ CM_FILESAVE, "Saves this document"
+ CM_FILESAVEAS, "Saves this document with a new name"
+ CM_EXIT, "Quits swordApp and prompts to save the documents"
+ CM_EDITUNDO-1, "Edit operations"
+ CM_EDITUNDO, "Reverses the last operation"
+ CM_EDITCUT, "Cuts the selection and puts it on the Clipboard"
+ CM_EDITCOPY, "Copies the selection and puts it on the Clipboard"
+ CM_EDITPASTE, "Inserts the clipboard contents at the insertion point"
+ CM_EDITDELETE, "Deletes the selection"
+ CM_EDITCLEAR, "Clear the document"
+ CM_EDITADD, "Insert a new line"
+ CM_EDITEDIT, "Edit the current line"
+ CM_EDITFIND-1, "Search/replace operations"
+ CM_EDITFIND, "Finds the specified text"
+ CM_EDITREPLACE, "Finds the specified text and changes it"
+ CM_EDITFINDNEXT, "Finds the next match"
+ CM_HELPABOUT-1, "Access About"
+ CM_HELPABOUT, "About the sword application"
+END
+
+
+//
+// OWL string table
+//
+
+// EditFile (include\owl\editfile.rc and include\owl\editsear.rc)
+STRINGTABLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+ IDS_CANNOTFIND, "Cannot find ""%s""."
+ IDS_UNTITLED, "Document"
+ IDS_UNABLEREAD, "Unable to read file %s from disk."
+ IDS_UNABLEWRITE, "Unable to write file %s to disk."
+ IDS_FILECHANGED, "The text in the %s file has changed.\n\nDo you want to save the changes?"
+ IDS_FILEFILTER, "Text files (*.TXT)|*.TXT|AllFiles (*.*)|*.*|"
+END
+
+
+// Exception string resources (include\owl\except.rc)
+STRINGTABLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+ IDS_OWLEXCEPTION, "ObjectWindows Exception"
+ IDS_UNHANDLEDXMSG, "Unhandled Exception"
+ IDS_OKTORESUME, "OK to resume?"
+ IDS_UNKNOWNEXCEPTION, "Unknown exception"
+
+ IDS_UNKNOWNERROR, "Unknown error"
+ IDS_NOAPP, "No application object"
+ IDS_OUTOFMEMORY, "Out of memory"
+ IDS_INVALIDMODULE, "Invalid module specified for window"
+ IDS_INVALIDMAINWINDOW, "Invalid MainWindow"
+ IDS_VBXLIBRARYFAIL, "VBX Library init failure"
+
+ IDS_INVALIDWINDOW, "Invalid window %s"
+ IDS_INVALIDCHILDWINDOW, "Invalid child window %s"
+ IDS_INVALIDCLIENTWINDOW, "Invalid client window %s"
+
+ IDS_CLASSREGISTERFAIL, "Class registration fail for window %s"
+ IDS_CHILDREGISTERFAIL, "Child class registration fail for window %s"
+ IDS_WINDOWCREATEFAIL, "Create fail for window %s"
+ IDS_WINDOWEXECUTEFAIL, "Execute fail for window %s"
+ IDS_CHILDCREATEFAIL, "Child create fail for window %s"
+
+ IDS_MENUFAILURE, "Menu creation failure"
+ IDS_VALIDATORSYNTAX, "Validator syntax error"
+ IDS_PRINTERERROR, "Printer error"
+
+ IDS_LAYOUTINCOMPLETE, "Incomplete layout constraints specified in window %s"
+ IDS_LAYOUTBADRELWIN, "Invalid relative window specified in layout constraint in window %s"
+
+ IDS_GDIFAILURE, "GDI failure"
+ IDS_GDIALLOCFAIL, "GDI allocate failure"
+ IDS_GDICREATEFAIL, "GDI creation failure"
+ IDS_GDIRESLOADFAIL, "GDI resource load failure"
+ IDS_GDIFILEREADFAIL, "GDI file read failure"
+ IDS_GDIDELETEFAIL, "GDI object %X delete failure"
+ IDS_GDIDESTROYFAIL, "GDI object %X destroy failure"
+ IDS_INVALIDDIBHANDLE, "Invalid DIB handle %X"
+END
+
+
+// General Window's status bar messages. (include\owl\statusba.rc)
+STRINGTABLE
+BEGIN
+ IDS_MODES "EXT|CAPS|NUM|SCRL|OVR|REC"
+ IDS_MODESOFF " | | | | | "
+ SC_SIZE, "Changes the size of the window"
+ SC_MOVE, "Moves the window to another position"
+ SC_MINIMIZE, "Reduces the window to an icon"
+ SC_MAXIMIZE, "Enlarges the window to it maximum size"
+ SC_RESTORE, "Restores the window to its previous size"
+ SC_CLOSE, "Closes the window"
+ SC_TASKLIST, "Opens task list"
+ SC_NEXTWINDOW, "Switches to next window"
+END
+
+
+// Validator messages (include\owl\validate.rc)
+STRINGTABLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+ IDS_VALPXPCONFORM "Input does not conform to picture:\n""%s"""
+ IDS_VALINVALIDCHAR "Invalid character in input"
+ IDS_VALNOTINRANGE "Value is not in the range %ld to %ld."
+ IDS_VALNOTINLIST "Input is not in valid-list"
+END
+
+
+//
+// Misc application definitions
+//
+
+// Application ICON
+IDI_SDIAPPLICATION ICON "applsdi.ico"
+
+
+// Client Dialog
+IDD_CLIENT DIALOG 6, 32, 328, 275
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Dialog Client"
+FONT 8, "MS Sans Serif"
+{
+ COMBOBOX IDC_BOOK, 9, 13, 77, 140, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_CHAPTER, 90, 13, 16, 12
+ EDITTEXT IDC_VERSE, 112, 13, 16, 12
+ DEFPUSHBUTTON "&Lookup ->", IDC_LOOKUP, 130, 12, 40, 14
+ PUSHBUTTON "^", IDC_UPBUTTON, 163, 44, 6, 10
+ PUSHBUTTON "v", IDC_DOWNBUTTON, 163, 164, 6, 10
+ EDITTEXT IDC_VTEXT, 3, 44, 160, 130, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_CTEXT, 169, 44, 157, 130, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_DTEXT, 3, 188, 324, 84, ES_MULTILINE | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_KTEXT, 179, 13, 107, 12, ES_READONLY | WS_BORDER | WS_TABSTOP
+ LTEXT "AV with Webster's Updates", -1, 7, 35, 93, 8
+ LTEXT "Matthew Henry's Commentary", -1, 173, 35, 127, 8
+ LTEXT ":", -1, 108, 14, 1, 8
+ CTEXT "Easton's Bible Dictionary", IDC_LDNAME, 111, 178, 106, 8
+ LTEXT "Key:", -1, 5, 178, 18, 8
+ LTEXT "", IDC_LDKEY, 24, 178, 60, 8
+}
+
+
+// About box.
+IDD_ABOUT DIALOG 12, 17, 204, 65
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About sword"
+FONT 8, "MS Sans Serif"
+{
+ CTEXT "Version", IDC_VERSION, 2, 14, 200, 8, SS_NOPREFIX
+ CTEXT "The Sword Project", -1, 2, 4, 200, 8, SS_NOPREFIX
+ CTEXT "", IDC_COPYRIGHT, 2, 27, 200, 17, SS_NOPREFIX
+ RTEXT "", IDC_DEBUG, 136, 55, 66, 8, SS_NOPREFIX
+ ICON IDI_SDIAPPLICATION, -1, 2, 2, 18, 20
+ DEFPUSHBUTTON "OK", IDOK, 82, 48, 40, 14
+}
+
+
+// TInputDialog class dialog box.
+IDD_INPUTDIALOG DIALOG 20, 24, 180, 64
+STYLE WS_POPUP | WS_CAPTION | DS_SETFONT
+FONT 8, "Helv"
+BEGIN
+ LTEXT "", ID_PROMPT, 10, 8, 160, 10, SS_NOPREFIX
+ CONTROL "", ID_INPUT, "EDIT", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL, 10, 20, 160, 12
+ DEFPUSHBUTTON "&OK", IDOK, 47, 42, 40, 14
+ PUSHBUTTON "&Cancel", IDCANCEL, 93, 42, 40, 14
+END
+
+
+// Horizontal slider thumb bitmap for TSlider and VSlider (include\owl\slider.rc)
+IDB_HSLIDERTHUMB BITMAP PRELOAD MOVEABLE DISCARDABLE
+BEGIN
+ '42 4D 66 01 00 00 00 00 00 00 76 00 00 00 28 00'
+ '00 00 12 00 00 00 14 00 00 00 01 00 04 00 00 00'
+ '00 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 10 00 00 00 00 00 00 00 00 00 C0 00 00 C0'
+ '00 00 00 C0 C0 00 C0 00 00 00 C0 00 C0 00 C0 C0'
+ '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
+ '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
+ '00 00 FF FF FF 00 BB BB 0B BB BB BB B0 BB BB 00'
+ '00 00 BB B0 80 BB BB BB 08 0B BB 00 00 00 BB 08'
+ 'F8 0B BB B0 87 70 BB 00 00 00 B0 8F F8 80 BB 08'
+ '77 77 0B 00 00 00 08 F8 88 88 00 88 88 87 70 00'
+ '00 00 0F F7 77 88 00 88 77 77 70 00 00 00 0F F8'
+ '88 88 00 88 88 87 70 00 00 00 0F F7 77 88 00 88'
+ '77 77 70 00 00 00 0F F8 88 88 00 88 88 87 70 00'
+ '00 00 0F F7 77 88 00 88 77 77 70 00 00 00 0F F8'
+ '88 88 00 88 88 87 70 00 00 00 0F F7 77 88 00 88'
+ '77 77 70 00 00 00 0F F8 88 88 00 88 88 87 70 00'
+ '00 00 0F F7 77 88 00 88 77 77 70 00 00 00 0F F8'
+ '88 88 00 88 88 87 70 00 00 00 0F F7 77 88 00 88'
+ '77 77 70 00 00 00 0F F8 88 88 00 88 88 87 70 00'
+ '00 00 0F F7 77 78 00 88 77 77 70 00 00 00 0F FF'
+ 'FF FF 00 88 88 88 80 00 00 00 B0 00 00 00 BB 00'
+ '00 00 0B 00 00 00'
+END
+
+
+// Vertical slider thumb bitmap for TSlider and HSlider (include\owl\slider.rc)
+IDB_VSLIDERTHUMB BITMAP PRELOAD MOVEABLE DISCARDABLE
+BEGIN
+ '42 4D 2A 01 00 00 00 00 00 00 76 00 00 00 28 00'
+ '00 00 28 00 00 00 09 00 00 00 01 00 04 00 00 00'
+ '00 00 B4 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 10 00 00 00 00 00 00 00 00 00 C0 00 00 C0'
+ '00 00 00 C0 C0 00 C0 00 00 00 C0 00 C0 00 C0 C0'
+ '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
+ '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
+ '00 00 FF FF FF 00 B0 00 00 00 00 00 00 00 00 0B'
+ 'B0 00 00 00 00 00 00 00 00 0B 0F 88 88 88 88 88'
+ '88 88 88 80 08 88 88 88 88 88 88 88 88 80 0F 77'
+ '77 77 77 77 77 77 77 80 08 77 77 77 77 77 77 77'
+ '77 80 0F 77 FF FF FF FF FF FF F7 80 08 77 FF FF'
+ 'FF FF FF FF F7 80 0F 70 00 00 00 00 00 00 77 80'
+ '08 70 00 00 00 00 00 00 77 80 0F 77 77 77 77 77'
+ '77 77 77 80 08 77 77 77 77 77 77 77 77 80 0F 77'
+ '77 77 77 77 77 77 77 80 08 77 77 77 77 77 77 77'
+ '77 80 0F FF FF FF FF FF FF FF FF F0 08 88 88 88'
+ '88 88 88 88 88 80 B0 00 00 00 00 00 00 00 00 0B'
+ 'B0 00 00 00 00 00 00 00 00 0B'
+END
+
+
+// Version info.
+//
+#if !defined(__DEBUG_)
+// Non-Debug VERSIONINFO
+1 VERSIONINFO
+FILEVERSION 0, 1, 0, 0
+PRODUCTVERSION 0, 1, 0, 0
+FILEFLAGSMASK 0
+FILEFLAGS VS_FFI_FILEFLAGSMASK
+FILEOS VOS__WINDOWS16
+FILETYPE VFT_APP
+{
+ BLOCK "StringFileInfo"
+ {
+ BLOCK "040904E4"
+ {
+ VALUE "CompanyName", "\000"
+ VALUE "FileDescription", "Sword for Windows\000"
+ VALUE "FileVersion", "0.0000001\000"
+ VALUE "InternalName", "Sword\000"
+ VALUE "LegalCopyright", "GNU Copyleft GPL © 1996. CrossWire Software. See LICENSE.DOC for more info.\000"
+ VALUE "LegalTrademarks", "Windows (TM) is a trademark of Microsoft Corporation\000"
+ VALUE "OriginalFilename", "sword.EXE\000"
+ VALUE "ProductName", "sword\000"
+ VALUE "ProductVersion", "0.0000001\000"
+ }
+
+ }
+
+ BLOCK "VarFileInfo"
+ {
+ VALUE "Translation", 0x0409, 0x04e4
+ }
+
+}
+#else
+
+// Debug VERSIONINFO
+1 VERSIONINFO LOADONCALL MOVEABLE
+FILEVERSION 0, 1, 0, 0
+PRODUCTVERSION 0, 1, 0, 0
+FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE | VS_FF_PATCHED | VS_FF_PRIVATEBUILD | VS_FF_SPECIALBUILD
+FILEFLAGS VS_FFI_FILEFLAGSMASK
+FILEOS VOS__WINDOWS16
+FILETYPE VFT_APP
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ // Language type = U.S. English (0x0409) and Character Set = Windows, Multilingual(0x04e4)
+ BLOCK "040904E4" // Matches VarFileInfo Translation hex value.
+ BEGIN
+ VALUE "CompanyName", "\000"
+ VALUE "FileDescription", "sword for Windows\000"
+ VALUE "FileVersion", "0.0000001\000"
+ VALUE "InternalName", "sword\000"
+ VALUE "LegalCopyright", "GNU Copyleft GPL © 1995. Almost No Rights Reserved.\000"
+ VALUE "LegalTrademarks", "Windows (TM) is a trademark of Microsoft Corporation\000"
+ VALUE "OriginalFilename", "sword.EXE\000"
+ VALUE "ProductName", "sword\000"
+ VALUE "ProductVersion", "0.0000001\000"
+ VALUE "SpecialBuild", "Debug Version\000"
+ VALUE "PrivateBuild", "Built by The Sword Project Team\000"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04e4 // U.S. English(0x0409) & Windows Multilingual(0x04e4) 1252
+ END
+
+END
+#endif
+DIALOG_1 DIALOG 10, 20, 153, 88
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Search for Text"
+FONT 8, "MS Sans Serif"
+{
+ EDITTEXT IDC_FINDTEXT, 3, 6, 69, 12
+ DEFPUSHBUTTON "Find", IDC_FIND, 76, 5, 32, 14
+ LISTBOX IDC_LISTBOX1, 2, 30, 148, 59, LBS_NOTIFY | WS_BORDER | WS_BORDER | WS_VSCROLL
+ PUSHBUTTON "Close", IDOK, 112, 5, 38, 14
+ LTEXT "Results:", -1, 3, 21, 34, 8
+}
diff --git a/examples/windoze/bcowl25/multimod/swordapp.rh b/examples/windoze/bcowl25/multimod/swordapp.rh
new file mode 100644
index 0000000..a7378a8
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swordapp.rh
@@ -0,0 +1,196 @@
+//#if !defined(__swordapp_rh) // Sentry use file only if it's not already included.
+//#define __swordapp_rh
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swordapp.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Constant definitions for all resources defined in swordapp.rc.
+*/
+
+
+//
+// IDHELP BorButton for BWCC dialogs.
+//
+#define IDHELP 998 // Id of help button
+
+
+//
+// Application specific definitions:
+//
+#define DIALOG_1 1
+#define IDC_FIND 102
+#define IDC_LISTBOX1 103
+#define IDC_FINDTEXT 101
+#define IDI_SDIAPPLICATION 1001 // Application icon
+#define CM_VBDLOOKUP 112
+#define CM_EBDLOOKUP 109
+
+#define SDI_MENU 100 // Menu resource ID and Accelerator IDs
+
+//
+// CM_FILEnnnn commands (include\owl\editfile.rh except for CM_FILEPRINTPREVIEW)
+//
+#define CM_FILENEW 24331 // SDI New
+#define CM_FILEOPEN 24332 // SDI Open
+#define CM_FILECLOSE 24339
+#define CM_FILESAVE 24333
+#define CM_FILESAVEAS 24334
+
+
+//
+// Window commands (include\owl\window.rh)
+//
+#define CM_EXIT 24310
+
+
+//
+// CM_EDITnnnn commands (include\owl\window.rh)
+//
+#define CM_EDITUNDO 24321
+#define CM_EDITCUT 24322
+#define CM_EDITCOPY 24323
+#define CM_EDITPASTE 24324
+#define CM_EDITDELETE 24325
+#define CM_EDITCLEAR 24326
+#define CM_EDITADD 24327
+#define CM_EDITEDIT 24328
+
+
+//
+// Search menu commands (include\owl\editsear.rh)
+//
+#define CM_EDITFIND 24351
+#define CM_EDITREPLACE 24352
+#define CM_EDITFINDNEXT 24353
+
+
+//
+// Help menu commands.
+//
+#define CM_HELPABOUT 2009
+
+
+//
+// About Dialogs
+//
+#define IDD_ABOUT 22000
+#define IDC_VERSION 22001
+#define IDC_COPYRIGHT 22002
+#define IDC_DEBUG 22003
+
+
+//
+// Client Dialog
+//
+#define IDD_CLIENT 2000
+#define IDC_VTEXT 101
+#define IDC_KTEXT 102
+#define IDC_LDNAME 110
+#define IDC_LDKEY 111
+#define IDC_UPBUTTON 109
+#define IDC_DOWNBUTTON 112
+#define IDC_CTEXT 103
+#define IDC_DTEXT 108
+#define IDC_VERSE 106
+#define IDC_CHAPTER 105
+#define IDC_BOOK 104
+#define IDC_LOOKUP 107
+
+
+//
+// OWL defined strings
+//
+
+// Statusbar
+#define IDS_MODES 32530
+#define IDS_MODESOFF 32531
+
+
+// EditFile
+#define IDS_UNTITLED 32550
+#define IDS_UNABLEREAD 32551
+#define IDS_UNABLEWRITE 32552
+#define IDS_FILECHANGED 32553
+#define IDS_FILEFILTER 32554
+
+// EditSearch
+#define IDS_CANNOTFIND 32540
+
+
+//
+// General & application exception messages (include\owl\except.rh)
+//
+#define IDS_UNKNOWNEXCEPTION 32767
+#define IDS_OWLEXCEPTION 32766
+#define IDS_OKTORESUME 32765
+#define IDS_UNHANDLEDXMSG 32764
+#define IDS_UNKNOWNERROR 32763
+#define IDS_NOAPP 32762
+#define IDS_OUTOFMEMORY 32761
+#define IDS_INVALIDMODULE 32760
+#define IDS_INVALIDMAINWINDOW 32759
+#define IDS_VBXLIBRARYFAIL 32758
+
+//
+// Owl 1 compatibility messages
+//
+#define IDS_INVALIDWINDOW 32756
+#define IDS_INVALIDCHILDWINDOW 32755
+#define IDS_INVALIDCLIENTWINDOW 32754
+
+//
+// TXWindow messages
+//
+#define IDS_CLASSREGISTERFAIL 32749
+#define IDS_CHILDREGISTERFAIL 32748
+#define IDS_WINDOWCREATEFAIL 32747
+#define IDS_WINDOWEXECUTEFAIL 32746
+#define IDS_CHILDCREATEFAIL 32745
+
+#define IDS_MENUFAILURE 32744
+#define IDS_VALIDATORSYNTAX 32743
+#define IDS_PRINTERERROR 32742
+
+#define IDS_LAYOUTINCOMPLETE 32741
+#define IDS_LAYOUTBADRELWIN 32740
+
+//
+// TXGdi messages
+//
+#define IDS_GDIFAILURE 32739
+#define IDS_GDIALLOCFAIL 32738
+#define IDS_GDICREATEFAIL 32737
+#define IDS_GDIRESLOADFAIL 32736
+#define IDS_GDIFILEREADFAIL 32735
+#define IDS_GDIDELETEFAIL 32734
+#define IDS_GDIDESTROYFAIL 32733
+#define IDS_INVALIDDIBHANDLE 32732
+
+
+// TInputDialog DIALOG resource (include\owl\inputdia.rh)
+#define IDD_INPUTDIALOG 32514
+#define ID_PROMPT 4091
+#define ID_INPUT 4090
+
+
+// TSlider bitmaps (horizontal and vertical) (include\owl\slider.rh)
+#define IDB_HSLIDERTHUMB 32000
+#define IDB_VSLIDERTHUMB 32001
+
+
+// Validation messages (include\owl\validate.rh)
+#define IDS_VALPXPCONFORM 32520
+#define IDS_VALINVALIDCHAR 32521
+#define IDS_VALNOTINRANGE 32522
+#define IDS_VALNOTINLIST 32523
+
+
+//#endif // __swordapp_rh sentry.
diff --git a/examples/windoze/bcowl25/multimod/swrdabtd.cpp b/examples/windoze/bcowl25/multimod/swrdabtd.cpp
new file mode 100644
index 0000000..ca43db2
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swrdabtd.cpp
@@ -0,0 +1,175 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swrdabtd.cpp
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Source file for implementation of swordAboutDlg (TDialog).
+*/
+
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#if !defined(__FLAT__)
+#include <ver.h>
+#endif
+
+#include "swordapp.h"
+#include "swrdabtd.h"
+
+
+ProjectRCVersion::ProjectRCVersion (TModule *module)
+{
+ char appFName[255];
+ char subBlockName[255];
+ DWORD fvHandle;
+ UINT vSize;
+
+ FVData = 0;
+
+ module->GetModuleFileName(appFName, sizeof(appFName));
+ OemToAnsi(appFName, appFName);
+ DWORD dwSize = ::GetFileVersionInfoSize(appFName, &fvHandle);
+ if (dwSize) {
+ FVData = (void FAR *)new char[(UINT)dwSize];
+ if (::GetFileVersionInfo(appFName, fvHandle, dwSize, FVData)) {
+ // Copy string to buffer so if the -dc compiler switch (Put constant strings in code segments)
+ // is on VerQueryValue will work under Win16. This works around a problem in Microsoft's ver.dll
+ // which writes to the string pointed to by subBlockName.
+ strcpy(subBlockName, "\\VarFileInfo\\Translation");
+ if (!::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&TransBlock, &vSize)) {
+ delete[] FVData;
+ FVData = 0;
+ } else
+ // Swap the words so wsprintf will print the lang-charset in the correct format.
+ *(DWORD *)TransBlock = MAKELONG(HIWORD(*(DWORD *)TransBlock), LOWORD(*(DWORD *)TransBlock));
+ }
+ }
+}
+
+
+ProjectRCVersion::~ProjectRCVersion ()
+{
+ if (FVData)
+ delete[] FVData;
+}
+
+
+bool ProjectRCVersion::GetProductName (LPSTR &prodName)
+{
+ UINT vSize;
+ char subBlockName[255];
+
+ if (FVData) {
+ wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"ProductName");
+ return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&prodName, &vSize) : false;
+ } else
+ return false;
+}
+
+
+bool ProjectRCVersion::GetProductVersion (LPSTR &prodVersion)
+{
+ UINT vSize;
+ char subBlockName[255];
+
+ if (FVData) {
+ wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"ProductVersion");
+ return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&prodVersion, &vSize) : false;
+ } else
+ return false;
+}
+
+
+bool ProjectRCVersion::GetCopyright (LPSTR &copyright)
+{
+ UINT vSize;
+ char subBlockName[255];
+
+ if (FVData) {
+ wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"LegalCopyright");
+ return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&copyright, &vSize) : false;
+ } else
+ return false;
+}
+
+
+bool ProjectRCVersion::GetDebug (LPSTR &debug)
+{
+ UINT vSize;
+ char subBlockName[255];
+
+ if (FVData) {
+ wsprintf(subBlockName, "\\StringFileInfo\\%08lx\\%s", *(DWORD *)TransBlock, (LPSTR)"SpecialBuild");
+ return FVData ? ::VerQueryValue(FVData, subBlockName, (void FAR* FAR*)&debug, &vSize) : false;
+ } else
+ return false;
+}
+
+
+//{{swordAboutDlg Implementation}}
+
+
+//////////////////////////////////////////////////////////
+// swordAboutDlg
+// ==========
+// Construction/Destruction handling.
+swordAboutDlg::swordAboutDlg (TWindow *parent, TResId resId, TModule *module)
+ : TDialog(parent, resId, module)
+{
+ // INSERT>> Your constructor code here.
+}
+
+
+swordAboutDlg::~swordAboutDlg ()
+{
+ Destroy();
+
+ // INSERT>> Your destructor code here.
+}
+
+
+void swordAboutDlg::SetupWindow ()
+{
+ LPSTR prodName = 0, prodVersion = 0, copyright = 0, debug = 0;
+
+ // Get the static text for the value based on VERSIONINFO.
+ TStatic *versionCtrl = new TStatic(this, IDC_VERSION, 255);
+ TStatic *copyrightCtrl = new TStatic(this, IDC_COPYRIGHT, 255);
+ TStatic *debugCtrl = new TStatic(this, IDC_DEBUG, 255);
+
+ TDialog::SetupWindow();
+
+ // Process the VERSIONINFO.
+ ProjectRCVersion applVersion(GetModule());
+
+ // Get the product name and product version strings.
+ if (applVersion.GetProductName(prodName) && applVersion.GetProductVersion(prodVersion)) {
+ // IDC_VERSION is the product name and version number, the initial value of IDC_VERSION is
+ // the word Version (in whatever language) product name VERSION product version.
+ char buffer[255];
+ char versionName[128];
+
+ buffer[0] = '\0';
+ versionName[0] = '\0';
+
+ versionCtrl->GetText(versionName, sizeof(versionName));
+ wsprintf(buffer, "%s %s %s", prodName, versionName, prodVersion);
+
+ versionCtrl->SetText(buffer);
+ }
+
+ //Get the legal copyright string.
+ if (applVersion.GetCopyright(copyright))
+ copyrightCtrl->SetText(copyright);
+
+ // Only get the SpecialBuild text if the VERSIONINFO resource is there.
+ if (applVersion.GetDebug(debug))
+ debugCtrl->SetText(debug);
+}
diff --git a/examples/windoze/bcowl25/multimod/swrdabtd.h b/examples/windoze/bcowl25/multimod/swrdabtd.h
new file mode 100644
index 0000000..dd091ae
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swrdabtd.h
@@ -0,0 +1,60 @@
+#if !defined(__swrdabtd_h) // Sentry, use file only if it's not already included.
+#define __swrdabtd_h
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swrdabtd.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Class definition for swordAboutDlg (TDialog).
+*/
+
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include "swordapp.rh" // Definition of all resources.
+
+
+//{{TDialog = swordAboutDlg}}
+class swordAboutDlg : public TDialog {
+public:
+ swordAboutDlg (TWindow *parent, TResId resId = IDD_ABOUT, TModule *module = 0);
+ virtual ~swordAboutDlg ();
+
+//{{swordAboutDlgVIRTUAL_BEGIN}}
+public:
+ void SetupWindow ();
+//{{swordAboutDlgVIRTUAL_END}}
+}; //{{swordAboutDlg}}
+
+
+// Reading the VERSIONINFO resource.
+class ProjectRCVersion {
+public:
+ ProjectRCVersion (TModule *module);
+ virtual ~ProjectRCVersion ();
+
+ bool GetProductName (LPSTR &prodName);
+ bool GetProductVersion (LPSTR &prodVersion);
+ bool GetCopyright (LPSTR &copyright);
+ bool GetDebug (LPSTR &debug);
+
+protected:
+ LPBYTE TransBlock;
+ void FAR *FVData;
+
+private:
+ // Don't allow this object to be copied.
+ ProjectRCVersion (const ProjectRCVersion &);
+ ProjectRCVersion & operator =(const ProjectRCVersion &);
+};
+
+
+#endif // __swrdabtd_h sentry.
diff --git a/examples/windoze/bcowl25/multimod/swrtdlgc.cpp b/examples/windoze/bcowl25/multimod/swrtdlgc.cpp
new file mode 100644
index 0000000..44e93ca
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swrtdlgc.cpp
@@ -0,0 +1,213 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1996. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swrtdlgc.cpp
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Source file for implementation of swordTDLGClient (TDialog).
+*/
+
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include "tversedt.h"
+#include "swordapp.h"
+#include "swrtdlgc.h"
+#include "serchdlg.h"
+
+#include <versekey.h>
+#include <rawtext.h>
+#include <rawcom.h>
+#include <rawld.h>
+#include <tbdisp.h>
+
+
+class TBLDDisp: public TBDisp {
+ int nameid, keyid;
+public:
+ TBLDDisp(HWND iwnd, int ictrlid, int inameid = 0, int ikeyid = 0):TBDisp(iwnd, ictrlid) {
+ nameid = inameid;
+ keyid = ikeyid;
+ }
+ virtual char Display(SWModule &imodule) {
+ TBDisp::Display(imodule);
+ if (nameid)
+ SetDlgItemText(wnd, nameid, imodule.Description());
+ if (keyid)
+ SetDlgItemText(wnd, keyid, (char *)(SWKey)imodule);
+ }
+};
+
+
+SWDisplay *edit1disp = 0;
+SWDisplay *edit2disp = 0;
+SWDisplay *edit3disp = 0;
+VerseKey *masterkey = 0;
+SWModule *webster = 0;
+SWModule *mhc = 0;
+SWModule *eastons = 0;
+SWModule *vines = 0;
+
+//
+// Build a response table for all messages/commands handled
+// by the application.
+//
+DEFINE_RESPONSE_TABLE1(swordTDLGClient, TDialog)
+//{{swordTDLGClientRSP_TBL_BEGIN}}
+ EV_BN_CLICKED(IDC_LOOKUP, BNClicked),
+ EV_WM_RBUTTONDOWN,
+ EV_BN_CLICKED(IDC_UPBUTTON, UpVerse),
+ EV_BN_CLICKED(IDC_DOWNBUTTON, DownVerse),
+ EV_COMMAND(CM_EDITFIND, SearchTxt),
+//{{swordTDLGClientRSP_TBL_END}}
+END_RESPONSE_TABLE;
+
+
+// SWLookup This is a kludgy way to lookup, but a Module manager will do
+// this work in the future
+void SWLookup(char *modname, SWKey &key)
+{
+ if (!stricmp(modname, eastons->Name())) {
+ eastons->SetKey(key);
+ eastons->Display();
+ }
+ if (!stricmp(modname, vines->Name())) {
+ vines->SetKey(key);
+ vines->Display();
+ }
+}
+
+
+
+
+//{{swordTDLGClient Implementation}}
+
+
+//////////////////////////////////////////////////////////
+// swordTDLGClient
+// ==========
+// Construction/Destruction handling.
+static swordTDLGClientXfer swordTDLGClientData;
+
+swordTDLGClient::swordTDLGClient (TWindow *parent, TResId resId, TModule *module)
+ : TDialog(parent, resId, module)
+{
+//{{swordTDLGClientXFER_USE}}
+ BookCB = new TComboBox(this, IDC_BOOK, 1);
+ WebEdit = new TVerseEdit(this, IDC_VTEXT, 255);
+ MHCEdit = new TVerseEdit(this, IDC_CTEXT, 255);
+ LDText = new TVerseEdit(this, IDC_DTEXT, 255);
+
+ SetTransferBuffer(&swordTDLGClientData);
+//{{swordTDLGClientXFER_USE_END}}
+
+}
+
+
+swordTDLGClient::~swordTDLGClient ()
+{
+ Destroy();
+
+ delete edit1disp;
+ delete edit2disp;
+ delete edit3disp;
+ delete webster;
+ delete mhc;
+ delete eastons;
+ delete vines;
+ delete masterkey;
+}
+
+
+void swordTDLGClient::SetupWindow ()
+{
+ char loop1, loop2;
+
+ TDialog::SetupWindow();
+
+ edit1disp = new TBLDDisp(HWindow, IDC_VTEXT, 0, IDC_KTEXT);
+ edit2disp = new TBLDDisp(HWindow, IDC_CTEXT);
+ edit3disp = new TBLDDisp(HWindow, IDC_DTEXT, IDC_LDNAME, IDC_LDKEY);
+ masterkey = new VerseKey();
+ webster = new RawText("../../../../modules/texts/rawtext/webster/", "Webster", "Webster Text", edit1disp);
+ mhc = new RawCom ("../../../../modules/comments/rawcom/mhc/", "MHC", "Matthew Henry's Commentary", edit2disp);
+ eastons = new RawLD ("../../../../modules/lexdict/rawld/eastons/eastons", "Eastons", "Easton's Bible Dictionary", edit3disp);
+ vines = new RawLD ("../../../../modules/lexdict/rawld/vines/vines", "Vines", "Vine's Bible Dictionary", edit3disp);
+
+ masterkey->Persist(1);
+ webster->SetKey(*masterkey);
+ mhc->SetKey(*masterkey);
+
+ for (loop1 = 0; loop1 < 2; loop1++) {
+ for (loop2 = 0; loop2 < VerseKey::BMAX[loop1]; loop2++) {
+ BookCB->AddString(VerseKey::books[loop1][loop2].name);
+ }
+ }
+ BookCB->SetSelIndex(58);
+ SetDlgItemText(IDC_CHAPTER, "1");
+ SetDlgItemText(IDC_VERSE, "19");
+}
+
+
+void swordTDLGClient::BNClicked ()
+{
+ char buf[80], tmpbuf[70];
+ int ch, vs;
+
+ BookCB->GetText(tmpbuf, 79);
+ ch = GetDlgItemInt(IDC_CHAPTER);
+ vs = GetDlgItemInt(IDC_VERSE);
+
+ masterkey->AutoNormalize(ch && vs); // if either chapter or verse are 0 then don't auto normalize so that we can lookup intros
+
+ wsprintf(buf, "%s %d:%d", tmpbuf, ch, vs);
+ *masterkey = buf;
+
+ webster->Display();
+ mhc->Display();
+
+}
+
+
+void swordTDLGClient::EvRButtonDown (uint modKeys, TPoint& point)
+{
+ TDialog::EvRButtonDown(modKeys, point);
+}
+
+
+void swordTDLGClient::UpVerse ()
+{
+ (*masterkey)--;
+ webster->Display();
+ mhc->Display();
+}
+
+
+void swordTDLGClient::DownVerse ()
+{
+ (*masterkey)++;
+ webster->Display();
+ mhc->Display();
+}
+
+
+void swordTDLGClient::EvPaint ()
+{
+ TDialog::EvPaint();
+
+ // INSERT>> Your code here.
+
+}
+
+
+void swordTDLGClient::SearchTxt ()
+{
+ new SearchDlg(this)->Create();
+}
+
diff --git a/examples/windoze/bcowl25/multimod/swrtdlgc.h b/examples/windoze/bcowl25/multimod/swrtdlgc.h
new file mode 100644
index 0000000..18307fc
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/swrtdlgc.h
@@ -0,0 +1,71 @@
+#if !defined(__swrtdlgc_h) // Sentry, use file only if it's not already included.
+#define __swrtdlgc_h
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.exe Application
+ FILE: swrtdlgc.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Class definition for swordTDLGClient (TDialog).
+*/
+
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include <owl\edit.h>
+#include <owl\combobox.h>
+#include "swordapp.rh" // Definition of all resources.
+
+
+//{{TDialog = swordTDLGClient}}
+struct swordTDLGClientXfer {
+//{{swordTDLGClientXFER_DATA}}
+ TComboBoxData BookCB;
+ char WebEdit[ 255 ];
+ char MHCEdit[ 255 ];
+ char LDText[ 255 ];
+//{{swordTDLGClientXFER_DATA_END}}
+};
+
+
+class swordTDLGClient : public TDialog {
+public:
+ swordTDLGClient (TWindow *parent, TResId resId = IDD_CLIENT, TModule *module = 0);
+ virtual ~swordTDLGClient ();
+
+
+//{{swordTDLGClientVIRTUAL_BEGIN}}
+public:
+ virtual void SetupWindow ();
+//{{swordTDLGClientVIRTUAL_END}}
+
+//{{swordTDLGClientRSP_TBL_BEGIN}}
+protected:
+ void BNClicked ();
+ void EvRButtonDown (uint modKeys, TPoint& point);
+ void UpVerse ();
+ void DownVerse ();
+ void EvPaint ();
+ void SearchTxt ();
+//{{swordTDLGClientRSP_TBL_END}}
+DECLARE_RESPONSE_TABLE(swordTDLGClient);
+
+//{{swordTDLGClientXFER_DEF}}
+protected:
+ TComboBox *BookCB;
+ TEdit *WebEdit;
+ TEdit *MHCEdit;
+ TEdit *LDText;
+
+//{{swordTDLGClientXFER_DEF_END}}
+}; //{{swordTDLGClient}}
+
+
+#endif // __swrtdlgc_h sentry.
diff --git a/examples/windoze/bcowl25/multimod/tversedt.cpp b/examples/windoze/bcowl25/multimod/tversedt.cpp
new file mode 100644
index 0000000..317fdd4
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/tversedt.cpp
@@ -0,0 +1,110 @@
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.apx Application
+ FILE: tversedt.cpp
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Source file for implementation of TVerseEdit (TEdit).
+*/
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+#include "tversedt.h"
+#include <swkey.h>
+
+void SWLookup(char *modname, SWKey &key);
+
+//
+// Build a response table for all messages/commands handled
+// by the application.
+//
+DEFINE_RESPONSE_TABLE1(TVerseEdit, TEdit)
+//{{TVerseEditRSP_TBL_BEGIN}}
+ EV_WM_RBUTTONDOWN,
+ EV_COMMAND(CM_EBDLOOKUP, EbdLookUp),
+ EV_COMMAND(CM_VBDLOOKUP, VbdLookUp),
+//{{TVerseEditRSP_TBL_END}}
+END_RESPONSE_TABLE;
+
+
+//{{TVerseEdit Implementation}}
+
+
+TVerseEdit::TVerseEdit (TWindow* parent, int id, const char far* text, int x, int y, int w, int h, uint textLen, bool multiline, TModule* module):
+ TEdit(parent, id, text, x, y, w, h, textLen, multiline, module)
+{
+}
+
+
+TVerseEdit::~TVerseEdit ()
+{
+ Destroy();
+
+ // INSERT>> Your destructor code here.
+
+}
+
+
+void TVerseEdit::EvRButtonDown (uint modKeys, TPoint& point)
+{
+ TEdit::EvRButtonDown(modKeys, point);
+
+ GetCursorPos(point);
+ PopupMenu.TrackPopupMenu(TPM_LEFTALIGN, point, 0, HWindow);
+}
+
+
+void TVerseEdit::SetupWindow ()
+{
+ TEdit::SetupWindow();
+
+ PopupMenu.AppendMenu(MF_STRING, CM_EBDLOOKUP, "Easton's Bible Dictionary");
+ PopupMenu.AppendMenu(MF_STRING, CM_VBDLOOKUP, "Vine's Bible Dictionary");
+}
+
+
+void TVerseEdit::EbdLookUp()
+{
+ unsigned int start, end;
+ char *buf, *str;
+
+ GetSelection(start, end);
+ if (end - start) {
+ buf = new char [ (end - start) + 1 ];
+ GetSubText(buf, start, end);
+ for (str = &buf[ strlen(buf) - 1 ]; str > buf; str--) {
+ if (!isalnum(*str))
+ *str = 0;
+ else break;
+ }
+ SWLookup("Eastons", buf);
+ delete [] buf;
+ }
+}
+
+
+void TVerseEdit::VbdLookUp()
+{
+ unsigned int start, end;
+ char *buf, *str;
+
+ GetSelection(start, end);
+ if (end - start) {
+ buf = new char [ (end - start) + 1 ];
+ GetSubText(buf, start, end);
+ for (str = &buf[ strlen(buf) - 1 ]; str > buf; str--) {
+ if (!isalnum(*str))
+ *str = 0;
+ else break;
+ }
+ SWLookup("Vines", buf);
+ delete [] buf;
+ }
+}
+
diff --git a/examples/windoze/bcowl25/multimod/tversedt.h b/examples/windoze/bcowl25/multimod/tversedt.h
new file mode 100644
index 0000000..97f2c6c
--- /dev/null
+++ b/examples/windoze/bcowl25/multimod/tversedt.h
@@ -0,0 +1,50 @@
+#if !defined(__tversedt_h) // Sentry, use file only if it's not already included.
+#define __tversedt_h
+
+/* Project sword
+
+ GNU Copyleft GPL © 1995. Almost No Rights Reserved.
+
+ SUBSYSTEM: sword.apx Application
+ FILE: tversedt.h
+ AUTHOR: The Sword Project Team
+
+
+ OVERVIEW
+ ========
+ Class definition for TVerseEdit (TEdit).
+*/
+
+#include <owl\owlpch.h>
+#pragma hdrstop
+
+
+#include "swordapp.rh" // Definition of all resources.
+
+
+//{{TEdit = TVerseEdit}}
+class TVerseEdit : public TEdit {
+public:
+ TVerseEdit(TWindow* parent, int id, const char far* text, int x, int y, int w, int h, uint textLen = 0, bool multiline = false, TModule* module = 0);
+ TVerseEdit(TWindow* parent, int resourceID, uint textLen = 0, TModule* module = 0) : TEdit(parent, resourceID, textLen, module) {}
+
+ virtual ~TVerseEdit ();
+
+//{{TVerseEditVIRTUAL_BEGIN}}
+public:
+ virtual void SetupWindow ();
+//{{TVerseEditVIRTUAL_END}}
+
+//{{TVerseEditRSP_TBL_BEGIN}}
+protected:
+ TPopupMenu PopupMenu;
+ void EvRButtonDown (uint modKeys, TPoint& point);
+ void EbdLookUp();
+ void VbdLookUp();
+//{{TVerseEditRSP_TBL_END}}
+DECLARE_RESPONSE_TABLE(TVerseEdit);
+}; //{{TVerseEdit}}
+
+
+#endif // __tversedt_h sentry.
+
diff --git a/examples/windoze/delphi20/multimo1/LogoMain.dfm b/examples/windoze/delphi20/multimo1/LogoMain.dfm
new file mode 100644
index 0000000..f57ec1c
--- /dev/null
+++ b/examples/windoze/delphi20/multimo1/LogoMain.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo1/LogoMain.pas b/examples/windoze/delphi20/multimo1/LogoMain.pas
new file mode 100644
index 0000000..4365c83
--- /dev/null
+++ b/examples/windoze/delphi20/multimo1/LogoMain.pas
@@ -0,0 +1,213 @@
+unit LogoMain;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, Menus,
+ Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, Grids, DBGrids;
+
+type
+ paramt = record
+ path, name, disc: pchar;
+ end;
+ pparamt = ^paramt;
+
+ TSwordAppForm = class(TForm)
+ MainMenu: TMainMenu;
+ FileMenu: TMenuItem;
+ FileExitItem: TMenuItem;
+ Help1: TMenuItem;
+ AboutItem: TMenuItem;
+ SpeedPanel: TPanel;
+ ExitBtn: TSpeedButton;
+ StatusBar: TStatusBar;
+ TextBox: TRichEdit;
+ CommentBox: TRichEdit;
+ BookCB: TComboBox;
+ CHBox: TEdit;
+ VSBox: TEdit;
+ Label1: TLabel;
+ LookupBtn: TSpeedButton;
+ TextKeyText: TLabel;
+ LDBox: TRichEdit;
+ LDTitle: TLabel;
+ Label2: TLabel;
+ LDKeyText: TLabel;
+ TextTitle: TLabel;
+ CommentTitle: TLabel;
+ PopupMenu1: TPopupMenu;
+ EastonsBibleDictionary1: TMenuItem;
+ VinesBibleDictionary1: TMenuItem;
+ procedure FormCreate(Sender: TObject);
+ procedure FileExit(Sender: TObject);
+ procedure Lookup(Sender: TObject);
+ procedure About(Sender: TObject);
+ procedure ShowHint(Sender: TObject);
+ procedure EastonsBibleDictionary1Click(Sender: TObject);
+ procedure TextBoxEnter(Sender: TObject);
+ procedure VinesBibleDictionary1Click(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ private
+ curedit: TRichEdit;
+ commonkey: integer;
+ webster: integer;
+ mhc: longint;
+ eastons: longint;
+ vines: longint;
+ FFileName: String;
+ public
+ { Public declarations }
+ end;
+
+var
+ SwordAppForm: TSwordAppForm;
+
+implementation
+
+uses SwordAPI, SysUtils, Mapi, About;
+
+{$R *.DFM}
+
+procedure TSwordAppForm.FormCreate(Sender: TObject);
+var
+ params: paramt;
+ s1, s2, s3, s4: AnsiString;
+ buf:PChar;
+ book: integer;
+begin
+ Application.OnHint := ShowHint;
+
+ commonkey := NewKey('VerseKey');
+ GetMem(buf, 255);
+ KeySetText(commonkey, 'Genesis 1:1');
+ while (KeyError(commonkey) = 0) do
+ begin
+ KeyGetText(commonkey, buf, 254);
+ s4 := strpas(buf);
+ SetLength(s4, Length(s4) - 4);
+ BookCB.Items.Add(s4);
+ book := VerseKeyGetBook(commonkey);
+ book := book + 1;
+ VerseKeySetBook(commonkey, book);
+ end;
+ FreeMem(buf, 255);
+
+ s1 := 'Webster';
+ s2 := '../../../../modules/texts/rawtext/webster/';
+ s3 := 'Webster Text';
+ params.name := PChar(s1);
+ params.path := PChar(s2);
+ params.disc := PChar(s3);
+ webster := NewModule('RawText', @params);
+
+
+ params.name := 'MHC';
+ params.path := '../../../../modules/comments/rawcom/mhc/';
+ params.disc := 'Matthew Henry''''s Commentary';
+ mhc := NewModule('RawCom', @params);
+
+ KeySetPersist(commonkey, 1);
+ ModSetKeyKey(mhc, commonkey);
+ ModSetKeyKey(webster, commonkey);
+
+ params.name := 'Eastons';
+ params.path := '../../../../modules/lexdict/rawld/eastons/eastons';
+ params.disc := 'Easton''''s Bible Dictionary';
+ eastons := NewModule('RawLD', @params);
+
+ params.path := '../../../../modules/lexdict/rawld/vines/vines';
+ params.name := 'Vines';
+ params.disc := 'Vine''''s Bible Dictionary';
+ vines := NewModule('RawLD', @params);
+end;
+
+
+procedure TSwordAppForm.FormClose(Sender: TObject;
+ var Action: TCloseAction);
+begin
+ DeleteModule(webster);
+ DeleteModule(mhc);
+ DeleteModule(eastons);
+ DeleteModule(vines);
+ DeleteKey(commonkey);
+end;
+
+
+procedure TSwordAppForm.FileExit(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSwordAppForm.Lookup(Sender: TObject);
+var
+ Buffer: PChar;
+ s1: AnsiString;
+ hkey: integer;
+begin
+ s1 := BookCB.Text + ' ' + CHBox.Text + ':' + VSBox.Text;
+ if ((StrToInt(CHBox.Text) = 0) or (StrToInt(VSBox.Text) = 0)) then
+ VerseKeySetAutoNormalize(commonkey, 0);
+
+ KeySetText(commonkey, PChar(s1));
+
+ GetMem(Buffer, 4096); {Creates Buffer dynamic variable}
+ KeyGetText(commonkey, Buffer, 4095);
+ TextKeyText.Caption := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ ModGetText(webster, Buffer, 4095);
+ TextBox.Text := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ ModGetText(mhc, Buffer, 4095);
+ CommentBox.Text := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ FreeMem(Buffer, 4096); {Frees memory allocated to Buffer}
+
+ VerseKeySetAutoNormalize(commonkey, 1);
+end;
+
+procedure TSwordAppForm.About(Sender: TObject);
+begin
+ AboutBox.ShowModal;
+end;
+
+procedure TSwordAppForm.ShowHint(Sender: TObject);
+begin
+ StatusBar.SimpleText := Application.Hint;
+end;
+
+procedure TSwordAppForm.EastonsBibleDictionary1Click(Sender: TObject);
+var
+ s1 : AnsiString;
+ Buffer: PChar;
+begin
+ s1 := Trim(curedit.SelText);
+ ModSetKeyText(eastons, PChar(s1));
+ GetMem(Buffer, 4096); {Creates Buffer dynamic variable}
+ ModGetText(eastons, Buffer, 4095);
+ LDBox.Text := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ ModGetKeyText(eastons, Buffer, 4095);
+ LDKeyText.Caption := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ LDTitle.Caption := 'Easton''s Bible Dictionary';
+ FreeMem(Buffer, 4096);
+end;
+
+procedure TSwordAppForm.TextBoxEnter(Sender: TObject);
+begin
+ curedit := TRichEdit(Sender);
+end;
+
+procedure TSwordAppForm.VinesBibleDictionary1Click(Sender: TObject);
+var
+ s1 : AnsiString;
+ Buffer: PChar;
+begin
+ s1 := Trim(curedit.SelText);
+ ModSetKeyText(vines, PChar(s1));
+ GetMem(Buffer, 4096); {Creates Buffer dynamic variable}
+ ModGetText(vines, Buffer, 4095);
+ LDBox.Text := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ ModGetKeyText(vines, Buffer, 4095);
+ LDKeyText.Caption := StrPas(Buffer); {Converts Buffer to a Pascal-style string}
+ LDTitle.Caption := 'Vines''s Bible Dictionary';
+ FreeMem(Buffer, 4096);
+
+end;
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo1/Multimod.ico b/examples/windoze/delphi20/multimo1/Multimod.ico
new file mode 100644
index 0000000..e2a7458
--- /dev/null
+++ b/examples/windoze/delphi20/multimo1/Multimod.ico
Binary files differ
diff --git a/examples/windoze/delphi20/multimo1/about.dfm b/examples/windoze/delphi20/multimo1/about.dfm
new file mode 100644
index 0000000..613bc00
--- /dev/null
+++ b/examples/windoze/delphi20/multimo1/about.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo1/about.pas b/examples/windoze/delphi20/multimo1/about.pas
new file mode 100644
index 0000000..44a8a55
--- /dev/null
+++ b/examples/windoze/delphi20/multimo1/about.pas
@@ -0,0 +1,31 @@
+unit About;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+ TAboutBox = class(TForm)
+ Panel1: TPanel;
+ OKButton: TButton;
+ ProgramIcon: TImage;
+ ProductName: TLabel;
+ Version: TLabel;
+ Copyright: TLabel;
+ Comments: TLabel;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ AboutBox: TAboutBox;
+
+implementation
+
+{$R *.DFM}
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo1/multimod.dpr b/examples/windoze/delphi20/multimo1/multimod.dpr
new file mode 100644
index 0000000..33d0684
--- /dev/null
+++ b/examples/windoze/delphi20/multimo1/multimod.dpr
@@ -0,0 +1,15 @@
+program MultiMod;
+
+uses
+ Forms,
+ LogoMain in 'LogoMain.pas' {SwordAppForm},
+ About in 'ABOUT.PAS' {AboutBox};
+
+{$R *.RES}
+
+begin
+ Application.CreateForm(TSwordAppForm, SwordAppForm);
+ Application.CreateForm(TAboutBox, AboutBox);
+ Application.Run;
+end.
+ \ No newline at end of file
diff --git a/examples/windoze/delphi20/multimo2/LogoMain.dfm b/examples/windoze/delphi20/multimo2/LogoMain.dfm
new file mode 100644
index 0000000..c30e38f
--- /dev/null
+++ b/examples/windoze/delphi20/multimo2/LogoMain.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo2/LogoMain.pas b/examples/windoze/delphi20/multimo2/LogoMain.pas
new file mode 100644
index 0000000..1d6b840
--- /dev/null
+++ b/examples/windoze/delphi20/multimo2/LogoMain.pas
@@ -0,0 +1,151 @@
+unit LogoMain;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, Menus,
+ Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, Grids, DBGrids, swmodule;
+
+type
+ TSwordAppForm = class(TForm)
+ MainMenu: TMainMenu;
+ FileMenu: TMenuItem;
+ FileExitItem: TMenuItem;
+ Help1: TMenuItem;
+ AboutItem: TMenuItem;
+ SpeedPanel: TPanel;
+ ExitBtn: TSpeedButton;
+ StatusBar: TStatusBar;
+ TextBox: TRichEdit;
+ CommentBox: TRichEdit;
+ BookCB: TComboBox;
+ CHBox: TEdit;
+ VSBox: TEdit;
+ Label1: TLabel;
+ LookupBtn: TSpeedButton;
+ TextKeyText: TLabel;
+ LDBox: TRichEdit;
+ LDTitle: TLabel;
+ Label2: TLabel;
+ LDKeyText: TLabel;
+ TextTitle: TLabel;
+ CommentTitle: TLabel;
+ PopupMenu1: TPopupMenu;
+ EastonsBibleDictionary1: TMenuItem;
+ VinesBibleDictionary1: TMenuItem;
+ Webster: TSWModule;
+ MHC: TSWModule;
+ Eastons: TSWModule;
+ Vines: TSWModule;
+ procedure FormCreate(Sender: TObject);
+ procedure FileExit(Sender: TObject);
+ procedure Lookup(Sender: TObject);
+ procedure About(Sender: TObject);
+ procedure ShowHint(Sender: TObject);
+ procedure EastonsBibleDictionary1Click(Sender: TObject);
+ procedure TextBoxEnter(Sender: TObject);
+ procedure VinesBibleDictionary1Click(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ private
+ curedit: TRichEdit;
+ commonkey: integer;
+ FFileName: String;
+ public
+ { Public declarations }
+ end;
+
+var
+ SwordAppForm: TSwordAppForm;
+
+implementation
+
+uses SwordAPI, SysUtils, Mapi, About;
+
+{$R *.DFM}
+procedure TSwordAppForm.FormCreate(Sender: TObject);
+var
+ buf: PChar;
+ book: integer;
+ s1: AnsiString;
+begin
+ Application.OnHint := ShowHint;
+
+ commonkey := NewKey('VerseKey');
+ GetMem(buf, 255);
+ KeySetText(commonkey, 'Genesis 1:1');
+ while (KeyError(commonkey) = 0) do
+ begin
+ KeyGetText(commonkey, buf, 254);
+ s1 := strpas(buf);
+ SetLength(s1, Length(s1) - 4);
+ BookCB.Items.Add(s1);
+ book := VerseKeyGetBook(commonkey);
+ book := book + 1;
+ VerseKeySetBook(commonkey, book);
+ end;
+ FreeMem(buf, 255);
+
+ KeySetPersist(commonkey, 1);
+ ModSetKeyKey(MHC.SWHandle, commonkey);
+ ModSetKeyKey(Webster.SWHandle, commonkey);
+end;
+
+
+procedure TSwordAppForm.FormClose(Sender: TObject;
+ var Action: TCloseAction);
+begin
+ DeleteKey(commonkey);
+end;
+
+
+procedure TSwordAppForm.FileExit(Sender: TObject);
+begin
+ Close;
+end;
+
+
+procedure TSwordAppForm.Lookup(Sender: TObject);
+begin
+ if ((StrToInt(CHBox.Text) = 0) or (StrToInt(VSBox.Text) = 0)) then
+ VerseKeySetAutoNormalize(commonkey, 0);
+
+ Webster.Key.Text := BookCB.Text + ' ' + CHBox.Text + ':' + VSBox.Text;
+ TextKeyText.Caption := Webster.Key.Text;
+ TextBox.Text := Webster.Text;
+ CommentBox.Text := MHC.Text;
+
+ VerseKeySetAutoNormalize(commonkey, 1);
+end;
+
+procedure TSwordAppForm.About(Sender: TObject);
+begin
+ AboutBox.ShowModal;
+end;
+
+procedure TSwordAppForm.ShowHint(Sender: TObject);
+begin
+ StatusBar.SimpleText := Application.Hint;
+end;
+
+procedure TSwordAppForm.EastonsBibleDictionary1Click(Sender: TObject);
+begin
+ Eastons.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Eastons (in fact, it may even not be allocated yet). We just want to set Eastons with the text and let Eastons worry about allocating keys.}
+ LDBox.Text := Eastons.Text;
+ LDKeyText.Caption := Eastons.KeyText;
+ LDTitle.Caption := Eastons.Description;
+end;
+
+procedure TSwordAppForm.TextBoxEnter(Sender: TObject);
+begin
+ curedit := TRichEdit(Sender);
+end;
+
+procedure TSwordAppForm.VinesBibleDictionary1Click(Sender: TObject);
+begin
+ Vines.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Eastons (in fact, it may even not be allocated yet). We just want to set Eastons with the text and let Eastons worry about allocating keys.}
+ LDBox.Text := Vines.Text;
+ LDKeyText.Caption := Vines.KeyText;
+ LDTitle.Caption := Vines.Description;
+end;
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo2/Multimod.ico b/examples/windoze/delphi20/multimo2/Multimod.ico
new file mode 100644
index 0000000..e2a7458
--- /dev/null
+++ b/examples/windoze/delphi20/multimo2/Multimod.ico
Binary files differ
diff --git a/examples/windoze/delphi20/multimo2/about.dfm b/examples/windoze/delphi20/multimo2/about.dfm
new file mode 100644
index 0000000..613bc00
--- /dev/null
+++ b/examples/windoze/delphi20/multimo2/about.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo2/about.pas b/examples/windoze/delphi20/multimo2/about.pas
new file mode 100644
index 0000000..44a8a55
--- /dev/null
+++ b/examples/windoze/delphi20/multimo2/about.pas
@@ -0,0 +1,31 @@
+unit About;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+ TAboutBox = class(TForm)
+ Panel1: TPanel;
+ OKButton: TButton;
+ ProgramIcon: TImage;
+ ProductName: TLabel;
+ Version: TLabel;
+ Copyright: TLabel;
+ Comments: TLabel;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ AboutBox: TAboutBox;
+
+implementation
+
+{$R *.DFM}
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo2/multimod.dpr b/examples/windoze/delphi20/multimo2/multimod.dpr
new file mode 100644
index 0000000..33d0684
--- /dev/null
+++ b/examples/windoze/delphi20/multimo2/multimod.dpr
@@ -0,0 +1,15 @@
+program MultiMod;
+
+uses
+ Forms,
+ LogoMain in 'LogoMain.pas' {SwordAppForm},
+ About in 'ABOUT.PAS' {AboutBox};
+
+{$R *.RES}
+
+begin
+ Application.CreateForm(TSwordAppForm, SwordAppForm);
+ Application.CreateForm(TAboutBox, AboutBox);
+ Application.Run;
+end.
+ \ No newline at end of file
diff --git a/examples/windoze/delphi20/multimo3/LogoMain.dfm b/examples/windoze/delphi20/multimo3/LogoMain.dfm
new file mode 100644
index 0000000..5ca5da8
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/LogoMain.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo3/LogoMain.pas b/examples/windoze/delphi20/multimo3/LogoMain.pas
new file mode 100644
index 0000000..d7545a4
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/LogoMain.pas
@@ -0,0 +1,166 @@
+unit LogoMain;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, Menus,
+ Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, Grids, DBGrids, swmodule,
+ swkey, swvskey;
+
+type
+ TSwordAppForm = class(TForm)
+ MainMenu: TMainMenu;
+ FileMenu: TMenuItem;
+ FileExitItem: TMenuItem;
+ Help1: TMenuItem;
+ AboutItem: TMenuItem;
+ SpeedPanel: TPanel;
+ ExitBtn: TSpeedButton;
+ StatusBar: TStatusBar;
+ TextBox: TRichEdit;
+ CommentBox: TRichEdit;
+ BookCB: TComboBox;
+ CHBox: TEdit;
+ VSBox: TEdit;
+ Label1: TLabel;
+ LookupBtn: TSpeedButton;
+ TextKeyText: TLabel;
+ LDBox: TRichEdit;
+ LDTitle: TLabel;
+ Label2: TLabel;
+ LDKeyText: TLabel;
+ TextTitle: TLabel;
+ CommentTitle: TLabel;
+ PopupMenu1: TPopupMenu;
+ EastonsBibleDictionary1: TMenuItem;
+ VinesBibleDictionary1: TMenuItem;
+ Webster: TSWModule;
+ MHC: TSWModule;
+ Eastons: TSWModule;
+ Vines: TSWModule;
+ CommonKey: TSWVerseKey;
+ Button1: TButton;
+ Button2: TButton;
+ DblClkWordRtClkMouse1: TMenuItem;
+ Search1: TMenuItem;
+ NewSearchWindow1: TMenuItem;
+ procedure FormCreate(Sender: TObject);
+ procedure FileExit(Sender: TObject);
+ procedure Lookup(Sender: TObject);
+ procedure About(Sender: TObject);
+ procedure ShowHint(Sender: TObject);
+ procedure EastonsBibleDictionary1Click(Sender: TObject);
+ procedure TextBoxEnter(Sender: TObject);
+ procedure VinesBibleDictionary1Click(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure Button2Click(Sender: TObject);
+ procedure NewSearchWindow1Click(Sender: TObject);
+ private
+ curedit: TRichEdit;
+ public
+ { Public declarations }
+ end;
+
+var
+ SwordAppForm: TSwordAppForm;
+
+implementation
+
+uses SysUtils, Mapi, About, searchdlg;
+
+{$R *.DFM}
+procedure TSwordAppForm.FormCreate(Sender: TObject);
+var
+ s1: string;
+begin
+ Application.OnHint := ShowHint;
+
+ CommonKey.Text := 'Genesis 1:1';
+ while (CommonKey.Error = 0) do
+ begin
+ s1 := CommonKey.Text;
+ SetLength(s1, (Length(s1) - 4));
+ BookCB.Items.Add(s1);
+ CommonKey.Book := CommonKey.Book + 1;
+ end;
+end;
+
+
+procedure TSwordAppForm.FileExit(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSwordAppForm.Lookup(Sender: TObject);
+var
+ Buffer: PChar;
+ s1: AnsiString;
+ hkey: integer;
+begin
+ if ((StrToInt(CHBox.Text) = 0) or (StrToInt(VSBox.Text) = 0)) then
+ CommonKey.AutoNormalize := false;
+
+ CommonKey.Text := BookCB.Text + ' ' + CHBox.Text + ':' + VSBox.Text;
+ TextKeyText.Caption := CommonKey.Text;
+ TextBox.Text := Webster.Text;
+ CommentBox.Text := MHC.Text;
+
+ CommonKey.AutoNormalize := true;
+end;
+
+procedure TSwordAppForm.About(Sender: TObject);
+begin
+ AboutBox.ShowModal;
+end;
+
+procedure TSwordAppForm.ShowHint(Sender: TObject);
+begin
+ StatusBar.SimpleText := Application.Hint;
+end;
+
+procedure TSwordAppForm.EastonsBibleDictionary1Click(Sender: TObject);
+begin
+ Eastons.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Eastons (in fact, it may even not be allocated yet). We just want to set Eastons with the text and let Eastons worry about allocating keys.}
+ LDBox.Text := Eastons.Text;
+ LDKeyText.Caption := Eastons.KeyText;
+ LDTitle.Caption := Eastons.Description;
+end;
+
+procedure TSwordAppForm.TextBoxEnter(Sender: TObject);
+begin
+ curedit := TRichEdit(Sender);
+end;
+
+procedure TSwordAppForm.VinesBibleDictionary1Click(Sender: TObject);
+begin
+ Vines.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Eastons (in fact, it may even not be allocated yet). We just want to set Eastons with the text and let Eastons worry about allocating keys.}
+ LDBox.Text := Vines.Text;
+ LDKeyText.Caption := Vines.KeyText;
+ LDTitle.Caption := Vines.Description;
+end;
+
+procedure TSwordAppForm.Button1Click(Sender: TObject);
+begin
+ CommonKey.Dec;
+ TextKeyText.Caption := CommonKey.Text;
+ TextBox.Text := Webster.Text;
+ CommentBox.Text := MHC.Text;
+
+end;
+
+procedure TSwordAppForm.Button2Click(Sender: TObject);
+begin
+ CommonKey.Inc;
+ TextKeyText.Caption := CommonKey.Text;
+ TextBox.Text := Webster.Text;
+ CommentBox.Text := MHC.Text;
+
+
+end;
+
+procedure TSwordAppForm.NewSearchWindow1Click(Sender: TObject);
+begin
+ SearchForm.Show;
+end;
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo3/about.dfm b/examples/windoze/delphi20/multimo3/about.dfm
new file mode 100644
index 0000000..16013ec
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/about.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo3/about.pas b/examples/windoze/delphi20/multimo3/about.pas
new file mode 100644
index 0000000..44a8a55
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/about.pas
@@ -0,0 +1,31 @@
+unit About;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+ TAboutBox = class(TForm)
+ Panel1: TPanel;
+ OKButton: TButton;
+ ProgramIcon: TImage;
+ ProductName: TLabel;
+ Version: TLabel;
+ Copyright: TLabel;
+ Comments: TLabel;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ AboutBox: TAboutBox;
+
+implementation
+
+{$R *.DFM}
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo3/multimod.dpr b/examples/windoze/delphi20/multimo3/multimod.dpr
new file mode 100644
index 0000000..6060337
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/multimod.dpr
@@ -0,0 +1,18 @@
+program MultiMod;
+
+uses
+ Forms,
+ LogoMain in 'LogoMain.pas' {SwordAppForm},
+ About in 'ABOUT.PAS' {AboutBox},
+ searchdlg in 'searchdlg.pas' {SearchForm};
+
+{$R *.RES}
+
+begin
+ Application.Title := 'The SWORD Project';
+ Application.CreateForm(TSwordAppForm, SwordAppForm);
+ Application.CreateForm(TAboutBox, AboutBox);
+ Application.CreateForm(TSearchForm, SearchForm);
+ Application.Run;
+end.
+ \ No newline at end of file
diff --git a/examples/windoze/delphi20/multimo3/searchdlg.dfm b/examples/windoze/delphi20/multimo3/searchdlg.dfm
new file mode 100644
index 0000000..dca8382
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/searchdlg.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo3/searchdlg.pas b/examples/windoze/delphi20/multimo3/searchdlg.pas
new file mode 100644
index 0000000..7a8144d
--- /dev/null
+++ b/examples/windoze/delphi20/multimo3/searchdlg.pas
@@ -0,0 +1,35 @@
+unit searchdlg;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TSearchForm = class(TForm)
+ Edit1: TEdit;
+ Button1: TButton;
+ Button2: TButton;
+ ListBox1: TListBox;
+ Label1: TLabel;
+ procedure Button2Click(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SearchForm: TSearchForm;
+
+implementation
+
+{$R *.DFM}
+
+procedure TSearchForm.Button2Click(Sender: TObject);
+begin
+ Close;
+end;
+
+end.
diff --git a/examples/windoze/delphi20/multimo4/LogoMain.dfm b/examples/windoze/delphi20/multimo4/LogoMain.dfm
new file mode 100644
index 0000000..466ea20
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/LogoMain.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo4/LogoMain.pas b/examples/windoze/delphi20/multimo4/LogoMain.pas
new file mode 100644
index 0000000..0803d43
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/LogoMain.pas
@@ -0,0 +1,171 @@
+unit LogoMain;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, Menus,
+ Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, Grids, DBGrids, swmodule,
+ swkey, swvskey, swtxtdsp;
+
+type
+ TSwordAppForm = class(TForm)
+ MainMenu: TMainMenu;
+ FileMenu: TMenuItem;
+ FileExitItem: TMenuItem;
+ Help1: TMenuItem;
+ AboutItem: TMenuItem;
+ pnlToolbar: TPanel;
+ StatusBar: TStatusBar;
+ BookCB: TComboBox;
+ CHBox: TEdit;
+ VSBox: TEdit;
+ Label1: TLabel;
+ btnLookup: TSpeedButton;
+ lblTextKeyText: TLabel;
+ PopupMenu1: TPopupMenu;
+ EastonsBibleDictionary1: TMenuItem;
+ VinesBibleDictionary1: TMenuItem;
+ mrtWebster: TSWModule;
+ mrcMHC: TSWModule;
+ mrldEastons: TSWModule;
+ mrldVines: TSWModule;
+ vkCommonKey: TSWVerseKey;
+ DblClkWordRtClkMouse1: TMenuItem;
+ Search1: TMenuItem;
+ NewSearchWindow1: TMenuItem;
+ Bevel1: TBevel;
+ pnlMain: TPanel;
+ pnlText: TPanel;
+ lblTextTitle: TLabel;
+ pnlCommentary: TPanel;
+ lblCommentTitle: TLabel;
+ edCommentBox: TRichEdit;
+ pnlVSplitter: TPanel;
+ pnlHSplitter: TPanel;
+ pnlDictionary: TPanel;
+ edLDBox: TRichEdit;
+ pnlDcitionaryTitle: TPanel;
+ Label2: TLabel;
+ lblLDTitle: TLabel;
+ btnPreviousVerse: TButton;
+ btnNextVerse: TButton;
+ lblLDKeyText: TLabel;
+ edTextBox: TSWTextDisp;
+ procedure FormCreate(Sender: TObject);
+ procedure FileExit(Sender: TObject);
+ procedure Lookup(Sender: TObject);
+ procedure About(Sender: TObject);
+ procedure ShowHint(Sender: TObject);
+ procedure EastonsBibleDictionary1Click(Sender: TObject);
+ procedure edTextBoxEnter(Sender: TObject);
+ procedure VinesBibleDictionary1Click(Sender: TObject);
+ procedure btnPreviousVerseClick(Sender: TObject);
+ procedure btnNextVerseClick(Sender: TObject);
+ procedure NewSearchWindow1Click(Sender: TObject);
+ private
+ curedit: TRichEdit;
+ public
+ { Public declarations }
+ end;
+
+var
+ SwordAppForm: TSwordAppForm;
+
+implementation
+
+uses SysUtils, Mapi, About, searchdlg;
+
+{$R *.DFM}
+procedure TSwordAppForm.FormCreate(Sender: TObject);
+var
+ s1: string;
+begin
+ Application.OnHint := ShowHint;
+
+ vkCommonKey.Text := 'Genesis 1:1';
+ while (vkCommonKey.Error = 0) do
+ begin
+ s1 := vkCommonKey.Text;
+ SetLength(s1, (Length(s1) - 4));
+ BookCB.Items.Add(s1);
+ vkCommonKey.Book := vkCommonKey.Book + 1;
+ end;
+end;
+
+
+procedure TSwordAppForm.FileExit(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSwordAppForm.Lookup(Sender: TObject);
+var
+ Buffer: PChar;
+ s1: AnsiString;
+ hkey: integer;
+begin
+ if ((StrToInt(CHBox.Text) = 0) or (StrToInt(VSBox.Text) = 0)) then
+ vkCommonKey.AutoNormalize := false;
+
+ vkCommonKey.Text := BookCB.Text + ' ' + CHBox.Text + ':' + VSBox.Text;
+ lblTextKeyText.Caption := vkCommonKey.Text;
+ edTextBox.Display;
+ edCommentBox.Text := mrcMHC.Text;
+
+ vkCommonKey.AutoNormalize := true;
+end;
+
+procedure TSwordAppForm.About(Sender: TObject);
+begin
+ AboutBox.ShowModal;
+end;
+
+procedure TSwordAppForm.ShowHint(Sender: TObject);
+begin
+ StatusBar.SimpleText := Application.Hint;
+end;
+
+procedure TSwordAppForm.EastonsBibleDictionary1Click(Sender: TObject);
+begin
+ mrldEastons.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Eastons (in fact, it may even not be allocated yet). We just want to set Eastons with the text and let Eastons worry about allocating keys.}
+ edLDBox.Text := mrldEastons.Text;
+ lblLDKeyText.Caption := mrldEastons.KeyText;
+ lblLDTitle.Caption := mrldEastons.Description;
+end;
+
+procedure TSwordAppForm.edTextBoxEnter(Sender: TObject);
+begin
+ curedit := TRichEdit(Sender);
+end;
+
+procedure TSwordAppForm.VinesBibleDictionary1Click(Sender: TObject);
+begin
+ mrldVines.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Vines (in fact, it may even not be allocated yet). We just want to set Vines with the text and let Vines worry about allocating keys.}
+ edLDBox.Text := mrldVines.Text;
+ lblLDKeyText.Caption := mrldVines.KeyText;
+ lblLDTitle.Caption := mrldVines.Description;
+end;
+
+procedure TSwordAppForm.btnPreviousVerseClick(Sender: TObject);
+begin
+ vkCommonKey.Dec;
+ lblTextKeyText.Caption := vkCommonKey.Text;
+ edTextBox.Display;
+ edCommentBox.Text := mrcMHC.Text;
+end;
+
+procedure TSwordAppForm.btnNextVerseClick(Sender: TObject);
+begin
+ vkCommonKey.Inc;
+ lblTextKeyText.Caption := vkCommonKey.Text;
+ edTextBox.Display;
+ edCommentBox.Text := mrcMHC.Text;
+end;
+
+procedure TSwordAppForm.NewSearchWindow1Click(Sender: TObject);
+begin
+ SearchForm := TSearchForm.Create(Self);
+ SearchForm.Show;
+end;
+
+end.
+
diff --git a/examples/windoze/delphi20/multimo4/Multimod.dpr b/examples/windoze/delphi20/multimo4/Multimod.dpr
new file mode 100644
index 0000000..be232ac
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/Multimod.dpr
@@ -0,0 +1,17 @@
+program MultiMod;
+
+uses
+ Forms,
+ LogoMain in 'LogoMain.pas' {SwordAppForm},
+ About in 'ABOUT.PAS' {AboutBox},
+ Searchdlg in 'Searchdlg.pas' {SearchForm};
+
+{$R *.RES}
+
+begin
+ Application.Title := 'The SWORD Project';
+ Application.CreateForm(TSwordAppForm, SwordAppForm);
+ Application.CreateForm(TAboutBox, AboutBox);
+// Application.CreateForm(TSearchForm, SearchForm);
+ Application.Run;
+end.
diff --git a/examples/windoze/delphi20/multimo4/Searchdlg.dfm b/examples/windoze/delphi20/multimo4/Searchdlg.dfm
new file mode 100644
index 0000000..6b8b7a8
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/Searchdlg.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo4/Searchdlg.pas b/examples/windoze/delphi20/multimo4/Searchdlg.pas
new file mode 100644
index 0000000..1cf83fc
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/Searchdlg.pas
@@ -0,0 +1,60 @@
+unit searchdlg;
+
+interface
+
+uses
+ SWKey, Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TSearchForm = class(TForm)
+ Edit1: TEdit;
+ Button1: TButton;
+ Button2: TButton;
+ ListBox1: TListBox;
+ Label1: TLabel;
+ procedure Button2Click(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure ListBox1DblClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SearchForm: TSearchForm;
+
+implementation
+
+uses LogoMain;
+
+{$R *.DFM}
+
+procedure TSearchForm.Button2Click(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSearchForm.Button1Click(Sender: TObject);
+var
+ results:TSWKey;
+begin
+ ListBox1.Clear;
+ results := SwordAppForm.mrtWebster.Search(PChar(Edit1.Text));
+ while (results.Error = 0) do
+ begin
+ ListBox1.Items.Add(results.text);
+ results.Inc;
+ end;
+end;
+
+procedure TSearchForm.ListBox1DblClick(Sender: TObject);
+begin
+ SwordAppForm.vkcommonkey.text := ListBox1.items[listbox1.itemindex];
+ SwordAppForm.lblTextKeyText.Caption := SwordAppForm.vkCommonKey.Text;
+ SwordAppForm.edTextBox.Display;
+ SwordAppForm.edCommentBox.Text := SwordAppForm.mrcMHC.Text;
+end;
+
+end.
diff --git a/examples/windoze/delphi20/multimo4/about.dfm b/examples/windoze/delphi20/multimo4/about.dfm
new file mode 100644
index 0000000..16013ec
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/about.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/multimo4/about.pas b/examples/windoze/delphi20/multimo4/about.pas
new file mode 100644
index 0000000..44a8a55
--- /dev/null
+++ b/examples/windoze/delphi20/multimo4/about.pas
@@ -0,0 +1,31 @@
+unit About;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+ TAboutBox = class(TForm)
+ Panel1: TPanel;
+ OKButton: TButton;
+ ProgramIcon: TImage;
+ ProductName: TLabel;
+ Version: TLabel;
+ Copyright: TLabel;
+ Comments: TLabel;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ AboutBox: TAboutBox;
+
+implementation
+
+{$R *.DFM}
+
+end.
+
diff --git a/examples/windoze/delphi20/svertf/LogoMain.dfm b/examples/windoze/delphi20/svertf/LogoMain.dfm
new file mode 100644
index 0000000..4cc49ef
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/LogoMain.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/svertf/LogoMain.pas b/examples/windoze/delphi20/svertf/LogoMain.pas
new file mode 100644
index 0000000..78ec426
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/LogoMain.pas
@@ -0,0 +1,170 @@
+unit LogoMain;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, Menus,
+ Dialogs, StdCtrls, Buttons, ExtCtrls, ComCtrls, Grids, DBGrids, swmodule,
+ swkey, swvskey, swtxtdsp;
+
+type
+ TSwordAppForm = class(TForm)
+ MainMenu: TMainMenu;
+ FileMenu: TMenuItem;
+ FileExitItem: TMenuItem;
+ Help1: TMenuItem;
+ AboutItem: TMenuItem;
+ pnlToolbar: TPanel;
+ StatusBar: TStatusBar;
+ BookCB: TComboBox;
+ CHBox: TEdit;
+ VSBox: TEdit;
+ Label1: TLabel;
+ btnLookup: TSpeedButton;
+ lblTextKeyText: TLabel;
+ PopupMenu1: TPopupMenu;
+ EastonsBibleDictionary1: TMenuItem;
+ VinesBibleDictionary1: TMenuItem;
+ mrtWebster: TSWModule;
+ mrcMHC: TSWModule;
+ mrldEastons: TSWModule;
+ mrldVines: TSWModule;
+ vkCommonKey: TSWVerseKey;
+ DblClkWordRtClkMouse1: TMenuItem;
+ Search1: TMenuItem;
+ NewSearchWindow1: TMenuItem;
+ Bevel1: TBevel;
+ pnlMain: TPanel;
+ pnlText: TPanel;
+ lblTextTitle: TLabel;
+ pnlCommentary: TPanel;
+ lblCommentTitle: TLabel;
+ edCommentBox: TRichEdit;
+ pnlVSplitter: TPanel;
+ pnlHSplitter: TPanel;
+ pnlDictionary: TPanel;
+ edLDBox: TRichEdit;
+ pnlDcitionaryTitle: TPanel;
+ Label2: TLabel;
+ lblLDTitle: TLabel;
+ btnPreviousVerse: TButton;
+ btnNextVerse: TButton;
+ lblLDKeyText: TLabel;
+ edTextBox: TSWTextDisp;
+ procedure FormCreate(Sender: TObject);
+ procedure FileExit(Sender: TObject);
+ procedure Lookup(Sender: TObject);
+ procedure About(Sender: TObject);
+ procedure ShowHint(Sender: TObject);
+ procedure EastonsBibleDictionary1Click(Sender: TObject);
+ procedure edTextBoxEnter(Sender: TObject);
+ procedure VinesBibleDictionary1Click(Sender: TObject);
+ procedure btnPreviousVerseClick(Sender: TObject);
+ procedure btnNextVerseClick(Sender: TObject);
+ procedure NewSearchWindow1Click(Sender: TObject);
+ private
+ curedit: TRichEdit;
+ public
+ { Public declarations }
+ end;
+
+var
+ SwordAppForm: TSwordAppForm;
+
+implementation
+
+uses SysUtils, Mapi, About, searchdlg;
+
+{$R *.DFM}
+procedure TSwordAppForm.FormCreate(Sender: TObject);
+var
+ s1: string;
+begin
+ Application.OnHint := ShowHint;
+
+ vkCommonKey.Text := 'Genesis 1:1';
+ while (vkCommonKey.Error = 0) do
+ begin
+ s1 := vkCommonKey.Text;
+ SetLength(s1, (Length(s1) - 4));
+ BookCB.Items.Add(s1);
+ vkCommonKey.Book := vkCommonKey.Book + 1;
+ end;
+end;
+
+
+procedure TSwordAppForm.FileExit(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSwordAppForm.Lookup(Sender: TObject);
+var
+ Buffer: PChar;
+ s1: AnsiString;
+ hkey: integer;
+begin
+ if ((StrToInt(CHBox.Text) = 0) or (StrToInt(VSBox.Text) = 0)) then
+ vkCommonKey.AutoNormalize := false;
+
+ vkCommonKey.Text := BookCB.Text + ' ' + CHBox.Text + ':' + VSBox.Text;
+ lblTextKeyText.Caption := vkCommonKey.Text;
+ edTextBox.Display;
+ edCommentBox.Text := mrcMHC.Text;
+
+ vkCommonKey.AutoNormalize := true;
+end;
+
+procedure TSwordAppForm.About(Sender: TObject);
+begin
+ AboutBox.ShowModal;
+end;
+
+procedure TSwordAppForm.ShowHint(Sender: TObject);
+begin
+ StatusBar.SimpleText := Application.Hint;
+end;
+
+procedure TSwordAppForm.EastonsBibleDictionary1Click(Sender: TObject);
+begin
+ mrldEastons.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Eastons (in fact, it may even not be allocated yet). We just want to set Eastons with the text and let Eastons worry about allocating keys.}
+ edLDBox.Text := mrldEastons.Text;
+ lblLDKeyText.Caption := mrldEastons.KeyText;
+ lblLDTitle.Caption := mrldEastons.Description;
+end;
+
+procedure TSwordAppForm.edTextBoxEnter(Sender: TObject);
+begin
+ curedit := TRichEdit(Sender);
+end;
+
+procedure TSwordAppForm.VinesBibleDictionary1Click(Sender: TObject);
+begin
+ mrldVines.KeyText := Trim(curedit.SelText); { we use .KeyText instead of Key.Text because we don't care about accessing the actual key in Vines (in fact, it may even not be allocated yet). We just want to set Vines with the text and let Vines worry about allocating keys.}
+ edLDBox.Text := mrldVines.Text;
+ lblLDKeyText.Caption := mrldVines.KeyText;
+ lblLDTitle.Caption := mrldVines.Description;
+end;
+
+procedure TSwordAppForm.btnPreviousVerseClick(Sender: TObject);
+begin
+ vkCommonKey.Dec;
+ lblTextKeyText.Caption := vkCommonKey.Text;
+ edTextBox.Display;
+ edCommentBox.Text := mrcMHC.Text;
+end;
+
+procedure TSwordAppForm.btnNextVerseClick(Sender: TObject);
+begin
+ vkCommonKey.Inc;
+ lblTextKeyText.Caption := vkCommonKey.Text;
+ edTextBox.Display;
+ edCommentBox.Text := mrcMHC.Text;
+end;
+
+procedure TSwordAppForm.NewSearchWindow1Click(Sender: TObject);
+begin
+ SearchForm.Show;
+end;
+
+end.
+
diff --git a/examples/windoze/delphi20/svertf/Multimod.dpr b/examples/windoze/delphi20/svertf/Multimod.dpr
new file mode 100644
index 0000000..d4986dc
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/Multimod.dpr
@@ -0,0 +1,17 @@
+program MultiMod;
+
+uses
+ Forms,
+ LogoMain in 'LogoMain.pas' {SwordAppForm},
+ About in 'ABOUT.PAS' {AboutBox},
+ Searchdlg in 'Searchdlg.pas' {SearchForm};
+
+{$R *.RES}
+
+begin
+ Application.Title := 'The SWORD Project';
+ Application.CreateForm(TSwordAppForm, SwordAppForm);
+ Application.CreateForm(TAboutBox, AboutBox);
+ Application.CreateForm(TSearchForm, SearchForm);
+ Application.Run;
+end.
diff --git a/examples/windoze/delphi20/svertf/Searchdlg.dfm b/examples/windoze/delphi20/svertf/Searchdlg.dfm
new file mode 100644
index 0000000..a46702e
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/Searchdlg.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/svertf/Searchdlg.pas b/examples/windoze/delphi20/svertf/Searchdlg.pas
new file mode 100644
index 0000000..0e8475f
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/Searchdlg.pas
@@ -0,0 +1,59 @@
+unit searchdlg;
+
+interface
+
+uses
+ SWKey, Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ StdCtrls;
+
+type
+ TSearchForm = class(TForm)
+ Edit1: TEdit;
+ Button1: TButton;
+ Button2: TButton;
+ ListBox1: TListBox;
+ Label1: TLabel;
+ procedure Button2Click(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure ListBox1DblClick(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ SearchForm: TSearchForm;
+
+implementation
+
+uses LogoMain;
+
+{$R *.DFM}
+
+procedure TSearchForm.Button2Click(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TSearchForm.Button1Click(Sender: TObject);
+var
+ results:TSWKey;
+begin
+ results := SwordAppForm.mrtWebster.Search(PChar(Edit1.Text));
+ while (results.Error = 0) do
+ begin
+ ListBox1.Items.Add(results.text);
+ results.Inc;
+ end;
+end;
+
+procedure TSearchForm.ListBox1DblClick(Sender: TObject);
+begin
+ SwordAppForm.vkcommonkey.text := ListBox1.items[listbox1.itemindex];
+ SwordAppForm.lblTextKeyText.Caption := SwordAppForm.vkCommonKey.Text;
+ SwordAppForm.edTextBox.Display;
+ SwordAppForm.edCommentBox.Text := SwordAppForm.mrcMHC.Text;
+end;
+
+end.
diff --git a/examples/windoze/delphi20/svertf/about.dfm b/examples/windoze/delphi20/svertf/about.dfm
new file mode 100644
index 0000000..16013ec
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/about.dfm
Binary files differ
diff --git a/examples/windoze/delphi20/svertf/about.pas b/examples/windoze/delphi20/svertf/about.pas
new file mode 100644
index 0000000..44a8a55
--- /dev/null
+++ b/examples/windoze/delphi20/svertf/about.pas
@@ -0,0 +1,31 @@
+unit About;
+
+interface
+
+uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+ TAboutBox = class(TForm)
+ Panel1: TPanel;
+ OKButton: TButton;
+ ProgramIcon: TImage;
+ ProductName: TLabel;
+ Version: TLabel;
+ Copyright: TLabel;
+ Comments: TLabel;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ AboutBox: TAboutBox;
+
+implementation
+
+{$R *.DFM}
+
+end.
+