summaryrefslogtreecommitdiff
path: root/apps/windoze/CBuilder4/BibleCS/ddetest/DDEClientForm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'apps/windoze/CBuilder4/BibleCS/ddetest/DDEClientForm.cpp')
-rw-r--r--apps/windoze/CBuilder4/BibleCS/ddetest/DDEClientForm.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/windoze/CBuilder4/BibleCS/ddetest/DDEClientForm.cpp b/apps/windoze/CBuilder4/BibleCS/ddetest/DDEClientForm.cpp
new file mode 100644
index 0000000..4024da2
--- /dev/null
+++ b/apps/windoze/CBuilder4/BibleCS/ddetest/DDEClientForm.cpp
@@ -0,0 +1,46 @@
+//---------------------------------------------------------------------------
+#include <vcl\vcl.h>
+#pragma hdrstop
+
+#include "DDEClientForm.h"
+//---------------------------------------------------------------------------
+#pragma resource "*.dfm"
+TForm1 *Form1;
+//---------------------------------------------------------------------------
+__fastcall TForm1::TForm1(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Button1Click(TObject *Sender)
+{
+ if (DdeClientConv1->SetLink("sword","Bible")) {
+ Application->MessageBox("DDE Link Successful!","DDE Information",MB_OK);
+ DdeClientItem1->DdeItem = "Lookup";
+ DdeClientItem2->DdeItem = "Search";
+ }
+ else {
+ MessageBox(Handle,"DDE Link Unsuccessful","DDE Information", MB_OK | MB_ICONERROR);
+ }
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::DdeClientItem1Change(TObject *Sender)
+{
+ Memo1->Text = DdeClientItem1->Text;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::DdeClientItem2Change(TObject *Sender)
+{
+ Memo2->Text = DdeClientItem2->Text;
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Button2Click(TObject *Sender)
+{
+ DdeClientConv1->PokeData("Lookup", Edit1->Text.c_str());
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::Button3Click(TObject *Sender)
+{
+ DdeClientConv1->PokeData("Search", Edit2->Text.c_str());
+}
+//--------------------------------------------------------------------------- \ No newline at end of file