forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


More DDE help needed!

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DavidR
Contributor
Contributor


Joined: 05 Aug 2003
Posts: 83
Location: Bethel Pennsylvania U.S.A.

PostPosted: Tue Jul 11, 2006 10:31 pm    Post subject: More DDE help needed! Reply with quote

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
Back to top
View user's profile Send private message
JerryDee
Contributor
Contributor


Joined: 19 Oct 2005
Posts: 53
Location: Czech Republic

PostPosted: Wed Jul 12, 2006 10:22 pm    Post subject: DDE Reply with quote

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)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group