HAMMAP DDE-Interface                                        HAMMAP V5.0b
====================                                        Gerhard Berg
File: HM-DDE.TXT                                            DJ6FM


HAMMAP for Windows provides a DDE interface for program extensions.
The DDE interface may be used by other programs under the following
conditions:

- The program must be public domain and not commercially distributed.
- HAMMAP itself may NOT be distributed together with the program
  without permission of the HAMMAP author.
- A copy of the program must be provided to the HAMMAP author.
- The HAMMAP author is not liable for any damage caused by HAMMAP.


Technical Definitions
=====================

HAMMAP is a DDE-Source (Server).

Application: HMWIN
Topic:       MAP
Item:        RESULT  (contains results of commands)
             STATION (contains the selected station)


Command Syntax (Link-Execute):
==============================

Information Commands:
---------------------
GetStn[:[n][,Mode]]             - Return call of nth [next] station
                                  in current area
                                  Mode: 0=without Filter, 1=with Filter
GetStnLines:Call                - Return available lines (0...9)
                                  for specified station
GetStnInfo:Call[,[Line][,Mode]] - Return Info for specified station
GetLinks:Call[,Mode]            - Return Links for specified Station
                                  Mode: 0=without Filter, 1=with Filter
GetLinkInfo:Call1,Call2[,Mode]  - Return Info for specified Link
GetRoute:Call1,Call2            - Return Route between specified stations
GetCoord                        - Return current coordinates
                                  (xmin,ymin,xmax,ymax)
GetSize                         - Return MapWidth,MapHeight,
                                  WindowWidth,WindowHeight,
                                  PrintWidth,PrintHeight
CopyMap                         - Copy Map to Clipboard


Mode=0: return Status,Type,Hardware,Software as 2 character abbreviation
        return date as yymm
Mode=1: return Status,Type,Hardware,Software with full text
        return date as mm.yy


Draw Commands:
--------------
SelStn:Call                           - Select Station
DrawStn:Call[,Color]                  - Draw Station
MarkStn:Call[,Color]                  - Mark Station (Write Callsign)
DrawLink:Call1,Call2[,Color,Pattern]  - DrawLink
DrawMap[:xmin,ymin,xmax,ymax]         - Draw Map (default: Current Coordinates)
PrintMap[:xmin,ymin,xmax,ymax]        - Print Map (default: Current Coordinates)

Color:   Color Nr 0...15 (default: HAMMAP color)
Pattern: Pattern Nr. 0...6 (see Visual Basic DrawStyle Property)


System Commands:
----------------
Noop                            - No Operation (use to test link)
Test:String                     - Test: Return specified String
GetVer                          - Return HAMMAP Version (e.g. 5.0)
GetStnAbv:n                     - Return station abbreviations (n=1-5)
                                  1=Stations-Status, 2=Stations-Typ
                                  3=Software, 4=Hardware, 5=Link-Status
GetMsg:MsgNr                    - Return specified message
GetMsgFile                      - Return message file name
GetHlpFile                      - Return help file name
GetParFile                      - Return parameter file name
GetPar:ParName[,Id]             - Return value of specified parameter
SetPar:ParName=Value            - Set Parameter to specified value

The SETPAR commands should be used only with full understanding 
of the HAMMAP program, because some parameters must not be modified
through the DDE interface. The parameter assignments may change with 
future versions of HAMMAP.


Return values:
--------------
In case of no error, HAMMAP returns a positive acknowledge and the
specified result (if any) or an empty string.
In case of an error HAMMAP returns a negative acknowledge and one
of the following error codes:

-4 - bad command
-3 - bad parameter (out of range)
-2 - I/O-error
-1 - busy
0  - ok (or empty string)
1  - QTH of station not in actual area
2  - unknown QTH
3  - station not found
4  - bad callsign format
5  - link not found
6  - no route found


Demo Program
============
The program HM-DDE can be used to examine the DDE interface of HAMMAP.
