MyClient.cpp
上传用户:lulishicai
上传日期:2010-03-01
资源大小:13202k
文件大小:1k
源码类别:
Delphi/CppBuilder
开发平台:
C++ Builder
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "MyClient.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TClientForm *ClientForm;
- //---------------------------------------------------------------------------
- __fastcall TClientForm::TClientForm(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TClientForm::Button1Click(TObject *Sender)
- {
- DdeClientConv1->SetLink("Server","DdeServerConv1");
- DdeClientItem1->DdeItem="DdeServerItem1";
- }
- //---------------------------------------------------------------------------
- void __fastcall TClientForm::DdeClientItem1Change(TObject *Sender)
- {
- Memo1->Lines=DdeClientItem1->Lines;
- }
- //---------------------------------------------------------------------------
- void __fastcall TClientForm::Button2Click(TObject *Sender)
- {
- TDdeClientConv *DdeClient;
- DdeClient=DdeClientItem1->DdeConv;
- if(DdeClient!=NULL)
- DdeClient->PokeDataLines("DdeServerItem1",Memo2->Lines);
- }
- //---------------------------------------------------------------------------
- void __fastcall TClientForm::Button3Click(TObject *Sender)
- {
- Application->Terminate();
- }
- //---------------------------------------------------------------------------