🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
1 messages
1 total messages Started by JimG Fri, 19 May 2000 00:00
DDE Server help
#1147
Author: JimG
Date: Fri, 19 May 2000 00:00
94 lines
2836 bytes
I am having trouble getting my BCB3 application to be a DDE server.  I am
using Excel to test with and it gives me the #REF! error.  Itried using the
DDESpy and it appears to see conversations but I'm not sure what it's
telling me.  It appears that what I have done is somewhat working because I
get the OnChange event that is supposed to happen before the message is sent
to the client.  Hear is my test code:

#include <vcl.h>
#pragma hdrstop
#include <stdio.h>
#include "DDEserver.h"
file://---------------------------------------------------------------------
-----
-
#pragma package(smart_init)
#pragma resource "*.dfm"
TDMDDE *DMDDE;

// some text to send
const char *msg[] = {
    "zero",
    "one",
    "two",
    "three",
    "four",
    "five",
    "six",
    "seven",
    "eight",
    "nine",
    "ten"};



file://---------------------------------------------------------------------
-----
-
__fastcall TDMDDE::TDMDDE(TComponent* Owner)
    : TDataModule(Owner)
{
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::SensorsOpen(TObject *Sender)
{
    file://ShowMessage("DDE Open");
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::SensorsClose(TObject *Sender)
{
    file://ShowMessage("DDE Close");
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::Timer1Timer(TObject *Sender)
{
    static int i=0;

// change the text to trigger the OnChange event
    Address1->Text = msg[i];
    if(++i > 9)
        i = 0;
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::Address1Change(TObject *Sender)
{
    // just here to see that it happens
    char i;
    i=0;
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::Address1PokeData(TObject *Sender)
{
    ShowMessage("DDE Poke");
}
file://---------------------------------------------------------------------
-----
-

void __fastcall TDMDDE::SensorsExecuteMacro(TObject *Sender, TStrings *Msg)
{
    ShowMessage("DDE Macro");
}
file://---------------------------------------------------------------------
-----
-
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads