Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

I'm DDEsperate... (OpenInsight Specific)

At 12 APR 1999 03:17:03PM Oystein Reigem wrote:

If you have the slightest experience with DDE please have a look at this. Any ideas welcome!

I have this image viewer I want to use as a DDE server. (I want my OI app to tell a running instance of the viewer to show a particular image file.)

Last week I thought I had it nailed, but now I'm back to square one. I just cannot seem to get a connection. I set DDESERVICE with the correct parameter, and DDETOPIC with ditto. But when I check DDEERROR I have 0x400a, which is DMLERR_NO_CONV_ESTABLISHED.

I have a DDE test program I got with the viewer. That program manages to set up a connection. And if I try from my app afterwards my app manages it too - even if I close the test program before I run my app.

(That must have been what happened last week when I thought my app worked. I must have run the test program first. When my app does manage to get a connection I get DMLERR_NO_CONV_ESTABLISHED after DDESERVICE and 0 after DDETOPIC. Or I get 0 after both. Both is fine.)

If I try with my app first instead, connection fails. And if I try the test program afterwards, most often that can't do it either, unless I close my app first. That seems to reset things so the test program succeeds.

I guess most of this behaviour can be explained if you know more about how DDE and Windows work than I do. But what about that crucial point of getting a connection in the first place?

- Oystein -


At 12 APR 1999 03:38PM Steve C. wrote:

Oystein,

Why are you trying to use a "viewer" with DDE? What are

you trying to do that OI can't display/handle?

Steve C.


At 13 APR 1999 04:39AM Oystein Reigem wrote:

Steve,

We started to use a separate viewer because at the time OI couldn't show other formats than BMP. And still OI cannot show all the possible formats our users might want. (They use the images for more than just "illustrations" for database data, and must be free to choose the format they want.) E.g TIFF isn't supported. Or actually I don't know that. I haven't really tried. TIFF isn't mentioned in the docs, but neither is JPEG, which is supported. (Not docced - sounds familiar?) But at least I do know that some flavours of JPEG and GIF aren't supported. And I expect OI always to lag behind when it comes to supported formats and flavours.

Also OI doesn't show scaled images well, and users must be allowed to zoom in and out freely.

And some of our users may still run Windows with 256 colours, and at least last time I tried to run with that Windows setting OI did an awful job with colours.

And OI cannot print images. I think.

- Oystein -

PS. I'm still DDEsperate…


At 13 APR 1999 11:58AM Mark Glicksman wrote:

I don't know if this will help, but here is the subroutine that

I use to send messages to the AutoCAD editline. I start AutoCAD

from the Create event of my main window "MAINMENU" ACAD_SEND_EDITLINE

and ACAD_RECEIVE_EDITLINE are hidden controls in MAINMENU whose only

function is to send and receive data from AutoCAD. Works Great.

Mark Glicksman

Glenside, PA

*Sends a message to the AutoCAD Release 14 command line using DDE

*

Declare function Set_Property

*

Retval=Set_Property("MAINMENU.ACAD_SEND_EDITLINE", 'DDESERVICE', 'AUTOCAD.R14.DDE')

Retval=Set_Property("MAINMENU.ACAD_SEND_EDITLINE", 'DDETOPIC', 'SYSTEM')

Retval=Set_Property("MAINMENU.ACAD_SEND_EDITLINE", 'DDELINK', 'AUTO')

Retval=Set_Property("MAINMENU.ACAD_SEND_EDITLINE", 'DDECOMMAND' ,MsgTxt)

Retval=Set_Property("MAINMENU.ACAD_SEND_EDITLINE", 'DDELINK', 'OFF')

Return


At 14 APR 1999 07:57AM Oystein Reigem wrote:

Mark,

Thanks!

I think the problem is solved now. It turned out there was some case conversion/sensitivity business with the DDE service name in the server app (the viewer program). My code was probably right all the time.

But I'm still very grateful for your reply. You see when the developer of the image program finally suspected what was the cause of my problems, he sent me a new version of the viewer to test out his theory. And then I must have used an older version instead! I first did several tests, with different versions of the viewer, none of them involving my OI app. And then, in the crucial test where I tried to connect with my own app I must have had an older version of the viewer running.

The failure then seemed to be the final nail in the coffin. And then I read your reply. Even if thought your code wasn't significantly different from my own I decided to give it a try. And it worked! And then my own code worked too!! And I couldn't get it to fail!!!

If it wasn't for your response I just might have given up the whole thing!

- Oystein -

PS. I'm not 100% convinced the problem's solved yet. There might be some unknown factor. Perhaps the acid test is how my app performs after I've posted this… :-)


At 15 APR 1999 11:56AM Mark Glicksman wrote:

Well, I'm very glad I could help. I've gotten so much wonderful

help from the fine folks who frequent this discussion. Finally,

I was able to be a contributor and not just a recipient.

Best wishes,

Mark Glicksman

Glenside, PA

View this thread on the forum...