DavidR Contributor

Joined: 05 Aug 2003 Posts: 83 Location: Bethel Pennsylvania U.S.A.
|
Posted: Tue Jul 11, 2006 10:31 pm Post subject: More DDE help needed! |
|
|
I've got what seems to be a simple problem that's driving me absolutely crazy! The documentation with VDS indicates the following
"
The DDE server application can set the text of a DDEITEM dialog
element using the usual DIALOG SET command. This text can then be
read by a DDE client that has established a DDE link with the server,
by using the @DDEITEM() function with the name of the element as the
function argument."
I've not been able to do this at all. I've included a very slightly modified example of the dde server demo included with VDS.
The DDEITEM "Text" should contain the value "Hello" when I do INFO @DLGTEXT(Text) but it doesn't. It actually contains the name of the Dialog "DDE Server". I can read this value from the client and I can poke it to anything I want from the client but I need to be able to change the values "on the fly" from within the server app.
I've got the feeling that I'm overlooking something really simple here. What is it?
............David
| Code: | title DDE Test Server
DIALOG CREATE,DDE Server,0,0,320,64,DDESERVER Test
DIALOG ADD,TEXT,STATUS,10,10
DIALOG ADD,DDEITEM,Text
DIALOG SHOW
REM this line should set the ddeitem to "hello"
DIALOG SET,Text,Hello
REM This should return Hello but instead returns DDE Server
INFO @DLGTEXT(Text)
:loop
option errortrap
wait event
goto @event()
:close
stop
:ddemacro
%M = @ddemac()
%P = @pos(" ",%M)
if @zero(%P)
%C = %M
else
%C = @substr(%M,1,@pred(%P))
%M = @trim(@substr(%M,%P,255))
end
option errortrap,invcommand
goto %C
:textpokedata
dialog set,status,Text @chr(34)@dlgtext(Text)@chr(34) poked
window activate,DDE Server
goto loop
:invcommand
dialog set,status,Invalid DDE macro: %C
window activate,DDE Server
goto loop
:fileopen
dialog set,status,Executing: %C %M
shell open,%M
goto loop
:loadtext
dialog set,status,Executing: %C %M
dialog set,Text,%M
goto loop
|
|
|
JerryDee Contributor


Joined: 19 Oct 2005 Posts: 53 Location: Czech Republic
|
Posted: Wed Jul 12, 2006 10:22 pm Post subject: DDE |
|
|
I believe, for this type of communication you have need to make 2 completely separate programs, the Server and the Client. _________________ Jerry
(VDS 4,5,6 Pro | V-Setup 3) |
|