home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / etkdoc.zip / ETKE.TXT < prev   
Text File  |  1993-01-13  |  257KB  |  10,097 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                          PROGRAMMERS GUIDE TO THE E EDITOR TOOLKIT. VERSION 2.0
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                                                January 13, 1993
  22.  
  23.  
  24.                                        Gennaro (Jerry) Cuomo (GCUOMO at YKTVMV)
  25.                                                Jason Crawford (JASON at YKTVMV)
  26.                                                   John Ponzo (JPONZO at YKTVMV)
  27.  
  28.  
  29.                                                       OS/2 Applications & Tools
  30.                                                 IBM T.J. Watson Research Center
  31.                                                                    P.O. Box 218
  32.                                                      Yorktown Heights, NY 10958
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.   -----------------------------------------------------------------------------
  129.   ii  Programmers Guide to the E Editor Toolkit. Version 2.0
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.   CONTENTS
  139.   ________
  140.  
  141.  
  142.  
  143.  
  144.  
  145.                       DISCLAIMER - READ FIRST!   . . . . . . . . . . . . . .  1
  146.  
  147.                       INTRODUCTION.  . . . . . . . . . . . . . . . . . . . .  3
  148.  
  149.                       WRITTING PROGRAMS USING THE E TOOLKIT  . . . . . . . .  5
  150.  
  151.                       GETTING STARTED.   . . . . . . . . . . . . . . . . . .  7
  152.                       ETKExxx.DLL - The "Heart" of the E-Toolkit   . . . . .  7
  153.                       ETKRxxx.DLL - Utility Resources  . . . . . . . . . . .  7
  154.                       E-Macros - Utility Resources   . . . . . . . . . . . .  8
  155.                       Your Application/Sample Programs   . . . . . . . . . .  8
  156.                       Special Notes!!!   . . . . . . . . . . . . . . . . . .  9
  157.  
  158.                       E TOOLKIT FUNCTIONS AT A GLANCE.   . . . . . . . . .   11
  159.                       Register, Create, Delete functions (The basics)  . .   11
  160.                       Special Access- E-MLE Manipulation   . . . . . . . .   11
  161.  
  162.                       REGISTER, CREATE, DELETE FUNCTIONS (THE BASICS)  . .   15
  163.                       EtkRegister  . . . . . . . . . . . . . . . . . . . .   16
  164.                       EtkCreate  . . . . . . . . . . . . . . . . . . . . .   17
  165.                       EtkDestroy   . . . . . . . . . . . . . . . . . . . .   19
  166.                       EtkVersion   . . . . . . . . . . . . . . . . . . . .   20
  167.  
  168.                       SPECIAL ACCESS FUNCTIONS- E-MLE MANIPULATION   . . .   21
  169.                       Event Execution.   . . . . . . . . . . . . . . . . .   21
  170.                       EtkExecuteCommand  . . . . . . . . . . . . . . . . .   22
  171.                       EtkProcessEditKey  . . . . . . . . . . . . . . . . .   23
  172.                       Text Manipulation  . . . . . . . . . . . . . . . . .   25
  173.                       EtkQueryText   . . . . . . . . . . . . . . . . . . .   26
  174.                       EtkDeleteText  . . . . . . . . . . . . . . . . . . .   27
  175.                       EtkReplaceText   . . . . . . . . . . . . . . . . . .   28
  176.                       EtkInsertText  . . . . . . . . . . . . . . . . . . .   29
  177.                       EtkQueryTextBuffer   . . . . . . . . . . . . . . . .   30
  178.                       EtkInsertTextBuffer  . . . . . . . . . . . . . . . .   31
  179.                       EtkFindAttribute.  . . . . . . . . . . . . . . . . .   32
  180.                       Text Selection.  . . . . . . . . . . . . . . . . . .   33
  181.                       EtkQuerySelectionType  . . . . . . . . . . . . . . .   34
  182.                       EtkQuerySelection  . . . . . . . . . . . . . . . . .   35
  183.                       EtkSetSelection  . . . . . . . . . . . . . . . . . .   37
  184.                       File Information   . . . . . . . . . . . . . . . . .   39
  185.                       EtkQueryFileID   . . . . . . . . . . . . . . . . . .   40
  186.                       EtkSetFileField  . . . . . . . . . . . . . . . . . .   41
  187.                       EtkQueryFileField  . . . . . . . . . . . . . . . . .   42
  188.  
  189.                       E TOOLKIT MESSAGES   . . . . . . . . . . . . . . . .   45
  190.                       EPM_FRAME_STATUSLINE   . . . . . . . . . . . . . . .   48
  191.                       EPM_FRAME_MESSAGELINE  . . . . . . . . . . . . . . .   50
  192.                       EPM_EDIT_VERSION   . . . . . . . . . . . . . . . . .   51
  193.  
  194.  
  195.   -----------------------------------------------------------------------------
  196.                                                                   Contents  iii
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                       EPM_EDIT_TURN_OFF_HIGHLIGHT  . . . . . . . . . . . .   52
  206.                       EPM_EDIT_QUERY_HELP_INSTANCE   . . . . . . . . . . .   53
  207.                       EPM_BROADCASTHELP  . . . . . . . . . . . . . . . . .   54
  208.                       EPM_EDIT_DELETEFILE  . . . . . . . . . . . . . . . .   55
  209.                       EPM_EDIT_ACTIVATEFILEID  . . . . . . . . . . . . . .   56
  210.                       EPM_EDIT_CHAR  . . . . . . . . . . . . . . . . . . .   57
  211.                       EPM_EDIT_CLIPBOARDCOPY   . . . . . . . . . . . . . .   58
  212.                       EPM_EDIT_COMMAND   . . . . . . . . . . . . . . . . .   59
  213.                       EPM_EDIT_COMMAND2  . . . . . . . . . . . . . . . . .   61
  214.                       EPM_EDIT_CHANGEFONT  . . . . . . . . . . . . . . . .   62
  215.                       EPM_EDIT_TASKLIST  . . . . . . . . . . . . . . . . .   63
  216.                       EPM_EDIT_RETCODE   . . . . . . . . . . . . . . . . .   64
  217.                       EPM_EDIT_CURSORMOVE  . . . . . . . . . . . . . . . .   65
  218.                       EPM_EDIT_ACTIVEHWND  . . . . . . . . . . . . . . . .   66
  219.                       EPM_EDIT_OPTIONS   . . . . . . . . . . . . . . . . .   67
  220.                       EPM_EDIT_ID  . . . . . . . . . . . . . . . . . . . .   70
  221.                       EPM_EDIT_SHOW  . . . . . . . . . . . . . . . . . . .   71
  222.                       EPM_EDIT_NEWFILE   . . . . . . . . . . . . . . . . .   72
  223.                       EPM_EDIT_DESTROYNOTIFY   . . . . . . . . . . . . . .   74
  224.                       EPM_EXTRAWINDOW_REFRESH  . . . . . . . . . . . . . .   75
  225.                       EPM_EDIT_CONTROLTOGGLE   . . . . . . . . . . . . . .   76
  226.                       EPM_EDIT_RECORDKEY-  . . . . . . . . . . . . . . . .   78
  227.                       EPM_EDIT_ENDRECORDKEY-   . . . . . . . . . . . . . .   79
  228.                       EPM_EDIT_PLAYKEY   . . . . . . . . . . . . . . . . .   80
  229.                       EPM_EDIT_QUERYRECORDKEY  . . . . . . . . . . . . . .   81
  230.                       EPM_EDIT_ASKTOQUIT   . . . . . . . . . . . . . . . .   82
  231.                       EPM_EDIT_ASKTOCLOSE  . . . . . . . . . . . . . . . .   83
  232.                       EPM_EDIT_ASKTODONE   . . . . . . . . . . . . . . . .   84
  233.                       EPM_EDIT_ASKTOFAILED   . . . . . . . . . . . . . . .   85
  234.  
  235.                       ERES.DLL   . . . . . . . . . . . . . . . . . . . . .   87
  236.                       ERES.DLL - Exported Functions  . . . . . . . . . . .   88
  237.                       ERESRegisterEtkFunctions   . . . . . . . . . . . . .   89
  238.                       ERESCommonWndProc  . . . . . . . . . . . . . . . . .   90
  239.                       ERESSaveLists  . . . . . . . . . . . . . . . . . . .   91
  240.                       ERESRetrieveLists  . . . . . . . . . . . . . . . . .   92
  241.                       ERESOpenEditWindow   . . . . . . . . . . . . . . . .   93
  242.                       ERESCountEWindows  . . . . . . . . . . . . . . . . .   94
  243.                       ERESPopDlgBox  . . . . . . . . . . . . . . . . . . .   95
  244.                       ERESIsAnEditWin  . . . . . . . . . . . . . . . . . .   97
  245.                       ERESEwindowValid   . . . . . . . . . . . . . . . . .   98
  246.                       ERESSendOpenMsgToApp   . . . . . . . . . . . . . . .   99
  247.                       ERESShutDown   . . . . . . . . . . . . . . . . . . .  100
  248.                       ERESInitEResStruct   . . . . . . . . . . . . . . . .  101
  249.                       ERESCheckVersion   . . . . . . . . . . . . . . . . .  102
  250.                       ERESProcessCommands  . . . . . . . . . . . . . . . .  103
  251.                       ERESEditwindowList   . . . . . . . . . . . . . . . .  104
  252.  
  253.                       ERES.DLL - EXPORTED DIALOG BOX PROCEDURES  . . . . .  105
  254.                       ERESOpen1DlgProc   . . . . . . . . . . . . . . . . .  106
  255.                       ERESCommandDlgProc   . . . . . . . . . . . . . . . .  108
  256.                       ERESFindChangeDlgProc  . . . . . . . . . . . . . . .  110
  257.                       ERESConfigDlgProc  . . . . . . . . . . . . . . . . .  111
  258.                       EntryBoxDlgProc  . . . . . . . . . . . . . . . . . .  113
  259.  
  260.  
  261.   -----------------------------------------------------------------------------
  262.   iv  Programmers Guide to the E Editor Toolkit. Version 2.0
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                       ListBoxDlgProc   . . . . . . . . . . . . . . . . . .  115
  272.                       QuitBoxDlgProc   . . . . . . . . . . . . . . . . . .  117
  273.  
  274.                       EXAMPLE E TOOLKIT APPLICATION  . . . . . . . . . . .  121
  275.  
  276.                       APPENDIX   . . . . . . . . . . . . . . . . . . . . .  123
  277.                       Appendix A -   . . . . . . . . . . . . . . . . . . .  123
  278.                       Appendix A1 -  . . . . . . . . . . . . . . . . . . .  127
  279.                       Appendix B -   . . . . . . . . . . . . . . . . . . .  128
  280.                       Appendix C -   . . . . . . . . . . . . . . . . . . .  129
  281.                       Appendix E -   . . . . . . . . . . . . . . . . . . .  134
  282.                       Appendix F -   . . . . . . . . . . . . . . . . . . .  137
  283.                       Appendix G -   . . . . . . . . . . . . . . . . . . .  139
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.   -----------------------------------------------------------------------------
  328.                                                                     Contents  v
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.   -----------------------------------------------------------------------------
  394.   vi  Programmers Guide to the E Editor Toolkit. Version 2.0
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.   DISCLAIMER - READ FIRST!
  404.   ________________________
  405.  
  406.  
  407.  
  408.  
  409.  
  410.                       The  sample  code for using the current version (5.51) of
  411.                       the E Toolkit and its Enhanced  Multi-Line  Edit  control
  412.                       (E-MLE)  is being made available for the benefit of those
  413.                       who need to use it now.   It is being  released  "as-is",
  414.                       with  no  promise  of support, enhancement, or bug fixes.
  415.                       In addition, you should be aware that  we  are  currently
  416.                       working  on a new, cleaner, API for the next major update
  417.                       to EPM, which is not necessarily compatible with the  one
  418.                       used in this package.
  419.  
  420.                       In mentioning the "next major update", we are not guaran-
  421.                       teeing  that  this  will ever be released outside of IBM.
  422.                       (That is not a decision that we can make.)   We are  cur-
  423.                       rently  developing  EPM  5.60,  which  includes long line
  424.                       support, pop-up menus, and much more, and EPM 6.00, which
  425.                       is essentially a 32-bit version of EPM 5.60.
  426.  
  427.                       If you have a need to develop on top of the newer  E-MLE,
  428.                       then  please  send  a  note  to  Gennaro Cuomo (gcuomo at
  429.                       watson.IBM.com) describing why you need it.    This  will
  430.                       help  us demonstrate demand for the new code, and *might*
  431.                       get you on our beta-test list.
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.   -----------------------------------------------------------------------------
  461.                                                     Disclaimer - read first!  1
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.   -----------------------------------------------------------------------------
  527.   2  Programmers Guide to the E Editor Toolkit. Version 2.0
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.   INTRODUCTION.
  537.   _____________
  538.  
  539.  
  540.  
  541.  
  542.  
  543.                       The  E-Toolkit  assists  a software developer in building
  544.                       applications that edit  multiple  lines  of  text.    The
  545.                       E-Toolkit  gives  developers access to OS/2 functions and
  546.                       PM messages that enable the creation and manipulation  of
  547.                       an  advanced multi-line edit control window.  This multi-
  548.                       line edit window contains an advanced text editor  engine
  549.                       based  on  the "E" text editor technology.  (The E Family
  550.                       of text editors include, E3 for DOS, E3AIX for AIX,  EOS2
  551.                       for Full Screen OS/2, EPM and EPM/G for OS/2 Presentation
  552.                       Manager.)   This multi-line edit window is referred to as
  553.                       the E-MLE.  The E-MLE is a versatile control window  that
  554.                       supports  many  primitive  operations  which  allow  easy
  555.                       access to powerful text editing capabilities.
  556.  
  557.                       For example, The E-MLE  supports  the  editing  of  large
  558.                       files  (limited  only  by system memory).  Each E-MLE can
  559.                       store multiple files, each of which can be viewed one  at
  560.                       a  time.    (The  feature  is known as a "file RING") The
  561.                       E-MLE supports text with  associated  attribute  informa-
  562.                       tion.    Using the attribute feature your application can
  563.                       display text in Multiple Fonts, Multiple colors, and even
  564.                       associate commands with regions of  text.    (Associating
  565.                       commands  with  regions  of  text  can be a way of imple-
  566.                       menting HyperText.)   An advanced  feature  is  available
  567.                       which allows other window classes to be overlayed with in
  568.                       a  E-MLE.    Using this "Overlay Window" feature, a E-MLE
  569.                       can incorporate images along with text.
  570.  
  571.                       The E based editor engine runs in its own  separate  work
  572.                       thread.   Therefore, when primitive commands are executed
  573.                       (i.e. Load a file)  the  main  process  is  not  blocked.
  574.                       This  built-in feature leads to programs that efficiently
  575.                       use the computers CPU.
  576.  
  577.                       The behavior of an E-MLE can be enhanced  by  adding  new
  578.                       methods  of  behavior  in any of the following ways.  The
  579.                       E-MLE can be sub-classed using traditional  PM  functions
  580.                       written  in C. (i.e WinSubclassWindow(...)).  New methods
  581.                       can also be added to an E-MLE by simply  extending  event
  582.                       definitions by writing E or REXX macros.
  583.  
  584.                       This document describes the Application Program Interface
  585.                       (API) of the E-Toolkit.   Examples are provided that dem-
  586.                       onstrate  some  of the more popular way in which an E-MLE
  587.                       can be used.
  588.  
  589.  
  590.  
  591.  
  592.  
  593.   -----------------------------------------------------------------------------
  594.                                                                Introduction.  3
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.                       As mentioned above, The E-MLE can  also  be  extended  by
  604.                       writing   Macros.    The  E  Technical  Reference  manual
  605.                       describes how macros can be written.
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.   -----------------------------------------------------------------------------
  660.   4  Programmers Guide to the E Editor Toolkit. Version 2.0
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.   WRITTING PROGRAMS USING THE E TOOLKIT
  670.   _____________________________________
  671.  
  672.  
  673.  
  674.  
  675.  
  676.                       There  are  four basic steps to creating an E-MLE window.
  677.                       The first step is to Register  the  E-MLE  window  class.
  678.                       After  Registration,  a  data  structure,  describing the
  679.                       desired characteristics of your E-MLE, must  be  created.
  680.                       The next step involves actually creating the E-MLE and an
  681.                       receiving  a  handle to the E-MLE in return.  This handle
  682.                       can now be used to manipulate the E-MLE window.
  683.  
  684.                       1)  Register the E-MLE window Class.
  685.                       2)  Fill in Data Structure.
  686.                       3)  Create the E-MLE.
  687.                       4)  Manipulate E-MLE
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.   -----------------------------------------------------------------------------
  727.                                        Writting programs using the E Toolkit  5
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.   -----------------------------------------------------------------------------
  793.   6  Programmers Guide to the E Editor Toolkit. Version 2.0
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.   GETTING STARTED.
  803.   ________________
  804.  
  805.  
  806.  
  807.  
  808.  
  809.                       In   order   to  write  application  programs  using  the
  810.                       E-Toolkit you first need to  download  the  latest  EPM/G
  811.                       package  from OS2TOOLS.  You will also need copies of the
  812.                       OS/2 1.3 Programmers ToolKit, and the IBM  C/2  compiler.
  813.                       (We  currently  provide language bindings to the 'C' pro-
  814.                       gramming language. ('ETOOLKT.H')
  815.  
  816.                       Unpack the FLSBIN files that make up the  EPM/G  package.
  817.                       (Use LOADRAM to unpack FLSBIN files.)
  818.  
  819.                       There  are  four  major  pieces that are essential to the
  820.                       building of your own custom editor application.
  821.  
  822.                       1)  ETKExxx.DLL - Heart of the E-Toolkit
  823.                       2)  ETKRxxx.DLL - Utility Resources
  824.                       3)  E-Macros - Utility Resources
  825.                       4)  Your Application/Sample Programs
  826.  
  827.  
  828.   ETKEXXX.DLL - THE "HEART" OF THE E-TOOLKIT
  829.   __________________________________________
  830.  
  831.                       The first file is ETKExxx.DLL.  This is the dynamic  link
  832.                       library  that  contains  the powerful functions that will
  833.                       allow you to create your own custom E-MLE windows.   Both
  834.                       messages  and  functions are available for a user to sub-
  835.                       class  the  behavior  of  an  E-MLE.    Sample  functions
  836.                       include:        EtkInsertText,   EtkProcessEditKey,   and
  837.                       EtkSetFileField, and EtkQueryText Sample message  include
  838.                       the  EPM_EDIT_COMMAND  message  allows  any of the editor
  839.                       commands to be issued against the receiving edit  window.
  840.                       The  API  to  this library is described in detail in this
  841.                       document.
  842.  
  843.  
  844.   ETKRXXX.DLL - UTILITY RESOURCES
  845.   _______________________________
  846.  
  847.                       The second file of interest is ETKRxxx.DLL.    This  file
  848.                       contains   Utility   Resources.      We   call  this  our
  849.                       ERES-Toolkit.  It contains widgets that  enhance  produc-
  850.                       tivity  when working with E-MLE's.  Dialogs boxes such as
  851.                       the Search, Bookmark, and Error  Message  dialog  can  be
  852.                       displayed  using the EResPopDialog(...)  function.  Other
  853.                       utility  functions  like  EResCountEditWindow(...)    and
  854.                       EResOpenEditWindow(...)    are examples of functions pro-
  855.                       vided so programmers need not  write  some  of  the  most
  856.                       common actions taken upon E-MLE windows.  The API to this
  857.                       library is described in detail in this document.
  858.  
  859.  
  860.  
  861.   -----------------------------------------------------------------------------
  862.                                                             Getting Started.  7
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.   E-MACROS - UTILITY RESOURCES
  872.   ____________________________
  873.  
  874.                       The  set  of  E macros files can be use to build your own
  875.                       custom macros which will enhance your applications E-MLE.
  876.                       For example, you can  build  new  commands  using  the  E
  877.                       macros  "defc"  construct that can be executed in C using
  878.                       either   the   EtkExecuteCommand    function    of    the
  879.                       EPM_EDIT_COMMAND message.
  880.  
  881.  
  882.   YOUR APPLICATION/SAMPLE PROGRAMS
  883.   ________________________________
  884.  
  885.                       This is the program that you write.  For example EPM.EXE.
  886.                       EPM.EXE  is  small piece of code that creates E-MLE's and
  887.                       provides the proper glue needed to tie in dialogs,  help,
  888.                       macros,  and etc.  (The *source code* to EPM.EXE ver 5.50
  889.                       is available via request to EOS2.  It will become a  per-
  890.                       manent piece of our toolkit package.)
  891.  
  892.                       Note:    It  is important that the two dynalink libraries
  893.                       are placed in a sub-directory that is specified  in  your
  894.                       LIBPATH  environment variable.  (Your LIBPATH environment
  895.                       variable is found in your CONFIG.SYS file.)
  896.  
  897.                       Before you attempt to  write  you  own  application,  you
  898.                       should  examine  the  sample  programs provided with this
  899.                       package.  A sample program named ESIMPLE is  provided  to
  900.                       demonstrate  the  "basics" of an E-MLE application.   The
  901.                       sample contains two source files:
  902.  
  903.                       o   ESIMPLE.C
  904.                       o   ESIMPLE.E
  905.  
  906.                       ESIMPLE.C creates a parent  window  containing  a  single
  907.                       E-MLE window.  The parent monitors cursor movement within
  908.                       the  E-MLE by processing the EPM_EDIT_CURSORMOVE message.
  909.                       When this message is received, a status line  is  painted
  910.                       containing the line and column of the cursor.
  911.  
  912.                       ESIMPLE.E contains a definition of a handful of keys.
  913.  
  914.                       ESIMPLE.MAK  is  provided  to compile and link all compo-
  915.                       nents of the ESIMPLE example.  (When you build  your  own
  916.                       custom  application,  be  sure  to  use the same link and
  917.                       compile options as used in the example.
  918.  
  919.                       You are now ready to write your  own  editor  application
  920.                       using the Editor Toolkit.
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.   -----------------------------------------------------------------------------
  930.   8  Programmers Guide to the E Editor Toolkit. Version 2.0
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.   SPECIAL NOTES!!!
  940.   ________________
  941.  
  942.                       1)  PM Queue size.
  943.  
  944.                           Take  note  of  the  PM  Queue  Size specified in the
  945.                           ESIMPLE program.
  946.  
  947.                                 hmq = WinCreateMsgQueue(hab, 0x100);    // Create Queue
  948.  
  949.                           We strongly recommend the above PM  queue  definition
  950.                           because  the E-MLE requires a large queue for message
  951.                           passing.
  952.                       2)  E-MLE window handles. (E-MLE Positioning)
  953.  
  954.                           The E-MLE  window  is  a  standard  PM  window.    At
  955.                           minimum,  it  contains  a  frame  window as well as a
  956.                           client window.   (You can us the PMstyle flag to  add
  957.                           any other standard window control as well.)  To posi-
  958.                           tion  the  E-MLE window one must use the frame window
  959.                           handle.  The EtkCreate function returns a  handle  to
  960.                           the E-MLE client window.  The following is an example
  961.                           of positioning an E-MLE window.
  962.  
  963.                                VOID PositionMLE( HWND hwndMLE, SHORT x, SHORT y, SHORT cx, SHORT cy)
  964.                                { HWND hMLEFrame=WinQueryWindow( hwndMLE, QW_PARENT, FALSE );
  965.                                  WinSetWindowPos(hMLEFrame, NULL, x ,y ,cx ,cy, SWP_MOVE | SWP_SIZE);
  966.                                }
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.   -----------------------------------------------------------------------------
  997.                                                             Getting Started.  9
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.   -----------------------------------------------------------------------------
  1063.   10  Programmers Guide to the E Editor Toolkit. Version 2.0
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.   E TOOLKIT FUNCTIONS AT A GLANCE.
  1073.   ________________________________
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.                       The  following  functions  are  used to create and manage
  1081.                       E-MultiLine Edit (E-MLE) windows:
  1082.  
  1083.  
  1084.  
  1085.   REGISTER, CREATE, DELETE FUNCTIONS (THE BASICS)
  1086.   _______________________________________________
  1087.  
  1088.                       The following Dynalink functions are  used  to  registra-
  1089.                       tion, initialization, and destroy E-MLE windows.
  1090.  
  1091.                       ETKREGISTER
  1092.                                 Register the E-MLE window class.
  1093.                       ETKCREATE
  1094.                                 Create an E-MLE Window.
  1095.                       ETKDESTROY
  1096.                                 Destroy a Edit Window.
  1097.                       ETKVERSION
  1098.                                 Retrieve the ETKxxx.DLL version number.
  1099.                       ETKGETPROCADDRS
  1100.                                 Retrieve  function address of the "basic" func-
  1101.                                 tions.
  1102.  
  1103.  
  1104.   SPECIAL ACCESS- E-MLE MANIPULATION
  1105.   __________________________________
  1106.  
  1107.                       The following Dynalink functions are used  to  manipulate
  1108.                       various aspects of an E-MLE.
  1109.  
  1110.  
  1111.                       ----------------
  1112.                       EVENT EXECUTION.
  1113.  
  1114.                       ETKEXECUTECOMMAND
  1115.                                 Execute an command
  1116.                       ETKPROCESSEDITKEY
  1117.                                 Execute a "built-in" key action
  1118.  
  1119.  
  1120.                       -----------------
  1121.                       TEXT MINIPULATION
  1122.  
  1123.                       ETKDELETETEXT
  1124.                                 Delete a line of text.
  1125.                       ETKREPLACETEXT
  1126.                                 Replace a line of text with a new line.
  1127.                       ETKINSERTTEXT
  1128.                                 Insert a new line of text.
  1129.  
  1130.  
  1131.   -----------------------------------------------------------------------------
  1132.                                            E Toolkit functions at a glance.  11
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.                       ETKQUERYTEXT
  1142.                                 Retreive a line of text.
  1143.                       ETKQUERYTEXTBUFFER
  1144.                                 Retreive a range of lines.
  1145.                       ETKINSERTTEXTBUFFER
  1146.                                 Insert a stream of text.
  1147.                       ETKFINDATTRIBUTE
  1148.                                 Search for an attribute associated with a line.
  1149.  
  1150.  
  1151.                       --------------
  1152.                       TEXT SELECTION
  1153.  
  1154.                       ETKSETSELECTION
  1155.                                 Select text
  1156.                       ETKQUERYSELECTION
  1157.                                 Query selection region.
  1158.                       ETKQUERYSELECTIONTYPE
  1159.                                 Query Selection Type.
  1160.  
  1161.  
  1162.                       ----------------
  1163.                       FILE INFORMATION
  1164.  
  1165.                       ETKQUERYFILEID
  1166.                                 Query the active files id.
  1167.                       ETKSETFILEFIELD
  1168.                                 Set file related information
  1169.                       ETKQUERYFILEFIELD
  1170.                                 Query file related information
  1171.                        ETKQUERYFILEFIELDSTRING
  1172.                                 Query file related information
  1173.  
  1174.  
  1175.                       -----
  1176.                       FONTS
  1177.  
  1178.                       ETKREGISTERFONT
  1179.                                 Register a new font
  1180.                       ETKREGISTERFONT2
  1181.                                 Register a new fixed pitch font.
  1182.  
  1183.  
  1184.                       ---------------
  1185.                       SPECIAL ACCESS.
  1186.  
  1187.                       ETKACCESSLOWLEVELDATA
  1188.                                 It's a secret. :-)
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.   -----------------------------------------------------------------------------
  1198.   12  Programmers Guide to the E Editor Toolkit. Version 2.0
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.   -----------------------------------------------------------------------------
  1264.                                            E Toolkit functions at a glance.  13
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.   -----------------------------------------------------------------------------
  1330.   14  Programmers Guide to the E Editor Toolkit. Version 2.0
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.   REGISTER, CREATE, DELETE FUNCTIONS (THE BASICS)
  1340.   _______________________________________________
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.   -----------------------------------------------------------------------------
  1397.                             Register, Create, Delete functions (The basics)  15
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.   ETKREGISTER -
  1407.   _____________
  1408.   (REGISTER AN E-MULTI-LINE EDIT WINDOW)
  1409.   ______________________________________
  1410.  
  1411.   -----------------------------------------------------------------------------
  1412.                       Register  the  E-Multi-Line  Edit  Window  Class for this
  1413.                       process.
  1414.  
  1415.                       +-------------------------------------------------------+
  1416.                       | ETKREGISTER (HAB, CLASS_STYLE, Window_Class_Name )    |
  1417.                                                        _________________
  1418.                       +-------------------------------------------------------+
  1419.   PARAMETERS
  1420.                       HAB (HAB) - input
  1421.                           _____
  1422.                            Application anchor block
  1423.  
  1424.                       CLASS_STYLE (ULONG) - input
  1425.                                   _______
  1426.                            Default window style.    This  can  be  any  of  the
  1427.                            standard PM class styles CS_*.
  1428.        RETURNS
  1429.                       WINDOW_CLASS_NAME (PSZ) -
  1430.                                         _____
  1431.                            Pointer  to  window-class-name  string  in which the
  1432.                            editor window was registered under.
  1433.        REMARKS
  1434.                            This call only needs to be called once per  applica-
  1435.                            tion.    This  function  issues  a WinRegisterClass.
  1436.                            Your application  can  customize  this  registration
  1437.                            process.    The  first 16 bytes of window storage is
  1438.                            reserved  for  the  E-MLE  window.    You  can   use
  1439.                            EtkWndProc  as the default window procedure for your
  1440.                            custom class.
  1441.        EXAMPLE
  1442.                                WinRegisterClass(                          // Register Window Class
  1443.                                                 (HAB)hab,                 // Anchor block handle
  1444.                                                 (PSZ)classEwindow,        // Window Class name
  1445.                                                 (PFNWP)EtkWndProc,        // Address of Window Procedure
  1446.                                                 (ULONG)class_style,       // class style
  1447.                                                 (USHORT)16                // ETK uses the first 16bytes of
  1448.                                                );                         // the reserved long.
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.   -----------------------------------------------------------------------------
  1469.   16  Programmers Guide to the E Editor Toolkit. Version 2.0
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.                                                                     ETKCREATE -
  1479.                                                                     ___________
  1480.                                     (CREATE A E-MULTI-LINE EDIT CONTROL WINDOW)
  1481.                                     ___________________________________________
  1482.  
  1483.   -----------------------------------------------------------------------------
  1484.                            Create  a  new E-Multi-line edit control window con-
  1485.                            taining specified file(s).
  1486.  
  1487.                       +-------------------------------------------------------+
  1488.                       | ETKCREATE (EPM_P, HWND_P, rc )                        |
  1489.                                                   __
  1490.                       +-------------------------------------------------------+
  1491.        PARAMETERS
  1492.                       EPM_P (PEDITORINFO) - input
  1493.                             _____________
  1494.                            Pointer to Text Editor Information Structure.
  1495.  
  1496.                               .---------------------------------------------------------------------------.
  1497.                               |   Editor Information Structure defined in 'C'                             |
  1498.                               |---------------------------------------------------------------------------|
  1499.                               | typedef struct EDIT_INFO_TYPE {                                           |
  1500.                               |    HAB       hab;           // application anchor block                   |
  1501.                               |    HWND      hwndparent;    // handle to parent of edit window            |
  1502.                               |    HWND      hwndowner;     // handle to owner of edit window             |
  1503.                               |    PRECTL    pswp           // positioning of edit window                 |
  1504.                               |    PSZ       filename;      // file to be edited (with wildcard)          |
  1505.                               |    HPOINTER  hEditPtr;      // handle to editor pointer icon.             |
  1506.                               |    HPOINTER  hMarkPtr;      // handle to mark pointer icon.               |
  1507.                               |    PVOID     hEditorIcon;   // editor ICON.                               |
  1508.                               |    ULONG     editorstyle;   // internal editor options                    |
  1509.                               |    ULONG     pmstyle;       // PM standard window styles (FCF_xxxx)       |
  1510.                               |    USHORT    font;          // - Not used in versions greater than 5.20   |
  1511.                               |    PSZ       exfile;        // pre-compiled macro code file (EPM.EX)      |
  1512.                               |    PSZ       *topmkr;       // top and bottom of file marker              |
  1513.                               |    PSZ       *botmkr;       //                                            |
  1514.                               |    SHORT     editid;        // unique window id specified for edit window |
  1515.                               |    PSZ       exsearchpath;  // a set of paths to search for ex's files    |
  1516.                               |    PSZ       exe_path;      // path where the application started         |
  1517.                               |    HINI      hini;          // handle to an opened ini profile            |
  1518.                               | } EDITORINFO;                                                             |
  1519.                               |                                                                           |
  1520.                               '---------------------------------------------------------------------------'
  1521.  
  1522.                            See Appendix A for a  detailed  description  of  the
  1523.                            EDITORINFO structure.
  1524.  
  1525.                       HWND_P (PHWND) - output
  1526.                              _______
  1527.                            Pointer to E-MLE's client window.
  1528.        RETURNS
  1529.                       RC (USHORT) -
  1530.                          ________
  1531.                            TRUE  if  a  error occurred during E-MLE window cre-
  1532.                            ation.
  1533.        REMARKS
  1534.                            This call creates a unique  E-MLE  window.      Each
  1535.                            E-MLE is a complete new instance of the text editor.
  1536.                            Therefore,  it  knows  little  about any other E-MLE
  1537.                            windows that have been  previously  created.    Each
  1538.  
  1539.  
  1540.   -----------------------------------------------------------------------------
  1541.                             Register, Create, Delete functions (The basics)  17
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.                            E-MLE  window has it's own marks, tabs, margins, and
  1551.                            etc.
  1552.  
  1553.                            Starting  with  version  5.50,  the  E-MLE's use GPI
  1554.                            fonts for text I/O.  An E-MLE window can render text
  1555.                            in multiple font faces and  sizes.    (See  Appendix
  1556.                            ???????)
  1557.  
  1558.                            An  application can create as many E-MLE's as system
  1559.                            memory will permit.  Each E-MLE instance can contain
  1560.                            a ring a files.  A RING can contain as many files as
  1561.                            system memory will permit.
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.   -----------------------------------------------------------------------------
  1607.   18  Programmers Guide to the E Editor Toolkit. Version 2.0
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.                                                                    ETKDESTROY -
  1617.                                                                    ____________
  1618.                                      (DESTROY A MULTI-LINE EDIT CONTROL WINDOW)
  1619.                                      __________________________________________
  1620.  
  1621.   -----------------------------------------------------------------------------
  1622.                            Close a E-MLE window.
  1623.  
  1624.                       +-------------------------------------------------------+
  1625.                       | ETKDESTROY (HAB, HWNDOWNER, HWNDEDIT, rc )            |
  1626.                                                               __
  1627.                       +-------------------------------------------------------+
  1628.        PARAMETERS
  1629.                       HAB (HAB) - input
  1630.                           _____
  1631.                            Anchor block
  1632.  
  1633.                       HWNDOWNER (HWND) - input
  1634.                                 ______
  1635.                            Handle  of  the  owner of the E-MLE window.  Usually
  1636.                            this is the application client window.
  1637.  
  1638.                       HWNDEDIT (HWND) - input
  1639.                                ______
  1640.                            E-MLE window to destroy
  1641.        RETURNS
  1642.                       RC (USHORT) -
  1643.                          ________
  1644.                            One of the following messages are  returned.  (These
  1645.                            messages are defined in EDLL.H)
  1646.  
  1647.                            o   EPM_RC_DESTROYOK         - E-MLE window has suc-
  1648.                                cessfully closed.
  1649.  
  1650.                            o   EPM_RC_DESTROYTIMEOUT  -  the  interpreter   has
  1651.                                timed  out  because it was either running a very
  1652.                                long command, or it was executing a defexit that
  1653.                                had a problem.
  1654.  
  1655.                            o   EPM_RC_DESTROYCANCEL  - the user did not wish to
  1656.                                close the E-MLE window.
  1657.        REMARKS
  1658.                            Since E is a memory based editor, the destroy  func-
  1659.                            tion  will  not  effect  the most recent copy of the
  1660.                            text file on disk.  The destroy function generates a
  1661.                            WM_DESTROY message.  It is this message  that  actu-
  1662.                            ally closes the edit window.  You may choose to send
  1663.                            this  message  directly instead of using the destroy
  1664.                            function.  It is important to check the return  code
  1665.                            when  sending the E-MLE window a WM_DESTROY.  If the
  1666.                            E-MLE window receives a destroy message, and a modi-
  1667.                            fied file exists in its ring, an EPM_EDIT_ASKTOCLOSE
  1668.                            message  is  sent  to   the   application.      (See
  1669.                            EPM_EDIT_ASKTOCLOSE  message  in the section "Editor
  1670.                            Toolkit Messages" ) This message gives the  applica-
  1671.                            tion  a  chance  to  display a dialog box asking the
  1672.                            user if they want to "really close" the window.
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.   -----------------------------------------------------------------------------
  1680.                             Register, Create, Delete functions (The basics)  19
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.        ETKVERSION -
  1690.        ____________
  1691.        (DYNALINK VERSION)
  1692.        __________________
  1693.  
  1694.   -----------------------------------------------------------------------------
  1695.                            Get    the    version   of   the   Editor   dynalink
  1696.                            library(ETKExxx.DLL)
  1697.  
  1698.                       +-------------------------------------------------------+
  1699.                       | ETKVERSION (VERSION_STR,  )                           |
  1700.                       +-------------------------------------------------------+
  1701.        PARAMETERS
  1702.                       VERSION_STR (PSZ) - output
  1703.                                   _____
  1704.                            Pointer to a buffer of memory.  This will be  filled
  1705.                            with the current dynalink version. The return string
  1706.                            is in the following format:
  1707.  
  1708.                                  byte [1]           - length of string to follow.
  1709.                                  byte [2 - length]  - Null terminated version string.
  1710.        RETURNS
  1711.                            VOID
  1712.        REMARKS
  1713.                            A  constant,  'EVERSION',  is provided in the EDLL.H
  1714.                            file.    This constant is  to  be  compared  to  the
  1715.                            results  of  the  EtkVersion procedure.   An example
  1716.                            follows:
  1717.        EXAMPLE
  1718.                                  CHAR EDLLVersion[20];
  1719.  
  1720.                                  EtkVersion( EDLLVersion );              // Get Version from .DLL
  1721.                                  vercmp=strcmp( EDLLVersion, EVERSION ); // compare version numbers
  1722.                                  if (vercmp) {
  1723.                                     WinMessageBox ((HWND)HWND_DESKTOP,   // Display editor return code
  1724.                                                    (HWND)hwndAppFrame,
  1725.                                                    (PSZ)"Version Mismatch",
  1726.                                                    (PSZ)"Check ETKExxx.DLL version",
  1727.                                                    NULL,
  1728.                                                    MB_ICONEXCLAMATION
  1729.                                                   );
  1730.                                     return(1);
  1731.                                  }
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.   -----------------------------------------------------------------------------
  1749.   20  Programmers Guide to the E Editor Toolkit. Version 2.0
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.   SPECIAL ACCESS FUNCTIONS- E-MLE MANIPULATION
  1759.   ____________________________________________
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.   EVENT EXECUTION.
  1769.   ________________
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.   -----------------------------------------------------------------------------
  1817.                                Special Access Functions- E-MLE Manipulation  21
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.        ETKEXECUTECOMMAND -
  1827.        ___________________
  1828.        (EXECUTE AN E -COMMAND)
  1829.        _______________________
  1830.  
  1831.   -----------------------------------------------------------------------------
  1832.                             This function will execute any predefined command.
  1833.  
  1834.                       +-------------------------------------------------------+
  1835.                       | ETKEXECUTECOMMAND (HWNDEDIT, COMMAND, rc )            |
  1836.                                                               __
  1837.                       +-------------------------------------------------------+
  1838.        PARAMETERS
  1839.                       HWNDEDIT (HWND) - input
  1840.                                ______
  1841.                            Window  handle  to  the E-MLE in which the specified
  1842.                            command will execute.
  1843.  
  1844.                       COMMAND (PSZ) - input
  1845.                               _____
  1846.                            An asciiz command string that is defined  as  either
  1847.                            an internal command, an E macro, or a REXX macro.
  1848.        RETURNS
  1849.                       RC (ULONG) -
  1850.                          _______
  1851.                            TRUE if action failed.
  1852.        REMARKS
  1853.                            This is one of the more versatile commands available
  1854.                            in  the E Toolkit.  Three classes of commands can be
  1855.                            executed:
  1856.  
  1857.                            o   Internal Commands. (examples -  SAVE,  L[ocate],
  1858.                                and C[hange]).
  1859.                            o   Predefined  E macros. (examples - ADD, DRAW, and
  1860.                                GET)
  1861.                            o   REXX macros commands. (examples -  RX  SORT.ERX,
  1862.                                RX ADDMENU.ERX, RX NEW.ERX)
  1863.  
  1864.                            An example of how to use this function follows.
  1865.        EXAMPLE
  1866.                                  {
  1867.                                    HWND hwndEdit=QueryEditHandle( );
  1868.  
  1869.                                    // issue a "save" command to an E-MLE.   The data is saved in
  1870.                                    // a file called temp.tmp.
  1871.                                    EtkExecuteCommand( hwndEdit, "SAVE temp.tmp") ;
  1872.                                  }
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.   -----------------------------------------------------------------------------
  1889.   22  Programmers Guide to the E Editor Toolkit. Version 2.0
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.                                                             ETKPROCESSEDITKEY -
  1899.                                                             ___________________
  1900.                                                       (EXECUTE A EDITOR ACTION)
  1901.                                                       _________________________
  1902.  
  1903.   -----------------------------------------------------------------------------
  1904.                            Execute a primitive editor action.
  1905.  
  1906.                       +-------------------------------------------------------+
  1907.                       | ETKPROCESSEDITKEY (HWNDEDIT, KEY, rc )                |
  1908.                                                           __
  1909.                       +-------------------------------------------------------+
  1910.  
  1911.                       HWNDEDIT (HWND) - input
  1912.                                ______
  1913.                            Window handle of the E-MLE.
  1914.  
  1915.                       KEY (USHORT) - input
  1916.                           ________
  1917.                            Built in key primitives:
  1918.  
  1919.                            ADJUST_BLOCK
  1920.                            BACKTAB   Tab to the left.
  1921.                            BACKTAB_WORD Tab to the left one word.
  1922.                            BEGIN_LINE  Move  the cursor to the beginning of the
  1923.                                      line.
  1924.                            BOTTOM    Move the cursor to the last  line  in  the
  1925.                                      file.
  1926.                            COPY_MARK Copy  the  current selection to the cursor
  1927.                                      location.
  1928.                            DELETE_CHAR Delete the character in which the cursor
  1929.                                      is located.
  1930.                            DELETE_LINE Delete the line in which the  cursor  is
  1931.                                      located.
  1932.                            DELETE_MARK Delete the current selection.
  1933.                            DOWN      Scroll down one line.
  1934.                            END_LINE  Move  the cursor to the end of the current
  1935.                                      line.
  1936.                            ERASE_END_LINE Erase from the cursor to the  end  of
  1937.                                      the line.
  1938.                            INSERT_LINE Insert a new line after the cursor.
  1939.                            INSERT_TOGGLE  Toggle  between  insert  and  replace
  1940.                                      cursor.
  1941.                            JOIN      Join next line with the line in which  the
  1942.                                      cursor is located.
  1943.                            LEFT      Scroll one character to the left.
  1944.                            MOVE_MARK Move  the  current selection to the cursor
  1945.                                      location.
  1946.                            NEXT_FILE Go to the next file in the Ring.
  1947.                            OVERLAY_BLOCK Overlay the current block selection to
  1948.                                      the cursor location.
  1949.                            PAGE_DOWN Scroll one page down.
  1950.                            PAGE_UP   Scroll one page up.
  1951.                            PREVFILE_OP Go to the previous file in the Ring.
  1952.                            REFLOW    Reflow the text according to  the  margins
  1953.                                      settings.
  1954.                            REPEAT_FIND Repeat the last find.
  1955.                            RIGHT     Scroll right one character.
  1956.  
  1957.  
  1958.  
  1959.   -----------------------------------------------------------------------------
  1960.                                Special Access Functions- E-MLE Manipulation  23
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.                            RUBOUT    Move  cursor  to the left and delete char-
  1970.                                      acter.
  1971.                            SHIFT_LEFT  Shift the selected text one character to
  1972.                                      the left.
  1973.                            SHIFT_RIGHT Shift the selected text one character to
  1974.                                      the right.
  1975.                            SPLIT     Split the current line at the cursor.
  1976.                            TAB       Move cursor to the next tab position.
  1977.                            TAB_WORD  Tab to the right one word.
  1978.                            TOP       Move the cursor to the first line  in  the
  1979.                                      file.
  1980.                            UNDO_LINE Return  the  current  line to its original
  1981.                                      state.
  1982.                            UNMARK    Clear the current selection.
  1983.                            UP        Scroll up one line.
  1984.        REMARKS
  1985.        EXAMPLE
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.   -----------------------------------------------------------------------------
  2026.   24  Programmers Guide to the E Editor Toolkit. Version 2.0
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.   TEXT MANIPULATION
  2036.   _________________
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.   -----------------------------------------------------------------------------
  2093.                                Special Access Functions- E-MLE Manipulation  25
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.        ETKQUERYTEXT -
  2103.        ______________
  2104.        (RETRIEVE A LINE)
  2105.        _________________
  2106.  
  2107.   -----------------------------------------------------------------------------
  2108.                            Retrieve  a  line  of text and its associated attri-
  2109.                            butes.
  2110.  
  2111.                       +-------------------------------------------------------+
  2112.                       | ETKQUERYTEXT (HWNDEDIT, FILEID, LINENUM, TEXT, ATTRS, |
  2113.                       | ALATTR, rc )                                          |
  2114.                                 __
  2115.                       +-------------------------------------------------------+
  2116.        PARAMETERS
  2117.                       HWNDEDIT (HWND) - input
  2118.                                ______
  2119.                            Window handle to the E-MLE  that  will  contain  the
  2120.                            selected text.
  2121.  
  2122.                       FILEID (ULONG) - input
  2123.                              _______
  2124.                            the  fileid  of  the  file  containing the specified
  2125.                            line.  If 0 is specified, the line will be retrieved
  2126.                            from the visible file.
  2127.  
  2128.                       LINENUM (ULONG) - input
  2129.                               _______
  2130.                            line number of interest.
  2131.  
  2132.                       TEXT (PSZ *) - output
  2133.                            _______
  2134.                            Returns an indirect pointer to the text found on the
  2135.                            specified line.
  2136.  
  2137.                       ATTRS (PVOID) - output
  2138.                             _______
  2139.                            returns a pointer to  an  attribute  structure  that
  2140.                            describes  the attributes (i.e. font, color) associ-
  2141.                            ated with that line.
  2142.  
  2143.                       ALATTRS (PVOID) - output
  2144.                               _______
  2145.                            returns a pointer to  an  attribute  structure  that
  2146.                            describes  the attributes (i.e. font, color) associ-
  2147.                            ated with that line.
  2148.        RETURNS
  2149.                       RC (ULONG) -
  2150.                          _______
  2151.                            TRUE if action failed.
  2152.        REMARKS
  2153.                               ****************************************************************************
  2154.                               ***  TODO -  Need a section on how to interpret the attribute structures ***
  2155.                               ****************************************************************************
  2156.        EXAMPLE
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.   -----------------------------------------------------------------------------
  2169.   26  Programmers Guide to the E Editor Toolkit. Version 2.0
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.                                                                 ETKDELETETEXT -
  2179.                                                                 _______________
  2180.                                                                   (DELETE TEXT)
  2181.                                                                   _____________
  2182.  
  2183.   -----------------------------------------------------------------------------
  2184.                            Delete an area of text.
  2185.  
  2186.                       +-------------------------------------------------------+
  2187.                       |  (HWNDEDIT, FILEID, STARTLINE, NUMBER_OFLINES, rc )   |
  2188.                                                                        __
  2189.                       +-------------------------------------------------------+
  2190.        PARAMETERS
  2191.                       HWNDEDIT (HWND) - input
  2192.                                ______
  2193.                            Window handle to the E-MLE.
  2194.  
  2195.                       FILEID (ULONG) - input
  2196.                              _______
  2197.                            the  fileid  of  the  file  containing the specified
  2198.                            line.  If filid=0 is specified,  the  line  will  be
  2199.                            retrieved from the visible file.
  2200.  
  2201.                       STARTLINE (ULONG) - input
  2202.                                 _______
  2203.                            starting line number
  2204.  
  2205.                       NUM_OF_LINES (ULONG) - input
  2206.                                    _______
  2207.                            number  of lines to delete.  If (-1L) then lines are
  2208.                            deleted from the start line through the last line in
  2209.                            the file.
  2210.        RETURNS
  2211.                       RC (ULONG) -
  2212.                          _______
  2213.                            TRUE if action failed.
  2214.        REMARKS
  2215.        EXAMPLE
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.   -----------------------------------------------------------------------------
  2243.                                Special Access Functions- E-MLE Manipulation  27
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.        ETKREPLACETEXT -
  2253.        ________________
  2254.        (REPLACE A LINE)
  2255.        ________________
  2256.  
  2257.   -----------------------------------------------------------------------------
  2258.                            Replace a line with a new single attributed string
  2259.  
  2260.                       +-------------------------------------------------------+
  2261.                       | ETKREPLACETEXT (HWNDEDIT, FILEID, LINENUM,            |
  2262.                       | ATTRSTRING, rc )                                      |
  2263.                                     __
  2264.                       +-------------------------------------------------------+
  2265.        PARAMETERS
  2266.                       HWNDEDIT (HWND) - input
  2267.                                ______
  2268.                            Window  handle  to  the  E-MLE that will contain the
  2269.                            selected text.
  2270.  
  2271.                       FILEID (ULONG) - input
  2272.                              _______
  2273.                            the fileid of  the  file  containing  the  specified
  2274.                            line.  If 0 is specified, the line will be retrieved
  2275.                            from the visible file.
  2276.  
  2277.                       LINENUM (ULONG) - input
  2278.                               _______
  2279.                            starting line number
  2280.  
  2281.                       ATTRS (PVOID) - input
  2282.                             _______
  2283.                            a  pointer  to an attribute structure that describes
  2284.                            the attributes (i.e. font,  color)  associated  with
  2285.                            that line.
  2286.        RETURNS
  2287.                       RC (ULONG) -
  2288.                          _______
  2289.                            TRUE if action failed.
  2290.        REMARKS
  2291.                               ****************************************************************************
  2292.                               ***  TODO -  Need a section on how to interpret the attribute structures ***
  2293.                               ****************************************************************************
  2294.        EXAMPLE
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.   -----------------------------------------------------------------------------
  2317.   28  Programmers Guide to the E Editor Toolkit. Version 2.0
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.                                                                 ETKINSERTTEXT -
  2327.                                                                 _______________
  2328.                                                                    (ADD A LINE)
  2329.                                                                    ____________
  2330.  
  2331.   -----------------------------------------------------------------------------
  2332.                            Insert a single attributed string
  2333.  
  2334.                       +-------------------------------------------------------+
  2335.                       | ETKINSERTTEXT (HWNDEDIT, FILEID, LINENUM, ATTRSTRING, |
  2336.                       | rc )                                                  |
  2337.                         __
  2338.                       +-------------------------------------------------------+
  2339.        PARAMETERS
  2340.                       HWNDEDIT (HWND) - input
  2341.                                ______
  2342.                            Window  handle  to  the  E-MLE that will contain the
  2343.                            selected text.
  2344.  
  2345.                       FILEID (ULONG) - input
  2346.                              _______
  2347.                            the fileid of  the  file  containing  the  specified
  2348.                            line.  If 0 is specified, the line will be retrieved
  2349.                            from the visible file.
  2350.  
  2351.                       LINENUM (ULONG) - input
  2352.                               _______
  2353.                            starting line number
  2354.  
  2355.                       ATTRS (PVOID) - input
  2356.                             _______
  2357.                            A  pointer  to an attribute structure that describes
  2358.                            the attributes.  (i.e. font, color) associated  with
  2359.                            that line.
  2360.        RETURNS
  2361.                       RC (ULONG) -
  2362.                          _______
  2363.                            TRUE if action failed.
  2364.        REMARKS
  2365.                               ****************************************************************************
  2366.                               ***  TODO -  Need a section on how to interpret the attribute structures ***
  2367.                               ****************************************************************************
  2368.        EXAMPLE
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.   -----------------------------------------------------------------------------
  2391.                                Special Access Functions- E-MLE Manipulation  29
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.        ETKQUERYTEXTBUFFER -
  2401.        ____________________
  2402.        (QUERY TEXT BUFFER)
  2403.        ___________________
  2404.  
  2405.   -----------------------------------------------------------------------------
  2406.                              Retrieve  a stream of text within a specified line
  2407.                            range.
  2408.  
  2409.                       +-------------------------------------------------------+
  2410.                       | ETKQUERYTEXTBUFFER (HWNDEDIT, STARTLINE, LASTLINE,    |
  2411.                       | TOTALLEN, BUFFER, characters )                        |
  2412.                                           __________
  2413.                       +-------------------------------------------------------+
  2414.        PARAMETERS
  2415.                       HWNDEDIT (HWND) - input
  2416.                                ______
  2417.                            Window handle of the E-MLE.
  2418.  
  2419.                       STARTLINE (ULONG) - input
  2420.                                 _______
  2421.                            First line in text range.
  2422.  
  2423.                       LASTLINE (ULONG) - input
  2424.                                _______
  2425.                            Last Line in range.
  2426.  
  2427.                       TOTALLEN (ULONG) - input
  2428.                                _______
  2429.                            Size of buffer
  2430.  
  2431.                       BUFFER (PSZ) - output
  2432.                              _____
  2433.                            Buffer where text stream will be returned.
  2434.        RETURNS
  2435.                       CHARACTERS (ULONG) -
  2436.                                  _______
  2437.                            The number of characters in the buffer is  returned.
  2438.                            If  0  is  returned,  it  is  likely  that a problem
  2439.                            occured.  (Most likely an invalid line number)
  2440.        REMARKS
  2441.                            If startline and lastline are zero (0),  the  entire
  2442.                            file will be returned.
  2443.  
  2444.                            The  Buffer  contains  a  stream of characters where
  2445.                            each line ends in CR-LF.
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.   -----------------------------------------------------------------------------
  2466.   30  Programmers Guide to the E Editor Toolkit. Version 2.0
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.                                                           ETKINSERTTEXTBUFFER -
  2476.                                                           _____________________
  2477.                                                            (INSERT TEXT BUFFER)
  2478.                                                            ____________________
  2479.  
  2480.   -----------------------------------------------------------------------------
  2481.                            Enter  a  stream  of  text  starting  at a specified
  2482.                            point.
  2483.  
  2484.                       +-------------------------------------------------------+
  2485.                       | ETKINSERTTEXTBUFFER (HWNDEDIT, STARTLINE, TOTALLEN,   |
  2486.                       | TEXT, lines )                                         |
  2487.                               _____
  2488.                       +-------------------------------------------------------+
  2489.        PARAMETERS
  2490.                       HWNDEDIT (HWND) - input
  2491.                                ______
  2492.                            Window handle of the E-MLE.
  2493.  
  2494.                       STARTLINE (ULONG) - input
  2495.                                 _______
  2496.                            Insert starting at this line.
  2497.  
  2498.                       TOTALLEN (ULONG) - input
  2499.                                _______
  2500.                            Size of buffer
  2501.  
  2502.                       TEXT (PSZ) - input
  2503.                            _____
  2504.                            Text stream to insert.
  2505.        RETURNS
  2506.                       LINES (ULONG) -
  2507.                             _______
  2508.                            The number of lines inserted in to the E-MLE.  If  0
  2509.                            is  returned,  it  is likely that a problem occured.
  2510.                            (Most likely an invalid line number)
  2511.        REMARKS
  2512.                            If startline is zero (0), the Text  is  inserted  at
  2513.                            the current cursor position.
  2514.  
  2515.                            The  Text  buffer should contain a stream of charac-
  2516.                            ters where each line ends in CR-LF.
  2517.        EXAMPLE
  2518.                                 {
  2519.                                   UCHAR string[512],
  2520.                                   strcpy(string, "1: This is a test\r\n2: This is line 2\r\n");
  2521.                                   EtkInsertTextBuffer( hwndEdit, 1, strlen(string), string);
  2522.                                 }
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.   -----------------------------------------------------------------------------
  2540.                                Special Access Functions- E-MLE Manipulation  31
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.        ETKFINDATTRIBUTE. -
  2550.        ___________________
  2551.        (RETRIEVE A LINE ATTRIBUTE)
  2552.        ___________________________
  2553.  
  2554.   -----------------------------------------------------------------------------
  2555.                            Search for an attribute associated with a line.
  2556.  
  2557.                       +-------------------------------------------------------+
  2558.                       | ETKFINDATTRIBUTE (HWNDEDIT, FILEID, LINENUM, COLUMN,  |
  2559.                       | COLUMNOFFSET, ATTRIBUTE, PFOUND, rc )                 |
  2560.                                                          __
  2561.                       +-------------------------------------------------------+
  2562.        PARAMETERS
  2563.                       HWNDEDIT (HWND) - input
  2564.                                ______
  2565.                            Window  handle  to  the  E-MLE that will contain the
  2566.                            selected text.
  2567.  
  2568.                       FILEID (ULONG) - input
  2569.                              _______
  2570.                            the fileid of  the  file  containing  the  specified
  2571.                            line.  If 0 is specified, the line will be retrieved
  2572.                            from the visible file.
  2573.  
  2574.                       LINENUM (ULONG) - input
  2575.                               _______
  2576.                            starting line number
  2577.  
  2578.                       COLUMN (USHORT) - input
  2579.                              ________
  2580.                            starting column
  2581.  
  2582.                       COLUMNOFFSET (USHORT) - input
  2583.                                    ________
  2584.                            Column Offset.
  2585.  
  2586.                       ATTRS (PVOID) - input
  2587.                             _______
  2588.                            A  pointer  to an attribute structure that describes
  2589.                            the attributes (i.e. font,  color)  associated  with
  2590.                            that line.
  2591.  
  2592.                       PFOUND (BOOLEAN *) - output
  2593.                              ___________
  2594.                            found flag.
  2595.        RETURNS
  2596.                       RC (ULONG) -
  2597.                          _______
  2598.                            TRUE if action failed.
  2599.        REMARKS
  2600.                               ****************************************************************************
  2601.                               ***  TODO -  Need a section on how to interpret the attribute structures ***
  2602.                               ****************************************************************************
  2603.        EXAMPLE
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.   -----------------------------------------------------------------------------
  2617.   32  Programmers Guide to the E Editor Toolkit. Version 2.0
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.   TEXT SELECTION.
  2627.   _______________
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.   -----------------------------------------------------------------------------
  2684.                                Special Access Functions- E-MLE Manipulation  33
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.        ETKQUERYSELECTIONTYPE -
  2694.        _______________________
  2695.        (QUERY CURRENT SELECTION TYPE)
  2696.        ______________________________
  2697.  
  2698.   -----------------------------------------------------------------------------
  2699.                            Returns  the  current selection type.  The E Toolkit
  2700.                            supports three types of text selection.   Character,
  2701.                            Line, and Block.
  2702.  
  2703.                       +-------------------------------------------------------+
  2704.                       | ETKQUERYSELECTIONTYPE (HWNDEDIT, MARKTYPE, rc )       |
  2705.                                                                    __
  2706.                       +-------------------------------------------------------+
  2707.        PARAMETERS
  2708.                       HWNDEDIT (HWND) - input
  2709.                                ______
  2710.                            Window handle of the E-MLE.
  2711.  
  2712.                       MARKTYPE (PUSHORT) - output
  2713.                                _________
  2714.                            The  E  Toolkit will fill this value with a constant
  2715.                            that represents the type of mark  contained  in  the
  2716.                            visible file.
  2717.  
  2718.                                 #define LINEMARK    0
  2719.                                 #define CHARMARK    1
  2720.                                 #define BLOCKMARK   2
  2721.  
  2722.                                 #define CHARMARKG   3
  2723.                                 #define BLOCKMARKG  4
  2724.                                 #define NOMARK     -1
  2725.        RETURNS
  2726.                       RC (USHORT) -
  2727.                          ________
  2728.                            TRUE if action failed.
  2729.        REMARKS
  2730.        EXAMPLE
  2731.  
  2732.                                  {
  2733.                                    HWND    hwndEdit=QueryEditHandle( );
  2734.                                    USHORT  marktype;
  2735.                                    UCHAR   outmsg[MAXSTR];
  2736.  
  2737.                                    strcpy( outmsg, "Your file contains ");
  2738.                                    EtkQuerySelectionType( hwndEdit, &marktype);
  2739.                                    switch (marktype) {
  2740.                                       case  LINEMARK:   strcat( outmsg, "a Line Mark");             break;
  2741.                                       case  CHARMARK:   strcat( outmsg, "a Character Mark");        break;
  2742.                                       case  CHARMARKG:  strcat( outmsg, "a Special Character Mark");break;
  2743.                                       case  BLOCKMARK:  strcat( outmsg, "a Block Mark");            break;
  2744.                                       case  BLOCKMARKG: strcat( outmsg, "a Special Block Mark");    break;
  2745.                                       default:
  2746.                                             strcat( outmsg, "no mark.");
  2747.                                             break;
  2748.                                    }
  2749.  
  2750.                                  }
  2751.  
  2752.  
  2753.  
  2754.  
  2755.   -----------------------------------------------------------------------------
  2756.   34  Programmers Guide to the E Editor Toolkit. Version 2.0
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.                                                             ETKQUERYSELECTION -
  2766.                                                             ___________________
  2767.                                                            (SELECTION LOCATION)
  2768.                                                            ____________________
  2769.  
  2770.   -----------------------------------------------------------------------------
  2771.                            Returns the coordinates of the selected text area.
  2772.  
  2773.                       +-------------------------------------------------------+
  2774.                       | ETKQUERYSELECTION (HWNDEDIT, FIRSTLINE, LASTLINE,     |
  2775.                       | FIRSTCOL, LASTCOL, MARKFILEID, RESPECTATTRIBUTES,     |
  2776.                       | RELATIVE2FILE, rc )                                   |
  2777.                                        __
  2778.                       +-------------------------------------------------------+
  2779.        PARAMETERS
  2780.                       HWNDEDIT (HWND) - input
  2781.                                ______
  2782.                            Window  handle  of  the E-MLE that contains selected
  2783.                            text.
  2784.  
  2785.                       FIRSTLINE, LASTLINE (PULONG) - output
  2786.                                           ________
  2787.                            returns the first and last  lines  in  the  selected
  2788.                            area.
  2789.  
  2790.                       FIRSTCOL, LASTCOL (PUSHORT) - output
  2791.                                         _________
  2792.                            returns  the  first and last columns in the selected
  2793.                            area.
  2794.  
  2795.                       MARKFILEID (PULONG) - output
  2796.                                  ________
  2797.                            returns  the  fileid  of  the  file  containing  the
  2798.                            selected text.
  2799.  
  2800.                       RESPECTATTRIBUTES (PUSHORT) - output
  2801.                                         _________
  2802.                            If  TRUE,  Font and color attribute information will
  2803.                            be taken into consideration.
  2804.  
  2805.                       RELATIVE2FILE (PUSHORT) - output
  2806.                                     _________
  2807.                            Should always be set to TRUE.
  2808.        RETURNS
  2809.                       RC (USHORT) -
  2810.                          ________
  2811.                            TRUE if action failed.
  2812.        REMARKS
  2813.        EXAMPLE
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.   -----------------------------------------------------------------------------
  2832.                                Special Access Functions- E-MLE Manipulation  35
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                                  {
  2843.                                    ULONG  firstline, lastline;
  2844.                                    USHORT firstcol, lastcol;
  2845.                                    LONG   markfileid;
  2846.                                    SHORT  marktype;
  2847.                                    USHORT respectattributes=FALSE, relative2file=TRUE;
  2848.  
  2849.                                    EtkQuerySelectionType( hwndEdit, &marktype);
  2850.  
  2851.                                    if (marktype!=NOMARK) {
  2852.                                       EtkQuerySelection(QueryActiveEdit(),
  2853.                                                        &firstline, &lastline,
  2854.                                                        &firstcol,  &lastcol,
  2855.                                                        &markfileid,
  2856.                                                        respectattributes, relative2file);
  2857.                                    }
  2858.                                  }
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.   -----------------------------------------------------------------------------
  2898.   36  Programmers Guide to the E Editor Toolkit. Version 2.0
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.                                                               ETKSETSELECTION -
  2908.                                                               _________________
  2909.                                                                   (SELECT TEXT)
  2910.                                                                   _____________
  2911.  
  2912.   -----------------------------------------------------------------------------
  2913.                            Specifiy  the  type of selection along with the area
  2914.                            of text to be selected.
  2915.  
  2916.                       +-------------------------------------------------------+
  2917.                       | ETKSETSELECTION (HWNDEDIT, FIRSTLINE, LASTLINE,       |
  2918.                       | FIRSTCOL, LASTCOL, FIRSTOFF, LASTOFF, MARKTYPE,       |
  2919.                       | FILEID, rc )                                          |
  2920.                                 __
  2921.                       +-------------------------------------------------------+
  2922.  
  2923.  
  2924.        PARAMETERS
  2925.                       HWNDEDIT (HWND) - input
  2926.                                ______
  2927.                            Window handle to the E-MLE  that  will  contain  the
  2928.                            selected text.
  2929.  
  2930.                       FIRSTLINE, LASTLINE (ULONG) - input
  2931.                                           _______
  2932.                            The first and last lines in the selected area.
  2933.  
  2934.                       FIRSTCOL, LASTCOL (USHORT) - input
  2935.                                         ________
  2936.                            The first and last columns in the selected area.
  2937.  
  2938.                       FIRSTOFF, LASTOFF (USHORT) - input
  2939.                                         ________
  2940.                            The  attribute  offset associated with the first and
  2941.                            last column.  (If color or font attributes  are  not
  2942.                            being used, set to 0)
  2943.  
  2944.                       MARKTYPE (USHORT) - input
  2945.                                ________
  2946.  
  2947.                                 #define LINEMARK    0
  2948.                                 #define CHARMARK    1
  2949.                                 #define BLOCKMARK   2
  2950.  
  2951.                                 #define CHARMARKG   3
  2952.                                 #define BLOCKMARKG  4
  2953.                                 #define NOMARK     -1
  2954.  
  2955.                       MARKFILEID (USHORT) - input
  2956.                                  ________
  2957.                            the fileid of the file containing the selected text.
  2958.                            If -1 is specified, the text will be selected in the
  2959.                            visible file.
  2960.        RETURNS
  2961.                       RC (USHORT) -
  2962.                          ________
  2963.                            TRUE if action failed.
  2964.        REMARKS
  2965.        EXAMPLE
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.   -----------------------------------------------------------------------------
  2974.                                Special Access Functions- E-MLE Manipulation  37
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.                                  {
  2984.                                    ULONG  firstline, lastline;
  2985.                                    USHORT firstcol, lastcol;
  2986.                                    LONG   markfileid;
  2987.                                    SHORT  marktype;
  2988.                                    USHORT respectattributes=FALSE, relative2file=TRUE;
  2989.  
  2990.                                    EtkQuerySelectionType( hwndEdit, &marktype);
  2991.  
  2992.                                    if (marktype!=NOMARK) {
  2993.                                       HWND hwndEdit=QueryActiveEdit();
  2994.                                       EtkQuerySelection(hwndEdit,
  2995.                                                        &firstline, &lastline,
  2996.                                                        &firstcol,  &lastcol,
  2997.                                                        &markfileid,
  2998.                                                        respectattributes, relative2file);
  2999.                                       // extend the mark one line.
  3000.                                       EtkSetSelection(hwndEdit,
  3001.                                                        firstline, lastline+1,
  3002.                                                        firstcol,  lastcol,  0, 0,
  3003.                                                        marktype,
  3004.                                                        markfileid);
  3005.                                    }
  3006.                                  }
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.   -----------------------------------------------------------------------------
  3040.   38  Programmers Guide to the E Editor Toolkit. Version 2.0
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.   FILE INFORMATION
  3050.   ________________
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.   -----------------------------------------------------------------------------
  3107.                                Special Access Functions- E-MLE Manipulation  39
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.        ETKQUERYFILEID -
  3117.        ________________
  3118.        (QUERY A FILES IDENTIFIER)
  3119.        __________________________
  3120.  
  3121.   -----------------------------------------------------------------------------
  3122.                            Retrieve the visible files file identifier.
  3123.  
  3124.                       +-------------------------------------------------------+
  3125.                       | ETKQUERYFILEID (HWNDEDIT, FILEID, rc )                |
  3126.                                                           __
  3127.                       +-------------------------------------------------------+
  3128.        PARAMETERS
  3129.                       HWNDEDIT (HWND) - input
  3130.                                ______
  3131.                            Window  handle  to  the  E-MLE that will contain the
  3132.                            selected text.
  3133.  
  3134.                       FILEID (PUSHORT) - input
  3135.                              _________
  3136.                            returns the fileid of the visible file.
  3137.        RETURNS
  3138.                       RC (USHORT) -
  3139.                          ________
  3140.                            TRUE if action failed.
  3141.        REMARKS
  3142.                            The file identifier is an constant that is  used  by
  3143.                            certian  functions  to identify a particular file in
  3144.                            an E-MLE window Ring.
  3145.        EXAMPLE
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.   -----------------------------------------------------------------------------
  3179.   40  Programmers Guide to the E Editor Toolkit. Version 2.0
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.                                                               ETKSETFILEFIELD -
  3189.                                                               _________________
  3190.                                                    SET SOME FILE CHARACTERISTIC
  3191.                                                    ____________________________
  3192.  
  3193.   -----------------------------------------------------------------------------
  3194.                            Set information pertaining to some aspect of a file.
  3195.                            (i.e. Margin, Name, etc)
  3196.  
  3197.                       +-------------------------------------------------------+
  3198.                       | ETKSETFILEFIELD (HWNDEDIT, FIELD, FILEID, INDATA, rc  |
  3199.                                                                           __
  3200.                       | )                                                     |
  3201.                       +-------------------------------------------------------+
  3202.        PARAMETERS
  3203.                       HWNDEDIT (HWND) - input
  3204.                                ______
  3205.                            Window handle of the E-MLE.
  3206.  
  3207.                       FIELD. (ULONG) - input
  3208.                              _______
  3209.                            SEE  APPENDIX  A1  FOR  FIELD  CONSTANTS  AND VALUES
  3210.                            EXPECTED BY EACH FIELD.
  3211.  
  3212.                       FILEID (ULONG) - input
  3213.                              _______
  3214.                            the fileid
  3215.  
  3216.                       INDATA (PVOID) - input
  3217.                              _______
  3218.                            The input data varies depending on the  field  being
  3219.                            set.    SEE  APPENDIX  A-1  FOR  FIELD CONSTANTS AND
  3220.                            VALUES EXPECTED BY EACH FIELD.
  3221.        RETURNS
  3222.                       RC (USHORT) -
  3223.                          ________
  3224.                            TRUE if action failed.
  3225.        REMARKS
  3226.        EXAMPLE
  3227.                                 {
  3228.                                    UCHAR s[MAXSTR];
  3229.                                    ULONG Browse;
  3230.  
  3231.                                    Browse = 0L;   // turn OFF browse mode - the file can now be modified.
  3232.                                    EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse);
  3233.  
  3234.                                    // Insert a stream of text...
  3235.                                    strcpy( s,"Hello World\r\nAnother Line\r\nAnd another...");
  3236.                                    EtkInsertTextBuffer( hwndMLE, 1, strlen(s), s);
  3237.  
  3238.                                    Browse = 1L;   // turn ON browse mode - the file is now read only!
  3239.                                    EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse);
  3240.                                 }
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.   -----------------------------------------------------------------------------
  3253.                                Special Access Functions- E-MLE Manipulation  41
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.        ETKQUERYFILEFIELD -
  3263.        ___________________
  3264.        (QUERY SOME FILE CHARACTERISTIC)
  3265.        ________________________________
  3266.  
  3267.   -----------------------------------------------------------------------------
  3268.                            Query  information  pertaining  to  some aspect of a
  3269.                            file. (i.e. Margin, Name, etc)
  3270.  
  3271.                       +-------------------------------------------------------+
  3272.                       | ETKQUERYFILEFIELD (HWNDEDIT, FIELD, FILEID,           |
  3273.                       | RETURNDATA, rc )                                      |
  3274.                                     __
  3275.                       +-------------------------------------------------------+
  3276.        PARAMETERS
  3277.                       HWNDEDIT (HWND) - input
  3278.                                ______
  3279.                            Window handle of the E-MLE.
  3280.  
  3281.                       FIELD. (ULONG) - input
  3282.                              _______
  3283.                            SEE APPENDIX  A1  FOR  FIELD  CONSTANTS  AND  VALUES
  3284.                            EXPECTED BY EACH FIELD.
  3285.  
  3286.                       FILEID (ULONG) - input
  3287.                              _______
  3288.                            the fileid
  3289.  
  3290.                       RETURNDATA (PVOID) - output
  3291.                                  _______
  3292.                            data  returned.  This  data  varies depending on the
  3293.                            field being queried.  SEE APPENDIX A1 FOR FIELD CON-
  3294.                            STANTS AND VALUES EXPECTED BY EACH FIELD.
  3295.        RETURNS
  3296.                       RC (USHORT) -
  3297.                          ________
  3298.                            TRUE if action failed.
  3299.        REMARKS
  3300.        EXAMPLE
  3301.                                {
  3302.                                   ULONG numlines;
  3303.  
  3304.                                   // query the number of lines in a given file.
  3305.                                   EtkQueryFileField(hwndMLE,(ULONG)LAST_FIELD,(ULONG)0,(PVOID)&numlines);
  3306.                                }
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.   -----------------------------------------------------------------------------
  3327.   42  Programmers Guide to the E Editor Toolkit. Version 2.0
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.   -----------------------------------------------------------------------------
  3393.                                Special Access Functions- E-MLE Manipulation  43
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.   -----------------------------------------------------------------------------
  3459.   44  Programmers Guide to the E Editor Toolkit. Version 2.0
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.   E TOOLKIT MESSAGES
  3469.   __________________
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.                            Purpose  The following messages are used to interact
  3479.                            with an edit window object.
  3480.  
  3481.  
  3482.  
  3483.                            Remarks
  3484.  
  3485.                            The numbering of the following messages are:  (using
  3486.                            C and PM standards)
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.   -----------------------------------------------------------------------------
  3526.                                                          E Toolkit Messages  45
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.                              EPM_BROADCASTHELP
  3536.                              EPM_EDIT_OPTION
  3537.                              EPM_EDIT_PLAYKEY
  3538.                              EPM_EDIT_ACTIVATEFILEID
  3539.                              EPM_EDIT_POSTDONE
  3540.                              EPM_EDIT_ACTIVEHWND
  3541.                              EPM_EDIT_ASKTOCLOSE
  3542.                              EPM_EDIT_ASKTODONE
  3543.                              EPM_EDIT_ASKTOFAILED
  3544.                              EPM_EDIT_QUERYRECORDKEY
  3545.                              EPM_EDIT_ASKTOQUIT
  3546.                              EPM_EDIT_QUERY_HELP_INSTANCE
  3547.                              EPM_EDIT_CHANGEFONT * (to be implemented for 5.50)
  3548.                              EPM_EDIT_RECORDKEY
  3549.                              EPM_EDIT_CHAR
  3550.                              EPM_EDIT_RETCODE
  3551.                              EPM_EDIT_CLIPBOARDCOPY
  3552.                              EPM_EDIT_SAYERROR
  3553.                              EPM_EDIT_CLIPBOARDPASTE
  3554.                              EPM_EDIT_COMMAND
  3555.                              EPM_EDIT_SHOW
  3556.                              EPM_EDIT_COMMAND2
  3557.                              EPM_EDIT_TURN_OFF_HIGHLIGHT
  3558.                              EPM_EDIT_CONTROLTOGGLE * ( need access to CONTROL constants.)
  3559.                              EPM_EDIT_CURSORMOVE
  3560.                              EPM_EDIT_VERSION
  3561.                              EPM_EDIT_WIN2DOC * (Jason needs to document this one.)
  3562.                              EPM_EDIT_DESTROYNOTIFY
  3563.                              EPM_EDIT_DESTROYRC
  3564.                              EPM_EXTRAWINDOW_REFRESH
  3565.                              EPM_EDIT_DOC2WIN * (Jason needs to document this one.)
  3566.                              EPM_FRAME_MESSAGELINE
  3567.                              EPM_FRAME_STATUSLINE
  3568.                              EPM_EDIT_ENDRECORDKEY
  3569.                              EPM_EDIT_TASKLIST
  3570.  
  3571.                              ------------- TODO ----------------
  3572.                              EPM_EDIT_EXEC_DYNALINK * (GAC has to document this one.)
  3573.                              EPM_GET_ERROR_MESSAGE
  3574.                              EPM_EDIT_EXEC_PROC
  3575.                              EPM_IS_HELP_LOADED
  3576.                              EPM_EDIT_GETMEM
  3577.                              EPM_PRINT_RENDERPAGE
  3578.                              EPM_EDIT_GETPROFILE
  3579.                              EPM_PRINT_RENDERPAGERC
  3580.                              EPM_EDIT_HELPNOTIFY
  3581.                              EPM_QHELP_TABLE
  3582.                              EPM_EDIT_ID
  3583.                              EPM_QUERY_GLOBDATA
  3584.                              EPM_EDIT_MINMAXFRAME
  3585.                              EPM_SEND_MACROS_ERRORS
  3586.                              EPM_EDIT_NEWFILE
  3587.                              -----------------------------------
  3588.  
  3589.  
  3590.  
  3591.   -----------------------------------------------------------------------------
  3592.   46  Programmers Guide to the E Editor Toolkit. Version 2.0
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.                            Note:    Editor messages are either SEND messages or
  3602.                                                                ____
  3603.                            RECEIVE messages. The SEND messages  are  sent  from
  3604.                            _______               ____
  3605.                            your  application  to  the  edit window. The RECEIVE
  3606.                                                                         _______
  3607.                            messages are sent by an edit window  to  the  regis-
  3608.                            tered owner's window procedure.
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.   -----------------------------------------------------------------------------
  3661.                                                          E Toolkit Messages  47
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.   EPM_FRAME_STATUSLINE
  3671.   ____________________
  3672.  
  3673.                       ----------------------------------------------
  3674.                            (UPDATE STATUS LINE) - SENT TO AN E-MLE WINDOW
  3675.  
  3676.  
  3677.                            Purpose  Updates  the  status  line's  template  and
  3678.                            color.
  3679.  
  3680.  
  3681.  
  3682.                            Message Parameter 1
  3683.  
  3684.                             STATUS_TEMPLATE (PSZ) Status temple  string  to  be
  3685.                             ________________
  3686.                            filled   in  by  status  line.    (See  Remarks  for
  3687.                            status_template format)
  3688.  
  3689.  
  3690.  
  3691.                            Message Parameter 2
  3692.  
  3693.                             STATUSLINE_COLOR( USHORT)
  3694.                             ________________
  3695.  
  3696.                             (LOCHAR)foreground color
  3697.                             (HICHAR)background color
  3698.  
  3699.  
  3700.  
  3701.                            Return
  3702.                                NULL
  3703.  
  3704.  
  3705.  
  3706.                            Remarks:  If a color  is  not  specified,  then  the
  3707.                            current  color  is  used.    The  pointer  passed in
  3708.                                                         _______________________
  3709.                            Message Parameter 1 IS FREED  by  this  message.  It
  3710.                            ________________________________________________
  3711.                            must  be  allocated using DosAllocSeg, because it is
  3712.                            freed using DosFreeSeg.
  3713.  
  3714.                            The following tags are supported in the status  tem-
  3715.                            plate:
  3716.  
  3717.                            %L        current line number.
  3718.                            %C        current column number.
  3719.                            %F        files in E-MLE Ring.
  3720.                            %M        displays  "Modified"  if  visible  file is
  3721.                                      modified.
  3722.                            %I        Displays "Insert" or "Replace"
  3723.                            %Z - %X   Displays character at cursor is  ascii(%z)
  3724.                                      or in hex(%x).
  3725.                            %S        Total number of lines in file.
  3726.                            %A        Autosave value.
  3727.  
  3728.  
  3729.  
  3730.  
  3731.   -----------------------------------------------------------------------------
  3732.   48  Programmers Guide to the E Editor Toolkit. Version 2.0
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.                            For  example,  if  the following template string was
  3742.                            passed:
  3743.  
  3744.                              Line=%l  Column=%C  Mode=%i,  The Ring contains %f
  3745.  
  3746.                            The status line would display:
  3747.  
  3748.                              Line=1290  Column=72  Mode=Insert, The Ring contains 2 Files.
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.  
  3782.  
  3783.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790.  
  3791.  
  3792.  
  3793.  
  3794.  
  3795.  
  3796.  
  3797.   -----------------------------------------------------------------------------
  3798.                                                          E Toolkit Messages  49
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.   EPM_FRAME_MESSAGELINE
  3808.   _____________________
  3809.  
  3810.                       -----------------------------------------------
  3811.                            (UPDATE MESSAGE LINE) - SENT TO AN E-MLE WINDOW
  3812.  
  3813.  
  3814.                            Purpose Updates the message line's text and color.
  3815.  
  3816.  
  3817.  
  3818.                            Message Parameter 1
  3819.  
  3820.                             MESSAGE (PSZ) string to appear on message line
  3821.                             ________
  3822.  
  3823.  
  3824.  
  3825.                            Message Parameter 2
  3826.  
  3827.                             MESSAGELINE COLOR( USHORT)
  3828.                             _________________
  3829.  
  3830.                             (LOCHAR)foreground color
  3831.                             (HICHAR)background color
  3832.  
  3833.  
  3834.  
  3835.                            Return
  3836.                                NULL
  3837.  
  3838.  
  3839.  
  3840.                            Remarks:   If  a  color  is  not specified, then the
  3841.                            current color  is  used.    The  pointer  passed  in
  3842.                                                        ________________________
  3843.                            Message  Parameter  1  IS FREED by this message.  It
  3844.                            ________________________________________________
  3845.                            must be allocated using DosAllocSeg, because  it  is
  3846.                            freed using DosFreeSeg.
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.   -----------------------------------------------------------------------------
  3869.   50  Programmers Guide to the E Editor Toolkit. Version 2.0
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.   EPM_EDIT_VERSION
  3879.   ________________
  3880.  
  3881.                       -----------------------------------------
  3882.                            (E-MLE VERSION) - SENT TO AN E-MLE WINDOW
  3883.  
  3884.  
  3885.                            Purpose Return the E-Toolkit version number.
  3886.  
  3887.  
  3888.  
  3889.                            Message Parameter 1
  3890.  
  3891.                             NOT USED (LONG)
  3892.                             _________
  3893.  
  3894.  
  3895.  
  3896.                            Message Parameter 2
  3897.  
  3898.                            NOT USED()
  3899.                            ________
  3900.  
  3901.  
  3902.  
  3903.                            Return
  3904.                                NULL
  3905.  
  3906.  
  3907.  
  3908.                            Remarks:
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.   -----------------------------------------------------------------------------
  3938.                                                          E Toolkit Messages  51
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.   EPM_EDIT_TURN_OFF_HIGHLIGHT
  3948.   ___________________________
  3949.  
  3950.                       ----------------------------------------------
  3951.                            (TURN OFF HIGHLIGHT) - SENT TO AN E-MLE WINDOW
  3952.  
  3953.  
  3954.                            Purpose Clear text circled by the CIRCLEIT macro.
  3955.  
  3956.  
  3957.  
  3958.                            Message Parameter 1
  3959.  
  3960.                             NOT USED (LONG)
  3961.                             _________
  3962.  
  3963.  
  3964.  
  3965.                            Message Parameter 2
  3966.  
  3967.                            NOT USED()
  3968.                            ________
  3969.  
  3970.  
  3971.  
  3972.                            Return
  3973.                                NULL
  3974.  
  3975.  
  3976.  
  3977.                            Remarks:
  3978.  
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.   -----------------------------------------------------------------------------
  4007.   52  Programmers Guide to the E Editor Toolkit. Version 2.0
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.   EPM_EDIT_QUERY_HELP_INSTANCE
  4017.   ____________________________
  4018.  
  4019.                       -------------------------------------------------
  4020.                            (QUERY HELP INSTANCE) - SENT FROM AN E-MLE WINDOW
  4021.  
  4022.  
  4023.                            Purpose The following is a request from the etoolkit
  4024.                            for the handle of the help instance
  4025.  
  4026.  
  4027.  
  4028.                            Message Parameter 1
  4029.  
  4030.                             NOT USED (LONG)
  4031.                             _________
  4032.  
  4033.  
  4034.  
  4035.                            Message Parameter 2
  4036.  
  4037.                            NOT USED()
  4038.                            ________
  4039.  
  4040.  
  4041.  
  4042.                            Return
  4043.                                NULL
  4044.  
  4045.  
  4046.  
  4047.                            Remarks:  This is how EPM.EXE handles this messages.
  4048.  
  4049.                                  case EPM_EDIT_QUERY_HELP_INSTANCE:
  4050.                                     if(!GlobData->hwndHelpInstance) {
  4051.                                        GlobData->hwndHelpInstance = WinCreateHelpInstance(GlobData->hAB,&GlobData->hmiHelpData);
  4052.                                     }
  4053.                                     return(GlobData->hwndHelpInstance);
  4054.                                     break;
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.   -----------------------------------------------------------------------------
  4076.                                                          E Toolkit Messages  53
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.   EPM_BROADCASTHELP
  4086.   _________________
  4087.  
  4088.                       ----------------------------------
  4089.                            (BROADCAST HELP) - SENT FROM E-MLE
  4090.  
  4091.  
  4092.                            Purpose  EPM_BROADCASTHELP  is sent a E-MLE applica-
  4093.                            tion when the help instance  has  been  initialized.
  4094.                            To  insure  that all existing edit windows add their
  4095.                            helpsub tables to the help instance  EPM_QHELP_TABLE
  4096.                            is  broadcasted  to  all edit windows on the desktop
  4097.                            informing them that help has been  loaded.    If  no
  4098.                            edit       windows       are       running      then
  4099.                            EPM_EDIT_QUERY_HELP_INSTANCE is issued to the  shell
  4100.                            in order to create the help instance.
  4101.  
  4102.  
  4103.  
  4104.                            Message Parameter 1
  4105.  
  4106.                             NOT USED (LONG)
  4107.                             _________
  4108.  
  4109.  
  4110.  
  4111.                            Message Parameter 2
  4112.  
  4113.                            NOT USED()
  4114.                            ________
  4115.  
  4116.  
  4117.  
  4118.                            Return
  4119.                                NULL
  4120.  
  4121.  
  4122.  
  4123.                            Remarks:  This is how EPM.EXE handles this messages.
  4124.  
  4125.                                 case EPM_BROADCASTHELP:
  4126.                                     {
  4127.                                       USHORT rc;
  4128.                                       rc=ERESBroadcastMsgToEditWindows(GlobData, EPM_QHELP_TABLE, 0L,0L);
  4129.                                       if(!rc) {
  4130.                                           WinSendMsg(GlobData->eres.hwndAppClient,
  4131.                                                      EPM_EDIT_QUERY_HELP_INSTANCE, 0L, 0L);
  4132.                                       }
  4133.                                     }
  4134.                                     break;
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.   -----------------------------------------------------------------------------
  4145.   54  Programmers Guide to the E Editor Toolkit. Version 2.0
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.   EPM_EDIT_DELETEFILE
  4155.   ___________________
  4156.  
  4157.                       -----------------------
  4158.                            (DELETE FILE FROM DISK)
  4159.  
  4160.  
  4161.                            Purpose  Delete  the file specified in mp1 from disk
  4162.                            and free pointer
  4163.  
  4164.  
  4165.  
  4166.                            Message Parameter 1
  4167.  
  4168.                             FILENAME(PSZ) Fully qualified file name.
  4169.                             ________
  4170.  
  4171.  
  4172.  
  4173.                            Message Parameter 2
  4174.  
  4175.                            NOT USED()
  4176.                            ________
  4177.  
  4178.  
  4179.  
  4180.                            Return
  4181.                                NULL
  4182.  
  4183.  
  4184.  
  4185.                            Remarks
  4186.  
  4187.                            :
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.   -----------------------------------------------------------------------------
  4214.                                                          E Toolkit Messages  55
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.   EPM_EDIT_ACTIVATEFILEID
  4224.   _______________________
  4225.  
  4226.                       -----------------
  4227.                            (ACTIVATE A FILE)
  4228.  
  4229.  
  4230.                            Purpose  Activate a file corresponding to the speci-
  4231.                            fied file identifier.
  4232.  
  4233.  
  4234.  
  4235.                            Message Parameter 1
  4236.  
  4237.                             FILEID (LONG)  A  file  identifier  that  could  be
  4238.                             _______
  4239.                            obtained using the EtkQueryFileID function.
  4240.  
  4241.  
  4242.  
  4243.                            Message Parameter 2
  4244.  
  4245.                            NOT USED()
  4246.                            ________
  4247.  
  4248.  
  4249.  
  4250.                            Return
  4251.                                NULL
  4252.  
  4253.  
  4254.  
  4255.                            Remarks:
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.   -----------------------------------------------------------------------------
  4283.   56  Programmers Guide to the E Editor Toolkit. Version 2.0
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.   EPM_EDIT_CHAR
  4293.   _____________
  4294.  
  4295.                       -------------------------
  4296.                            (ISSUE A WM_CHAR MESSAGE)
  4297.  
  4298.  
  4299.                            Purpose  An alternitive to the WM_CHAR message.   It
  4300.                            is handled exactly in the same manner as WM_CHAR.
  4301.  
  4302.  
  4303.  
  4304.                            Message Parameter 1
  4305.  
  4306.                            MP1(MPARAM) See WM_CHAR in the PM Tech. Ref.
  4307.                            ___
  4308.  
  4309.  
  4310.  
  4311.                            Message Parameter 2
  4312.  
  4313.                            MP2(MPARAM) See WM_CHAR in the PM Tech. Ref.
  4314.                            ___
  4315.  
  4316.  
  4317.  
  4318.                            Return
  4319.  
  4320.  
  4321.  
  4322.                            Remarks:
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.   -----------------------------------------------------------------------------
  4352.                                                          E Toolkit Messages  57
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.   EPM_EDIT_CLIPBOARDCOPY
  4362.   ______________________
  4363.  
  4364.                       -----------------------------------
  4365.                            (INSERT TEXT INTO THE PM CLIPBOARD)
  4366.  
  4367.  
  4368.                            Purpose  Fast  path  to  inserting  text into the PM
  4369.                            Clipboard.
  4370.  
  4371.  
  4372.  
  4373.                            Message Parameter 1
  4374.  
  4375.                            PTEXTBUF(PVOID) Pointer  to  a  memory  buffer  con-
  4376.                            ________
  4377.                            taining  text to copy to the clipboard.  The text is
  4378.                            in a format described by mp2.
  4379.  
  4380.  
  4381.  
  4382.                            Message Parameter 2
  4383.  
  4384.                            MP2() Flag that describes what format of the  memory
  4385.                            ___
  4386.                            buffer, which was passed in mp1.
  4387.  
  4388.                                    0 = CF_TEXT type buffer, terminated by nul
  4389.                                    1 = EPM shared memory buffer (32byte head)
  4390.  
  4391.  
  4392.                            Return
  4393.  
  4394.  
  4395.  
  4396.                            Remarks:   When the contents of mp1 is copied to the
  4397.                            clipboard a EPM defc event is called by the name  of
  4398.                            PROCESSCLIPBOARDCOPY. Arg(1) of this function is the
  4399.                            original  buffer  passed  in  as mp1. The caller may
  4400.                            choose to free the buffer during  this  command.  If
  4401.                            zero  is passed as arg(1), an error was encountered.
  4402.                            An error message should be displayed at this point.
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.   -----------------------------------------------------------------------------
  4421.   58  Programmers Guide to the E Editor Toolkit. Version 2.0
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430.   EPM_EDIT_COMMAND
  4431.   ________________
  4432.  
  4433.                       --------------------------------
  4434.                            (EDITOR COMMAND MESSAGE - E-MLE)
  4435.  
  4436.  
  4437.                            Purpose Issue a command to the E-MLE
  4438.  
  4439.  
  4440.  
  4441.                            Message Parameter 1
  4442.  
  4443.                            EDIT  COMMAND  (PSZ)  Any legal editor command. (See
  4444.                            _______________
  4445.                            Appendix B for a complete list of commands)
  4446.  
  4447.  
  4448.  
  4449.                            Message Parameter 2
  4450.  
  4451.                            COMMAND FLAGS(USHORT) The  following  command  flags
  4452.                            _____________
  4453.                            can be set with the EPM_EDIT_COMMAND message:
  4454.  
  4455.                            o   COMMAND_SYNC        - the command is sent to the
  4456.                                edit interpreter thread and  is  executed  imme-
  4457.                                diately or after the last command.
  4458.  
  4459.                            o   COMMAND_FREESEL - free the selector of parameter
  4460.                                one when done.
  4461.  
  4462.                            o   COMMAND_GETABLE  - the selector in parameter one
  4463.                                is a getable shared segment.
  4464.  
  4465.  
  4466.                            Returns
  4467.                               void
  4468.  
  4469.  
  4470.  
  4471.                            Remarks This message is the main source of  communi-
  4472.                            cation  to  editor windows.   To send a message to a
  4473.                            specific file, send any  legal  editor  command  (in
  4474.                            string  form)  to the associated edit window handle.
  4475.                            Legal editor commands consist of  any  of  the  base
  4476.                            editor  commands or any user defined commands.  User
  4477.                            commands can be created within the editor macro lan-
  4478.                            guage via DEFC's.
  4479.  
  4480.                            For command return codes  see  the  EPM_EDIT_RETCODE
  4481.                                                                ________________
  4482.                            message.
  4483.  
  4484.                            See Appendix B for a complete list of commands
  4485.  
  4486.                            By  default  all  commands  sent  or  posted to edit
  4487.                            windows are copied and posted to the  editor  inter-
  4488.  
  4489.  
  4490.   -----------------------------------------------------------------------------
  4491.                                                          E Toolkit Messages  59
  4492.  
  4493.  
  4494.  
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  
  4500.                            preter thread.  By setting the COMMAND_SYNC flag the
  4501.                            command is sent to the editor interpreter, therefore
  4502.                            it  will  be  executed immediately or after the last
  4503.                            command is finished executing.
  4504.  
  4505.                            When  an application other then the one that created
  4506.                            an edit window wishes to send a command to  an  edit
  4507.                            window,  that  application  must  allocate  a shared
  4508.                            segment for the command string (parameter one).  The
  4509.                            COMMAND_GETABLE flag notifies the E Toolkit that the
  4510.                            pointer in parameter one is that of a getable shared
  4511.                            segment.
  4512.  
  4513.                            When an  application  wants  the  selector  sent  in
  4514.                            parameter  one to be freed after it is used by the E
  4515.                            Toolkit, the COMMAND_FREESEL flag must be set.  This
  4516.                            flag is only valid for  selectors  allocated  within
  4517.                            the  application  that  created the edit window.   A
  4518.                            selector of a getable shared segment can't be  freed
  4519.                            by the E Toolkit with this message.
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.   -----------------------------------------------------------------------------
  4557.   60  Programmers Guide to the E Editor Toolkit. Version 2.0
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.   EPM_EDIT_COMMAND2
  4567.   _________________
  4568.  
  4569.                       -------------------------------------------
  4570.                            (EXECUTE COMMAND) - SENT TO AN E-MLE WINDOW
  4571.  
  4572.  
  4573.                            Purpose Same as EPM_EDIT_COMMAND, but if the command
  4574.                            does not exist, no error message is generated.
  4575.  
  4576.  
  4577.  
  4578.                            Message Parameter 1
  4579.  
  4580.                            See EPM_EDIT_COMMAND
  4581.  
  4582.  
  4583.  
  4584.                            Message Parameter 2
  4585.  
  4586.                            See EPM_EDIT_COMMAND
  4587.  
  4588.  
  4589.  
  4590.                            Return
  4591.  
  4592.                            See EPM_EDIT_COMMAND
  4593.  
  4594.  
  4595.  
  4596.                            Remarks
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.   -----------------------------------------------------------------------------
  4624.                                                          E Toolkit Messages  61
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.   EPM_EDIT_CHANGEFONT
  4634.   ___________________
  4635.  
  4636.                       ---------------------
  4637.                            (CHANGE E-MLE'S FONT)
  4638.  
  4639.  
  4640.                            Purpose Change E-MLE's base font.
  4641.  
  4642.  
  4643.  
  4644.                            Message Parameter 1
  4645.  
  4646.                            NAME(PSZ)
  4647.                            ____
  4648.                              Font Face Name.
  4649.  
  4650.  
  4651.  
  4652.                            Message Parameter 2
  4653.  
  4654.                            SIZE(USHORT)
  4655.                            ____
  4656.                              Point Size.
  4657.  
  4658.                            STYLE(USHORT)
  4659.                            _____
  4660.                              Attribute Style.
  4661.  
  4662.  
  4663.  
  4664.                            Remarks
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.   -----------------------------------------------------------------------------
  4694.   62  Programmers Guide to the E Editor Toolkit. Version 2.0
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.   EPM_EDIT_TASKLIST
  4704.   _________________
  4705.  
  4706.                       --------------------------
  4707.                            (SHOW/HIDE TASK LIST ENTY)
  4708.  
  4709.  
  4710.                            Purpose  This message can either show or hide a task
  4711.                            list entry corresponding to an E-MLE window.      It
  4712.                            also  allows  an  application to set a prefix string
  4713.                            before the task list entry, which typically contains
  4714.                            the name of the visible file.
  4715.  
  4716.  
  4717.  
  4718.                            Message Parameter 1
  4719.  
  4720.                            FLAG(LOUSHORT)
  4721.                            ____
  4722.                              Show task list entry flag
  4723.                              TRUE=Show entry
  4724.                              FALSE = Hide entry
  4725.  
  4726.  
  4727.  
  4728.                            Message Parameter 2
  4729.  
  4730.                            PREFIX_STRING(PSZ)
  4731.                            _____________
  4732.                              String to be pre-pended to the task list entry
  4733.  
  4734.  
  4735.  
  4736.                            Remarks This message can be either sent  of  posted,
  4737.                            however,  if this message is posted, the application
  4738.                            is responsible for freeing the string.
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.   -----------------------------------------------------------------------------
  4763.                                                          E Toolkit Messages  63
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.   EPM_EDIT_RETCODE
  4773.   ________________
  4774.  
  4775.                       ------------------------------------
  4776.                            (EDITOR COMMAND MESSAGE RETURN CODE)
  4777.  
  4778.  
  4779.                            Purpose  Send to the registered owner in response to
  4780.                            a edit command.
  4781.  
  4782.  
  4783.  
  4784.                            Message Parameter 1
  4785.  
  4786.                            RETURN STRING (PSZ)
  4787.                            ______________
  4788.                              Text describing the return code.
  4789.  
  4790.  
  4791.  
  4792.                            Message Parameter 2
  4793.  
  4794.                            RETURN CODE (USHORT)
  4795.                            ____________
  4796.                              specific editor return code.
  4797.  
  4798.  
  4799.  
  4800.                            Remarks
  4801.  
  4802.                            Sent to owner registered in the  Editor  Information
  4803.                            structure.  (See  Appendix A for more details on the
  4804.                            Edit Information structure.)   This  message  is  in
  4805.                            response  to  a  internal  editor return code/ error
  4806.                            code.
  4807.  
  4808.                            See Appendix C for editor return codes.
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.   -----------------------------------------------------------------------------
  4832.   64  Programmers Guide to the E Editor Toolkit. Version 2.0
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.   EPM_EDIT_CURSORMOVE
  4842.   ___________________
  4843.  
  4844.                       ---------------------
  4845.                            (EDITOR CURSOR MOVED)
  4846.  
  4847.  
  4848.                            Purpose  The cursor has changed position in the edit
  4849.                            window.
  4850.  
  4851.  
  4852.  
  4853.                            Message Parameter 1
  4854.  
  4855.                            ROW (ULONG)
  4856.                            ____
  4857.                              row of cursor in file
  4858.  
  4859.  
  4860.  
  4861.                            Message Parameter 2
  4862.  
  4863.                            COLUMN (ULONG)
  4864.                            _______
  4865.                              column of cursor in file
  4866.  
  4867.  
  4868.  
  4869.                            Remarks
  4870.  
  4871.                            Sent to owner registered in the  Editor  Information
  4872.                            structure.   (See Appendix A for more details on the
  4873.                            Edit Information structure.)  This message gives the
  4874.                            owner the capability to track the editor's cursor.
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.   -----------------------------------------------------------------------------
  4901.                                                          E Toolkit Messages  65
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.   EPM_EDIT_ACTIVEHWND
  4911.   ___________________
  4912.  
  4913.                       -----------------------
  4914.                            (EDITOR RECEIVED FOCUS)
  4915.  
  4916.  
  4917.                            Purpose  Notify  application  that  a  specific edit
  4918.                            window has become active.
  4919.  
  4920.  
  4921.  
  4922.                            Message Parameter 1
  4923.  
  4924.                            EDIT WINDOW HANDLE (HWND)
  4925.                            ___________________
  4926.                              Handle of active edit window.
  4927.  
  4928.  
  4929.  
  4930.                            Message Parameter 2
  4931.  
  4932.                            ACTIVE FILE NAME (PSZ)
  4933.                            _________________
  4934.                              Full path of top most file being edited in  active
  4935.                            edit window.
  4936.  
  4937.  
  4938.  
  4939.                            Remarks
  4940.  
  4941.                            Processing  this  message is useful if more than one
  4942.                            edit window is being used by  a  given  application.
  4943.                            The  application does not need to keep global infor-
  4944.                            mation on each edit window because  it  is  returned
  4945.                            via this message.
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.   -----------------------------------------------------------------------------
  4970.   66  Programmers Guide to the E Editor Toolkit. Version 2.0
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.   EPM_EDIT_OPTIONS
  4980.   ________________
  4981.  
  4982.                       -----------------------------------------------
  4983.                            (GET EDITOR OPTION INFORMATION) - SENT TO E-MLE
  4984.  
  4985.  
  4986.                            Purpose Get a specified piece of editor information.
  4987.  
  4988.  
  4989.  
  4990.                            Message Parameter 1
  4991.  
  4992.                            OPTION NUMBER (LONG)
  4993.                            ______________
  4994.  
  4995.                            OPTIONS_xxxxx constant.  (See Remarks.)
  4996.  
  4997.  
  4998.  
  4999.                            Message Parameter 2
  5000.  
  5001.                            [BUFFER](PVOID)
  5002.                            ________
  5003.  
  5004.                            Used by some options.
  5005.  
  5006.  
  5007.  
  5008.                            Return  The  returned  value  depends  on the option
  5009.                            selected.
  5010.  
  5011.                            Constant  that  specifies  one  of   the   following
  5012.                            options:
  5013.  
  5014.  
  5015.                            OPTIONS_MARGINS  Returns  4  bytes containing (lo to
  5016.                                      hi):  left marg (CHAR), right marg (CHAR),
  5017.                                      paragraph margin (CHAR), 0 (CHAR).
  5018.  
  5019.                            OPTIONS_LINE Returns line of file that contains  the
  5020.                                      cursor. (ULONG)
  5021.  
  5022.                            OPTIONS_COLUMN  Returns column of file that contains
  5023.                                      the cursor. (ULONG)
  5024.  
  5025.                            OPTIONS_INSERT Returns TRUE if cursor is  in  insert
  5026.                                      mode. (ULONG)
  5027.  
  5028.                            OPTIONS_AUTOSAVE   Returns  the  number  of  changes
  5029.                                      before autosave. (ULONG)
  5030.  
  5031.                            OPTIONS_NTABS  Returns  the  number  of  tab  stops.
  5032.                                      (ULONG)
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.   -----------------------------------------------------------------------------
  5039.                                                          E Toolkit Messages  67
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045.  
  5046.  
  5047.  
  5048.                            OPTIONS_NROWS  Returns  the  total  number  of  rows
  5049.                                      visible in the E-MLE.  (uses  the  default
  5050.                                      font height as a measument.)
  5051.  
  5052.                            OPTIONS_NCOLS  Returns  the  total number of columns
  5053.                                      visible in the E-MLE.  (uses  the  default
  5054.                                      font width as a measument.) (ULONG)
  5055.  
  5056.                            OPTIONS_MODIFY  Returns  TRUE  if  the file has been
  5057.                                      modified. (last save) (ULONG)
  5058.  
  5059.                            OPTIONS_TAB Returns a pointer to a byte-table of tab
  5060.                                      values. The table is terminated by a  NULL
  5061.                                      character. (PBYTE)
  5062.  
  5063.                            OPTIONS_SEARCH  Returns  the last string searched by
  5064.                                      locate or change. (PSZ)
  5065.  
  5066.                            OPTIONS_GETTEXT Returns the line of  text  specified
  5067.                                      by high word of option parameter.  If high
  5068.                                      word  is  NULL  the  the line in which the
  5069.                                      cursor  is  currently  on   is   returned.
  5070.                                      Parameter  2  must  contain a pointer to a
  5071.                                      255 byte character array.   The  specified
  5072.                                      line  will  be  placed  into  this buffer.
  5073.                                      (PSZ)
  5074.  
  5075.                            OPTIONS_NAME Returns the name of the visible file.
  5076.  
  5077.                            OPTIONS_HWNDEXTRA Returns the handle  to  the  extra
  5078.                                      area window. (HWND)
  5079.  
  5080.                            OPTIONS_HWNDEIOBJECT  Returns  the  handle to the EI
  5081.                                      Work Thread. (PVOID)
  5082.  
  5083.                            OPTIONS_TEXTCOLOR  Returns   the   text   Foreground
  5084.                                      (LOUSHORT) and Background (HIUSHORT).
  5085.  
  5086.                            OPTIONS_RING  Returns  a buffer filled with the name
  5087.                                      of the files within the E-MLE ring.    The
  5088.                                      buffer has the following format:
  5089.  
  5090.                                            USHORT - length of filenames
  5091.                                            UCHAR  - delimitor
  5092.                                            ULONG  - fileid
  5093.                                            CHAR[] - delimited string
  5094.  
  5095.                            OPTIONS_FILEID  Returns  the  File ID of the visible
  5096.                                      file.
  5097.  
  5098.                            OPTIONS_QSELECTION Returns the type of selection.
  5099.  
  5100.                            This message is send to a edit window to get a spec-
  5101.                            ified option.  All options are returned in the  form
  5102.  
  5103.  
  5104.   -----------------------------------------------------------------------------
  5105.   68  Programmers Guide to the E Editor Toolkit. Version 2.0
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.                            of  a  4  byte  return code.   Here is an example of
  5115.                            using the Option message to get the total numbers of
  5116.                            visible lines in a edit window.
  5117.  
  5118.  
  5119.                                 VisibleLines = (ULONG)WinSendMsg( hwndEditWindow,
  5120.                                                                   EPM_EDIT_OPTIONS,
  5121.                                                                   OPTIONS_NROWS,
  5122.                                                                   0L
  5123.                                                                 );
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.   -----------------------------------------------------------------------------
  5171.                                                          E Toolkit Messages  69
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.   EPM_EDIT_ID
  5181.   ___________
  5182.  
  5183.                       ----------------------
  5184.                            QUERY EDITOR ID NUMBER
  5185.  
  5186.  
  5187.                            Purpose  Determine  if a window handle is your E-MLE
  5188.                            window.
  5189.  
  5190.  
  5191.  
  5192.                            Message Parameter 1
  5193.  
  5194.                            NULL
  5195.                            ____
  5196.                              not used
  5197.  
  5198.  
  5199.  
  5200.                            Message Parameter 2
  5201.  
  5202.                            NULL
  5203.                            ____
  5204.                              not used
  5205.  
  5206.  
  5207.  
  5208.                            Remarks
  5209.  
  5210.                            This message is used to determine if a window handle
  5211.                            is a edit window handle.   This  message  returns  a
  5212.                            4byte  return  code.    The  way to determine if the
  5213.                            specified handle is a edit window is by checking  if
  5214.                            the  Hi-order word contains the value of EPM_EDIT_ID
  5215.                            and the Lo-order word contains the  value  specified
  5216.                            in the create structure field, 'editid'.  If a match
  5217.                            is found in the Hi-order word then the window handle
  5218.                            is  a  edit window.  If a match is found in both the
  5219.                            Hi-order word and the Lo-order word, then the window
  5220.                            handle is a edit window created by your application.
  5221.                            An example follows:
  5222.  
  5223.  
  5224.                                    result = WinSendMsg( hwndE, EPM_EDIT_ID, 0L, 0L );
  5225.                                    match  = MPFROM2SHORT(epm.editid,EPM_EDIT_ID);
  5226.  
  5227.                                    if (result==match) {
  5228.                                        /* Edit window found */
  5229.                                    }
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.   -----------------------------------------------------------------------------
  5240.   70  Programmers Guide to the E Editor Toolkit. Version 2.0
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.   EPM_EDIT_SHOW
  5250.   _____________
  5251.  
  5252.                       ------------------------------------
  5253.                            (MAKE EDIT WINDOW VISIBLE/INVISIBLE)
  5254.  
  5255.  
  5256.                            Purpose Refresh and Show/Hide the edit window speci-
  5257.                            fied.
  5258.  
  5259.  
  5260.  
  5261.                            Message Parameter 1
  5262.  
  5263.                            SHOW FLAG(Bool)
  5264.                            _________
  5265.                              TRUE  = Show and Refresh edit window
  5266.                              FALSE = Hide edit window
  5267.  
  5268.  
  5269.  
  5270.                            Message Parameter 2
  5271.  
  5272.                            NULL
  5273.                            ____
  5274.                              not used
  5275.  
  5276.  
  5277.  
  5278.                            Remarks
  5279.  
  5280.                            When an edit window is created (using EtkCreate) the
  5281.                            WS_VISIBLE  flag  is  not  used  as  a window style.
  5282.                            Therefore, the edit window is not visible upon  cre-
  5283.                            ation.    It  is  recommended  that an EPM_EDIT_SHOW
  5284.                            message be sent to the edit window to  be  displayed
  5285.                            instead   of  WinShowWindow(...).    The  difference
  5286.                            between  sending  the   EPM_EDIT_SHOW   verses   the
  5287.                            WinShowWindow  is  that  the  EPM_EDIT_SHOW forces a
  5288.                            window repaint.
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.   -----------------------------------------------------------------------------
  5309.                                                          E Toolkit Messages  71
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.   EPM_EDIT_NEWFILE
  5319.   ________________
  5320.  
  5321.                       ------------------------
  5322.                            (OPEN A NEW EDIT WINDOW)
  5323.  
  5324.  
  5325.                            Purpose  Open  a  new edit window with the specified
  5326.                            file.
  5327.  
  5328.  
  5329.  
  5330.                            Message Parameter 1
  5331.  
  5332.                            FILE NAME(PSZ)
  5333.                            _________
  5334.                             Asciiz string  pointer  to  any  legal  file  name.
  5335.                            (Wildcards are supported)
  5336.  
  5337.  
  5338.  
  5339.                            Message Parameter 2
  5340.  
  5341.                            STRING FLAGS (MPARAM)
  5342.                            _____________
  5343.                             Flags  specifying  how  to  handle  the  pointer in
  5344.                            parameter one.
  5345.                             The following are flags that can be set.
  5346.  
  5347.  
  5348.                            o   COMMAND_GETABLE  -  The  pointer  is  a  getable
  5349.                                shared segment. Use
  5350.                                                      DosGetSeg(SELECTOROF(mp1)
  5351.                                ) to access the pointer.
  5352.  
  5353.                            o   COMMAND_FREESEL  -  The  selector  must be freed
  5354.                                after it is used by the
  5355.                                                      application.           Use
  5356.                                DosFreeSeg( FP_SEG(mp1) ) to
  5357.                                                      free the selector.
  5358.  
  5359.  
  5360.                            Returns
  5361.                               void
  5362.  
  5363.  
  5364.  
  5365.                            Remarks
  5366.  
  5367.                            An  edit  window  is  requesting  that  another edit
  5368.                            window be opened.  This message should be handled by
  5369.                            calling EtkCreate.:  The  macros  used  by  the  EPM
  5370.                            editor  use  this  message  to  implement the 'OPEN'
  5371.                            command.
  5372.  
  5373.                            The Flags in parameter two  are  checked  by  anding
  5374.                            parameter two with the constants COMMAND_GETABLE and
  5375.  
  5376.  
  5377.   -----------------------------------------------------------------------------
  5378.   72  Programmers Guide to the E Editor Toolkit. Version 2.0
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.                            COMMAND_FREESEL.    For  example  to  check  if  the
  5388.                            COMMAND_GETABLE flag is set do the folowing:
  5389.  
  5390.  
  5391.                                if( LONGFROMMP(mp2) & COMMAND_FREESEL ) {
  5392.                                  /* the free selector flag is set */
  5393.                                  }
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.   -----------------------------------------------------------------------------
  5444.                                                          E Toolkit Messages  73
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.   EPM_EDIT_DESTROYNOTIFY
  5454.   ______________________
  5455.  
  5456.                       -------------------------
  5457.                            (A E-MLE HAS BEEN CLOSED)
  5458.  
  5459.  
  5460.                            Purpose  Notify  owner that an E-MLE window has been
  5461.                            closed.
  5462.  
  5463.  
  5464.  
  5465.                            Message Parameter 1
  5466.  
  5467.                            EDIT HANDLE(HWND)
  5468.                            ___________
  5469.                             Handle to the client window  of  the  E-MLE  window
  5470.                            that was just closed.
  5471.  
  5472.  
  5473.  
  5474.                            Message Parameter 2
  5475.  
  5476.                            MESSAGE  QUEUE(HMQ)  Handle  to  the  message  queue
  5477.                            ______________
  5478.                            formally being used by the  E-MLE  window  that  was
  5479.                            just closed.
  5480.  
  5481.  
  5482.  
  5483.                            Returns
  5484.                               void
  5485.  
  5486.  
  5487.  
  5488.                            Remarks
  5489.  
  5490.                            Sent  to  owner registered in the Editor Information
  5491.                            structure.  (See Appendix A for more details on  the
  5492.                            Edit Information structure.)  This message gives the
  5493.                            owner  the  ability  to take some action when a edit
  5494.                            window is closed.    Note  that  the  window  handle
  5495.                            passed is not valid.  It is to be used for reference
  5496.                            only.
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.  
  5510.  
  5511.  
  5512.   -----------------------------------------------------------------------------
  5513.   74  Programmers Guide to the E Editor Toolkit. Version 2.0
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.   EPM_EXTRAWINDOW_REFRESH
  5523.   _______________________
  5524.  
  5525.                       ------------------------------
  5526.                            (REFRESH EXTRA WINDOW CONTROL)
  5527.  
  5528.  
  5529.                            Purpose  Repaint  the  optional editor extra window,
  5530.                            updating all values.
  5531.  
  5532.  
  5533.  
  5534.                            Message Parameter 1
  5535.  
  5536.                            NULL(MPARAM)
  5537.                            ____
  5538.                             not used
  5539.  
  5540.  
  5541.  
  5542.                            Message Parameter 2
  5543.  
  5544.                            NULL (MPARAM)
  5545.                            _____
  5546.                              not used
  5547.  
  5548.  
  5549.  
  5550.                            Returns
  5551.                               VOID
  5552.  
  5553.  
  5554.  
  5555.                            Remarks
  5556.  
  5557.                            The Extra Window control can provide two extra lines
  5558.                            of text,  the status area and the message area.:  To
  5559.                            obtain   the   extra   window   handle,    send    a
  5560.                            EPM_EDIT_OPTION  message to the edit window in ques-
  5561.                            tion.   When  sending  the  option  message  specify
  5562.                            OPTION_HWNDEXTRA as message parameter one.
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.   -----------------------------------------------------------------------------
  5582.                                                          E Toolkit Messages  75
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.   EPM_EDIT_CONTROLTOGGLE
  5592.   ______________________
  5593.  
  5594.                       ---------------------------------------------------------
  5595.                            (TOGGLE OR QUERY THE STATUS OF A BASE EDIT WINDOW
  5596.                            CONTROL)
  5597.  
  5598.  
  5599.                            Purpose  Toggle a editor control on/off or force the
  5600.                            control on/off.
  5601.  
  5602.  
  5603.  
  5604.                            Message Parameter 1
  5605.  
  5606.                            ID(LOUSHORT)
  5607.                            __
  5608.                             Control identifier; See table below.
  5609.  
  5610.                            RCE ON/OFF(HIUSHORT)
  5611.                            __________
  5612.                             Set to 2=ON, or 1=OFF
  5613.  
  5614.  
  5615.  
  5616.                            Message Parameter 2
  5617.  
  5618.                            QUERY FLAG (MPARAM)
  5619.                            ___________
  5620.                              TRUE if control is to be Queried, otherwise FALSE.
  5621.  
  5622.  
  5623.  
  5624.                            Returns
  5625.                               void
  5626.  
  5627.  
  5628.  
  5629.                            Remarks
  5630.  
  5631.                            This message is send to an  edit  window  to  toggle
  5632.                            (turn  ON  or  OFF) some editor control window.  The
  5633.                            message can also  be  used  to  force  a  particular
  5634.                            control  on  or  off.:   The lo-ordered short of the
  5635.                            first message parameter contains an id  number  that
  5636.                            determines the control window.  The id constants are
  5637.                            as follows:
  5638.  
  5639.                            EDITSTATUSAREA Status area of extra window control.
  5640.                            EDITMSGAREA Message area of extra window control
  5641.                            EDITVSCROLL Vertical scroll bar
  5642.                            EDITHSCROLL Horizontal scroll bar
  5643.                            EDITTITLEBAR  Stops  automatic updating of title bar
  5644.                                      with filename.   This  is  useful  if  the
  5645.                                      application  requires  the  title  bar  to
  5646.                                      display text other then the  current  file
  5647.                                      being edited.
  5648.                            EDITCURSOR Editor cursor
  5649.  
  5650.  
  5651.   -----------------------------------------------------------------------------
  5652.   76  Programmers Guide to the E Editor Toolkit. Version 2.0
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.                            The  hi-ordered short of the first message parameter
  5663.                            contains an optional value.   If the value  is  null
  5664.                            then the control is toggled.  If it is non- zero the
  5665.                            control  status  is set to one less the value.  This
  5666.                            value should be set to 2 if you want  to  force  the
  5667.                            control  on, or one if you want to force the control
  5668.                            off.
  5669.  
  5670.                            Parameter contain the Query Flag.   If parameter  is
  5671.                            non-zero  the  status  of  the  specified control is
  5672.                            returned.  That is, TRUE is returned if the  control
  5673.                            is active or FALSE if it is not.
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.   -----------------------------------------------------------------------------
  5718.                                                          E Toolkit Messages  77
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.   EPM_EDIT_RECORDKEY-
  5728.   ___________________
  5729.  
  5730.                       ----------------------------
  5731.                            (START RECORDING KEYSTROKES)
  5732.  
  5733.  
  5734.                            Purpose  Start  the recording of keystrokes (WM_CHAR
  5735.                            messages) sent to the edit window.
  5736.  
  5737.  
  5738.  
  5739.                            Message Parameter 1
  5740.  
  5741.                            NULL (MPARAM)
  5742.                            _____
  5743.                              not used
  5744.  
  5745.  
  5746.  
  5747.                            Message Parameter 2
  5748.  
  5749.                            NULL (MPARAM)
  5750.                            _____
  5751.                              not used
  5752.  
  5753.  
  5754.  
  5755.                            Returns
  5756.                               void
  5757.  
  5758.  
  5759.  
  5760.                            Remarks
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.   -----------------------------------------------------------------------------
  5787.   78  Programmers Guide to the E Editor Toolkit. Version 2.0
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.   EPM_EDIT_ENDRECORDKEY-
  5797.   ______________________
  5798.  
  5799.                       -------------------------
  5800.                            (STOP STORING KEYSTROKES)
  5801.  
  5802.  
  5803.                            Purpose   Terminates   the   storing  of  keystrokes
  5804.                            (WM_CHAR messages) started by the EPM_EDIT_RECORDKEY
  5805.                            message.
  5806.  
  5807.  
  5808.  
  5809.                            Message Parameter 1
  5810.  
  5811.                            NULL (MPARAM)
  5812.                            _____
  5813.                              not used
  5814.  
  5815.  
  5816.  
  5817.                            Message Parameter 2
  5818.  
  5819.                            NULL (MPARAM)
  5820.                            _____
  5821.                              not used
  5822.  
  5823.  
  5824.  
  5825.                            Returns
  5826.                               void
  5827.  
  5828.  
  5829.  
  5830.                            Remarks
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.   -----------------------------------------------------------------------------
  5856.                                                          E Toolkit Messages  79
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.   EPM_EDIT_PLAYKEY
  5866.   ________________
  5867.  
  5868.                       ----------------------------------------------
  5869.                            (EXECUTE STORED KEYSTROKES) - SENT TO AN E-MLE
  5870.  
  5871.  
  5872.                            Purpose Generate keystrokes (WM_CHAR messages) saved
  5873.                            since the EPM_EDIT_RECORDKEY message has been sent.
  5874.  
  5875.  
  5876.  
  5877.                            Message Parameter 1
  5878.  
  5879.                            NULL (MPARAM)
  5880.                            _____
  5881.                              not used
  5882.  
  5883.  
  5884.  
  5885.                            Message Parameter 2
  5886.  
  5887.                            NULL (MPARAM)
  5888.                            _____
  5889.                              not used
  5890.  
  5891.  
  5892.  
  5893.                            Returns
  5894.                               void
  5895.  
  5896.  
  5897.  
  5898.                            Remarks
  5899.  
  5900.                            It is recommend that a EPM_EDIT_ENDRECORDKEY message
  5901.                            be  sent  before  this message is sent.  If the edit
  5902.                            window is still in record mode when the  message  is
  5903.                            sent an error message is sent to the owner window.
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.   -----------------------------------------------------------------------------
  5925.   80  Programmers Guide to the E Editor Toolkit. Version 2.0
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.   EPM_EDIT_QUERYRECORDKEY
  5935.   _______________________
  5936.  
  5937.                       ----------------------------
  5938.                            (DETERMINE RECORD KEY STATE)
  5939.  
  5940.  
  5941.                            Purpose  Returns  TRUE  if  edit window is recording
  5942.                            keys.
  5943.  
  5944.  
  5945.  
  5946.                            Message Parameter 1
  5947.  
  5948.                            NULL (MPARAM)
  5949.                            _____
  5950.                              not used
  5951.  
  5952.  
  5953.  
  5954.                            Message Parameter 2
  5955.  
  5956.                            NULL (MPARAM)
  5957.                            _____
  5958.                              not used
  5959.  
  5960.  
  5961.  
  5962.                            Returns
  5963.                               TRUE = edit window is recording keys.
  5964.  
  5965.  
  5966.  
  5967.                            Remarks
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.   -----------------------------------------------------------------------------
  5994.                                                          E Toolkit Messages  81
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.   EPM_EDIT_ASKTOQUIT
  6004.   __________________
  6005.  
  6006.                       ---------------------------------
  6007.                            (REQUEST TO QUIT A MODIFIED FILE)
  6008.  
  6009.  
  6010.                            Purpose  Notify  application that a request has been
  6011.                            sent to quit a file which has been modified.
  6012.  
  6013.  
  6014.  
  6015.  
  6016.                            Message Parameter 1
  6017.  
  6018.                            FILENAME (PSZ)
  6019.                            _________
  6020.                             Name of file that has been modified.
  6021.  
  6022.  
  6023.  
  6024.                            Message Parameter 2
  6025.  
  6026.                            HEDITWND (HWND)
  6027.                            _________
  6028.                             The edit window's handle.
  6029.  
  6030.  
  6031.  
  6032.                            Remarks
  6033.  
  6034.                            This  message  is  sent  after  the  E  toolkit  has
  6035.                            received  notice to quit a modified file. The appli-
  6036.                            cation must respond to this message  by  sending  an
  6037.                            EPM_EDIT_ASKTODONE   message.  When  an  application
  6038.                            receives this message it is a good  time  to  pop  a
  6039.                            dialog to the user asking what action to take.  (See
  6040.                            the Quitbox dialog for an example )
  6041.  
  6042.  
  6043.  
  6044.                            Related Messages
  6045.  
  6046.  
  6047.                               EPM_EDIT_ASKTOCLOSE
  6048.                               EPM_EDIT_ASKTOFAILED
  6049.                               EPM_EDIT_ASKTODONE
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.   -----------------------------------------------------------------------------
  6063.   82  Programmers Guide to the E Editor Toolkit. Version 2.0
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.   EPM_EDIT_ASKTOCLOSE
  6073.   ___________________
  6074.  
  6075.                       ---------------------------------
  6076.                            (REQUEST TO CLOSE AN EDIT WINDOW)
  6077.  
  6078.  
  6079.                            Purpose  Notify  application  that  a request has be
  6080.                            sent to close an edit window which contains  a  file
  6081.                            that has been modified.
  6082.  
  6083.  
  6084.  
  6085.                            Message Parameter 1
  6086.  
  6087.                            FILENAME (PSZ)
  6088.                            _________
  6089.                             Name of file that has been modified.
  6090.  
  6091.  
  6092.  
  6093.                            Message Parameter 2
  6094.  
  6095.                            HEDITWND (HWND)
  6096.                            _________
  6097.                             The edit window's handle.
  6098.  
  6099.  
  6100.  
  6101.                            Remarks
  6102.  
  6103.                            This  message  is  sent  after  the  E  toolkit  has
  6104.                            received notice to close an edit window  which  con-
  6105.                            tains  a modified file. The application must respond
  6106.                            to this message by  sending  an  EPM_EDIT_ASKKTODONE
  6107.                            message.
  6108.  
  6109.  
  6110.  
  6111.                            Related Messages
  6112.  
  6113.                               EPM_EDIT_ASKTOQUIT
  6114.                               EPM_EDIT_ASKTOFAILED
  6115.                               EPM_EDIT_ASKTODONE
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.   -----------------------------------------------------------------------------
  6132.                                                          E Toolkit Messages  83
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.   EPM_EDIT_ASKTODONE
  6142.   __________________
  6143.  
  6144.                       --------------------------------------
  6145.                            (RESPOND TO EPM_EDIT_ASKTOXXX MESSAGE)
  6146.  
  6147.  
  6148.                            Purpose Respond to one of the EPM_EDIT_ASKTOxxx mes-
  6149.                            sages from the E toolkit.
  6150.  
  6151.  
  6152.  
  6153.                            Message Parameter 1
  6154.  
  6155.                            RETCODE (MPFROMSHORT)
  6156.                            ________
  6157.                             Response message sent to E toolkit. One of the fol-
  6158.                            lowing messages can be used:
  6159.  
  6160.                            o   ERES_CANCEL  - Cancel the closing of the file or
  6161.                                edit window.
  6162.  
  6163.                            o   ERES_DISCARD  -  Discard  the  modifications and
  6164.                                continue closing.
  6165.  
  6166.                            o   ERES_SAVE     - Save file as  message  parameter
  6167.                                two and continue closing.
  6168.  
  6169.  
  6170.                            Message Parameter 2
  6171.  
  6172.                            FILENAME (PSZ) Name of file to save modifications in
  6173.                            _________
  6174.                            if  EPM_SAVE is sent.  This pointer must be the same
  6175.                            pointer sent to the applications  with  one  of  the
  6176.                            EPM_EDIT_ASKTOxxx messages.
  6177.  
  6178.  
  6179.  
  6180.                            Remarks
  6181.  
  6182.                            This  message  allows  the  application  control the
  6183.                            saving or discarding of a modified file when an edit
  6184.                            window is closing, a  quit  file  message  has  been
  6185.                            sent,  or when a previous EPM_EDIT_ASKTODONE message
  6186.                            returned EPM_EDIT_ASKTOFAILED.
  6187.  
  6188.  
  6189.  
  6190.                            Related Messages
  6191.  
  6192.                               EPM_EDIT_ASKTQUIT
  6193.                               EPM_EDIT_ASKTOCLOSE
  6194.                               EPM_EDIT_ASKTODONE
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.   -----------------------------------------------------------------------------
  6201.   84  Programmers Guide to the E Editor Toolkit. Version 2.0
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.   EPM_EDIT_ASKTOFAILED
  6211.   ____________________
  6212.  
  6213.                       --------------------------------
  6214.                            (LAST EPM_EDIT_ASKTODONE FAILED)
  6215.  
  6216.  
  6217.                            Purpose  Notify  application that the file name sent
  6218.                            with the last EPM_EDIT_ASKTODONE message  could  not
  6219.                            be saved with the name specified.
  6220.  
  6221.  
  6222.  
  6223.                            Message Parameter 1
  6224.  
  6225.                            FILENAME (filename)
  6226.                            _________
  6227.                             File name used which caused an error in saving.
  6228.  
  6229.  
  6230.  
  6231.                            Message Parameter 2
  6232.  
  6233.                            HEDITWND (HWND)
  6234.                            _________
  6235.                             The edit window's handle.
  6236.  
  6237.  
  6238.  
  6239.                            Remarks
  6240.  
  6241.                            This  message  informs the application that the file
  6242.                            name sent with the  EPM_EDIT_ASKTODONE  message  and
  6243.                            message parameter EPM_SAVE, was a bad file name. The
  6244.                            application  should  correct  the file name and send
  6245.                            another EPM_EDIT_ASKTODONE message.
  6246.  
  6247.  
  6248.  
  6249.                            Related Messages
  6250.  
  6251.                               EPM_EDIT_ASKTQUIT
  6252.                               EPM_EDIT_ASKTOCLOSE
  6253.                               EPM_EDIT_ASKTOFAILED
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.   -----------------------------------------------------------------------------
  6270.                                                          E Toolkit Messages  85
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.  
  6282.  
  6283.  
  6284.  
  6285.  
  6286.  
  6287.  
  6288.  
  6289.  
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335.   -----------------------------------------------------------------------------
  6336.   86  Programmers Guide to the E Editor Toolkit. Version 2.0
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.  
  6343.  
  6344.  
  6345.   ERES.DLL
  6346.   ________
  6347.  
  6348.  
  6349.  
  6350.  
  6351.  
  6352.  
  6353.  
  6354.                            ERES.DLL  exports  a set a general purpose functions
  6355.                            that can be used by  an  application  that  contains
  6356.                            E-MLE's.   These  functions  are  detailed  in  this
  6357.                            section.  IN ORDER TO USE THESE FUNCTIONS AN  APPLI-
  6358.                                      __________________________________________
  6359.                            CATION  MUST DO THE FOLLOWING IN THE ORDER GIVEN:
  6360.                            _________________________________________________
  6361.  
  6362.                            1)  Include  ETOOLKT.H  in all source files that use
  6363.                                ERES.DLL functions.  The main source file of the
  6364.                                application   should   define    the    constant
  6365.                                INCL_DONT_EXT_GLOB  before  including etoolkt.h.
  6366.                                For example:
  6367.  
  6368.                                        #define INCL_DONT_EXT_GLOB
  6369.                                        #include <ETOOLKT.H>
  6370.  
  6371.                            2)  Declare a variable of type GLOBDATA in the  main
  6372.                                source file of the application.
  6373.  
  6374.  
  6375.                            3)  Load  the  ERES.DLL  module  and  initialize the
  6376.                                "eresModule" field of the GLOBDATA variable with
  6377.                                the ERES.DLL module handle.
  6378.  
  6379.                                         // Note that GlobData is a variable of type GLOBDATA
  6380.                                         DosLoadModule((PSZ)NULL,(USHORT)0,(PSZ)"ERES",
  6381.                                                       (PHMODULE)&GlobData.eresModule );
  6382.  
  6383.                            4)  The  following  three  function  calls  must  be
  6384.                                called next.
  6385.  
  6386.                                          ERESRegisterEtkFunctions((PFN) EtkCreate,  CREATE_FUNC);
  6387.                                          ERESRegisterEtkFunctions((PFN) EtkDestroy, DESTROY_FUNC);
  6388.                                          ERESRegisterEtkFunctions((PFN) EtkVersion,       VERSION_FUNC);
  6389.  
  6390.                                (See  ERESRegisterEtkFunctions  in  the  section
  6391.                                "ERES.DLL Exported Functions" for an explanation
  6392.                                of these function calls)
  6393.  
  6394.  
  6395.                            5)  Call the function ERESInitEresGlob()   in  order
  6396.                                to initialize the internal data of ERES.DLL.
  6397.  
  6398.  
  6399.                            6)  Required fields of the variable of type GLOBDATA
  6400.                                must be initialized.  These are:
  6401.  
  6402.  
  6403.  
  6404.   -----------------------------------------------------------------------------
  6405.                                                                    ERES.DLL  87
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.                                o   eres.exfilename  -  name of the applications
  6415.                                    EX file.
  6416.                                o   ApplicationName - name of the application.
  6417.                                o   ExSearchPath     - search path for EX files.
  6418.                                    Set to NULL if search
  6419.                                                          path includes only the
  6420.                                    current directory.
  6421.                                o   ApplicationID   - a unique ID  that  distin-
  6422.                                    guishes the edit windows
  6423.                                                          of the application.
  6424.  
  6425.  
  6426.   ERES.DLL - EXPORTED FUNCTIONS
  6427.   _____________________________
  6428.  
  6429.  
  6430.  
  6431.                            The following functions are exported from ERES.DLL
  6432.  
  6433.  
  6434.                               .--------------------------------------------------------------------------.
  6435.                               |   Dynalink functions found in ERES.DLL                                   |
  6436.                               |--------------------------------------------------------------------------|
  6437.                               |                                                                          |
  6438.                               |   ERESRegisterEtkFunctions  - Register pointer to E.DLL functions        |
  6439.                               |   ERESCommonWndProc         - Common window procedure                    |
  6440.                               |   EresSaveLists             - Saves internal list data to ini file       |
  6441.                               |   ERESRetrieveLists         - Retrieves internal list data from ini file |
  6442.                               |   ERESOpenEditWindow        - Opens a new edit window                    |
  6443.                               |   ERESCountEWindows         - Counts the number of edit windows          |
  6444.                               |   ERESPopDlgBox             - Pop Dialog box                             |
  6445.                               |   ERESIsAnEditWin           - Is an edit window                          |
  6446.                               |   ERESEwindowValid          - Edit window valid                          |
  6447.                               |   ERESSendOpenMsgToApp      - Send open message to application           |
  6448.                               |   ERESShutDown              - Shut down all edit windows                 |
  6449.                               |   ERESInitEResStruct        - Initialize the ERES structure              |
  6450.                               |   ERESCheckVersion          - Check the E.DLL version                    |
  6451.                               |   ERESProcessCommands       - Process command messages.                  |
  6452.                               |   ERESEditWindowlist        - Show listing of available edit windows.    |
  6453.                               |                                                                          |
  6454.                               .--------------------------------------------------------------------------.
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.   -----------------------------------------------------------------------------
  6472.   88  Programmers Guide to the E Editor Toolkit. Version 2.0
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.                                                      ERESREGISTERETKFUNCTIONS -
  6482.                                                      __________________________
  6483.                                         (REGISTERS POINTERS TO E.DLL FUNCTIONS)
  6484.                                         _______________________________________
  6485.  
  6486.   -----------------------------------------------------------------------------
  6487.                            Allows  ERES.DLL  to  call  E.DLL  functions without
  6488.                            having to import them.
  6489.  
  6490.  
  6491.  
  6492.                       +-------------------------------------------------------+
  6493.                       | ERESREGISTERETKFUNCTIONS (,  )                        |
  6494.                       +-------------------------------------------------------+
  6495.        PARAMETERS
  6496.  
  6497.  
  6498.                       FUNCPTR (PFN) - input
  6499.                               _____
  6500.                            Pointer to E.DLL function. One of the following  can
  6501.                            be used:
  6502.  
  6503.                            o   EtkCreate
  6504.                            o   EtkDestroy
  6505.                            o   EtkVersion
  6506.  
  6507.                       ID (USHORT) - input
  6508.                          ________
  6509.                            Function  identifier.  One  of  the following can be
  6510.                            used:
  6511.  
  6512.                            o   CREATE_FUNC  - EditWindowCreate
  6513.                            o   DESTROY_FUNC - EditWindowDestroy
  6514.                            o   VERSION_FUNC - EditVersion
  6515.        RETURNS
  6516.                              Void
  6517.  
  6518.        REMARKS
  6519.                            Currently an application must send the  pointers  of
  6520.                            E.DLL  functions  required  by  ERES.DLL in order to
  6521.                            avoid reloading of the E.DLL module.  Due  to  an  a
  6522.                            debug  in the operating system if two modules in the
  6523.                            same application import the same module, that module
  6524.                            is reloaded. Therefore,  this  function  avoids  the
  6525.                            costly  reloading  of  the  E.DLL  module. Util this
  6526.                            problem is  resolved  the  following  code  must  be
  6527.                            placed after an application loades eres.dll:
  6528.        EXAMPLE
  6529.                                 ERESRegisterEtkFunctions((PFN) EtkCreate,  CREATE_FUNC);
  6530.                                 ERESRegisterEtkFunctions((PFN) EtkDestroy, DESTROY_FUNC);
  6531.                                 ERESRegisterEtkFunctions((PFN) EtkVersion, VERSION_FUNC);
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.   -----------------------------------------------------------------------------
  6542.                                                                    ERES.DLL  89
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.  
  6550.  
  6551.   ERESCOMMONWNDPROC
  6552.   _________________
  6553.  
  6554.                       -------------------------
  6555.                            (COMMON WINDOW PROCEDURE)
  6556.  
  6557.  
  6558.                            Purpose Handles default window message processing of
  6559.                            E toolkit applications.
  6560.  
  6561.  
  6562.  
  6563.  
  6564.                            Prototype:  ERESCOMMONWNDPROC
  6565.                                     ____________________
  6566.  
  6567.  
  6568.  
  6569.                            Parameters
  6570.  
  6571.                            HWND (HWND)
  6572.                            _____
  6573.                              The window handle of the application.
  6574.  
  6575.                            MSG (HWND)
  6576.                            ____
  6577.                              The window message.
  6578.  
  6579.                            MP1 (MPARAM)
  6580.                            ____
  6581.                              Message parameter one.
  6582.  
  6583.                            MP2 (MPARAM)
  6584.                            ____
  6585.                              Message parameter two.
  6586.  
  6587.  
  6588.  
  6589.                            Returns
  6590.                              VOID
  6591.  
  6592.  
  6593.  
  6594.                            Remarks
  6595.  
  6596.                            Applications  that  choose  to call this function as
  6597.                            their default window procedure will have the default
  6598.                            message processing  for  E  toolkit  messages.  (See
  6599.                            Appendix  H for a description of these messages) The
  6600.                            Window ULONG of the applications window handle  must
  6601.                            be  set  to the address of the GLOBDATA structure in
  6602.                            order to process application specific information.
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.   -----------------------------------------------------------------------------
  6614.   90  Programmers Guide to the E Editor Toolkit. Version 2.0
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620.  
  6621.  
  6622.  
  6623.   ERESSAVELISTS
  6624.   _____________
  6625.  
  6626.                       --------------------------------------
  6627.                            (SAVES INTERNAL LIST DATA TO INI FILE)
  6628.  
  6629.  
  6630.                            Purpose  Saves  the  internal data structures of the
  6631.                            Open File, List Box, and Command Dialog boxes in the
  6632.                            ini file specified in the GLOBDATA structure.
  6633.  
  6634.  
  6635.  
  6636.                            Prototype:  ERESSAVELISTS
  6637.                                     ________________
  6638.  
  6639.  
  6640.  
  6641.                            Parameters
  6642.  
  6643.                            GLOBDATA (GLOBDATA *)
  6644.                            _________
  6645.                              Pointer to application instance data.
  6646.  
  6647.  
  6648.  
  6649.                            Returns
  6650.                              Void
  6651.  
  6652.  
  6653.  
  6654.                            Remarks
  6655.  
  6656.                            GlobData->IniApplicationName contains  the  name  of
  6657.                            the   ini   file   to   store   the  structures  in.
  6658.                            GlobData->eres contains the structures cmd, msg, and
  6659.                            open1 which are the structures  used  by  the  three
  6660.                            dialog boxes.
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.  
  6671.  
  6672.  
  6673.  
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682.   -----------------------------------------------------------------------------
  6683.                                                                    ERES.DLL  91
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.   ERESRETRIEVELISTS
  6693.   _________________
  6694.  
  6695.                       --------------------------------------------
  6696.                            (RETRIEVES INTERNAL LIST DATA FROM INI FILE)
  6697.  
  6698.                            Purpose  Retrieves  the  internal data structures of
  6699.                            the Open File, List Box, and  Command  Dialog  boxes
  6700.                            from  the  ini file specified in the GLOBDATA struc-
  6701.                            ture.
  6702.  
  6703.  
  6704.  
  6705.                            Prototype:  ERESRETRIEVELISTS
  6706.                                     ____________________
  6707.  
  6708.  
  6709.  
  6710.                            Parameters
  6711.  
  6712.                            GLOBDATA (GLOBDATA *)
  6713.                            _________
  6714.                              Pointer to application instance data.
  6715.  
  6716.  
  6717.  
  6718.                            Returns
  6719.                              VOID
  6720.  
  6721.  
  6722.  
  6723.                            Remarks
  6724.  
  6725.                            GlobData->IniApplicationName contains  the  name  of
  6726.                            the  ini  file  to  retrieve  the  structures  from.
  6727.                            GlobData->eres contains the structures cmd, msg, and
  6728.                            open1 which are the structures  used  by  the  three
  6729.                            dialog  boxes. These will be filled with the data in
  6730.                            the specified ini file.
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.  
  6740.  
  6741.  
  6742.  
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.  
  6749.  
  6750.  
  6751.   -----------------------------------------------------------------------------
  6752.   92  Programmers Guide to the E Editor Toolkit. Version 2.0
  6753.  
  6754.  
  6755.  
  6756.  
  6757.  
  6758.  
  6759.  
  6760.  
  6761.   ERESOPENEDITWINDOW
  6762.   __________________
  6763.  
  6764.                       -------------------------
  6765.                            (OPENS A NEW EDIT WINDOW)
  6766.  
  6767.  
  6768.                            Purpose  Initializes  the  EDITORINFO structure with
  6769.                            application   specific   data    and    calls    the
  6770.                            EPM_CreateEditWindow function of E.DLL .
  6771.  
  6772.  
  6773.  
  6774.                            Prototype:  ERESOPENEDITWINDOW
  6775.                                     _____________________
  6776.  
  6777.  
  6778.  
  6779.                            Parameters
  6780.  
  6781.                            FILENAME (char far *)
  6782.                            _________
  6783.                              Pointer to the string containing the file to edit.
  6784.  
  6785.                            GLOBDATA (GLOBDATA *)
  6786.                            _________
  6787.                             Application instance data.
  6788.  
  6789.  
  6790.  
  6791.                            Returns HWNDEDIT (HWND) The window handle of the new
  6792.                                    _________
  6793.                            edit window.
  6794.  
  6795.  
  6796.  
  6797.                            Remarks
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.   -----------------------------------------------------------------------------
  6823.                                                                    ERES.DLL  93
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.   ERESCOUNTEWINDOWS
  6833.   _________________
  6834.  
  6835.                       ------------------------------------------------
  6836.                            (COUNTS THE NUMBER OF E-MULTI-LINE EDIT WINDOWS)
  6837.  
  6838.  
  6839.                            Purpose  Determines  the  number  of  available edit
  6840.                            windows.
  6841.  
  6842.  
  6843.  
  6844.                            Prototype:  ERESCOUNTEWINDOWS
  6845.                                     ____________________
  6846.  
  6847.  
  6848.  
  6849.                            Parameters
  6850.  
  6851.                            GLOBDATA  (GLOBDATA  *)   Pointer   to   application
  6852.                            __________
  6853.                            instance data.
  6854.  
  6855.  
  6856.  
  6857.                            Returns  COUNT (USHORT) The total number of E-Multi-
  6858.                                     ______
  6859.                            line edit windows that belong to an application.
  6860.  
  6861.  
  6862.  
  6863.                            Remarks
  6864.  
  6865.                            GlobData->CountOnlyVisibleWindows determines whether
  6866.                            to count only  visible  windows.  Some  applications
  6867.                            might create edit windows, keep them hidden, and use
  6868.                            them at some later time.
  6869.  
  6870.  
  6871.  
  6872.  
  6873.  
  6874.  
  6875.  
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.   -----------------------------------------------------------------------------
  6893.   94  Programmers Guide to the E Editor Toolkit. Version 2.0
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.  
  6901.  
  6902.   ERESPOPDLGBOX
  6903.   _____________
  6904.  
  6905.                       ----------------
  6906.                            (POP DIALOG BOX)
  6907.  
  6908.  
  6909.                            Purpose  Display  the  specified  dialog box. If the
  6910.                            dialog is already being displayed bring  it  to  the
  6911.                            top.
  6912.  
  6913.  
  6914.  
  6915.                            Prototype:  ERESPOPDLGBOX(
  6916.                                     _________________
  6917.  
  6918.  
  6919.  
  6920.                            Parameters
  6921.  
  6922.                            PROC  (PFNWP) Pointer to the window procedure of the
  6923.                            ______
  6924.                            dialog.
  6925.  
  6926.                            DLGIN (USHORT) Pointer to dialog input information.
  6927.                            ______
  6928.  
  6929.                            MODULETYPE (PSZ) Specifies the module that  contains
  6930.                            ___________
  6931.                            the   dialogs  resource  information  excluding  the
  6932.                            ".DLL" extension. If set to  NULL  then  the  dialog
  6933.                            resource is contained in ERES.DLL.
  6934.  
  6935.                            OWNERTYPE (USHORT) The owner of the dialog. This can
  6936.                            __________
  6937.                            be set to one of four values:
  6938.  
  6939.                            o   OT_DEFAULT      - Checks the value of the active
  6940.                                edit window. If it is valid
  6941.                                                     make  it  the  owner,  else
  6942.                                make the handle to the applications
  6943.                                                     frame the owner.
  6944.  
  6945.                            o   OT_ACTIVE_EDIT - Make the active edit window the
  6946.                                owner.
  6947.  
  6948.                            o   OT_APP_FRAME   - Make the applications frame the
  6949.                                owner.
  6950.  
  6951.                            o   OT_DESKTOP         - Make the desktop window the
  6952.                                owner.
  6953.  
  6954.                            GLOBDATA (GLOBDATA *) Application instance data.
  6955.                            _________
  6956.  
  6957.  
  6958.  
  6959.                            Returns
  6960.                              VOID
  6961.  
  6962.  
  6963.  
  6964.  
  6965.   -----------------------------------------------------------------------------
  6966.                                                                    ERES.DLL  95
  6967.  
  6968.  
  6969.  
  6970.  
  6971.  
  6972.  
  6973.  
  6974.  
  6975.                            Remarks
  6976.  
  6977.  
  6978.  
  6979.  
  6980.  
  6981.  
  6982.  
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.  
  7021.  
  7022.  
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.   -----------------------------------------------------------------------------
  7032.   96  Programmers Guide to the E Editor Toolkit. Version 2.0
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.   ERESISANEDITWIN
  7042.   _______________
  7043.  
  7044.                       -------------------
  7045.                            (IS AN EDIT WINDOW)
  7046.  
  7047.  
  7048.                            Purpose Test if a given window is an edit window.
  7049.  
  7050.  
  7051.  
  7052.                            Prototype:  ERESISANEDITWIN
  7053.                                     __________________
  7054.  
  7055.  
  7056.  
  7057.                            Parameters
  7058.  
  7059.                            HWND  (HWND) Window handle of the window to test.
  7060.                            ______
  7061.  
  7062.                            GLOBDATA   (GLOBDATA   *)   Pointer  to  application
  7063.                            ___________
  7064.                            instance data.
  7065.  
  7066.  
  7067.  
  7068.                            Returns RC(BOOL)
  7069.                                    __
  7070.  
  7071.                            o   TRUE  - The window is an edit window.
  7072.                            o   FLASE - The window is not an edit window.
  7073.  
  7074.  
  7075.                            Remarks
  7076.  
  7077.  
  7078.  
  7079.  
  7080.  
  7081.  
  7082.  
  7083.  
  7084.  
  7085.  
  7086.  
  7087.  
  7088.  
  7089.  
  7090.  
  7091.  
  7092.  
  7093.  
  7094.  
  7095.  
  7096.  
  7097.  
  7098.  
  7099.  
  7100.  
  7101.  
  7102.   -----------------------------------------------------------------------------
  7103.                                                                    ERES.DLL  97
  7104.  
  7105.  
  7106.  
  7107.  
  7108.  
  7109.  
  7110.  
  7111.  
  7112.   ERESEWINDOWVALID
  7113.   ________________
  7114.  
  7115.                       -------------------------
  7116.                            (IS AN EDIT WINDOW VALID)
  7117.  
  7118.  
  7119.                            Purpose  Tests whether the active edit window of the
  7120.                            application instance data is valid.
  7121.  
  7122.  
  7123.  
  7124.                            Prototype:  ERESEWINDOWVALID
  7125.                                     ___________________
  7126.  
  7127.  
  7128.  
  7129.                            Parameters
  7130.  
  7131.                            GLOBDATA  (GLOBDATA  *)   Pointer   to   application
  7132.                            __________
  7133.                            instance data.
  7134.  
  7135.  
  7136.  
  7137.                            Returns RC(BOOL)
  7138.                                    __
  7139.  
  7140.                            o   TRUE    -  The  the active edit window handle is
  7141.                                valid.
  7142.                            o   FLASE - The the active edit window handle is not
  7143.                                valid.
  7144.  
  7145.  
  7146.                            Remarks
  7147.  
  7148.  
  7149.  
  7150.  
  7151.  
  7152.  
  7153.  
  7154.  
  7155.  
  7156.  
  7157.  
  7158.  
  7159.  
  7160.  
  7161.  
  7162.  
  7163.  
  7164.  
  7165.  
  7166.  
  7167.  
  7168.  
  7169.  
  7170.  
  7171.  
  7172.   -----------------------------------------------------------------------------
  7173.   98  Programmers Guide to the E Editor Toolkit. Version 2.0
  7174.  
  7175.  
  7176.  
  7177.  
  7178.  
  7179.  
  7180.  
  7181.  
  7182.   ERESSENDOPENMSGTOAPP
  7183.   ____________________
  7184.  
  7185.                       ----------------------------------
  7186.                            (SEND OPEN MESSAGE TO APPLICATION)
  7187.  
  7188.  
  7189.                            Purpose  Finds  the  handle  of  applications client
  7190.                            window, and posts it a message to open the files  in
  7191.                            the   shared   message  buffer  of  the  application
  7192.                            instance data.
  7193.  
  7194.  
  7195.  
  7196.                            Prototype:  ERESSENDOPENMSGTOAPP
  7197.                                     _______________________
  7198.  
  7199.  
  7200.  
  7201.                            Parameters
  7202.  
  7203.                            ID  (USHORT)  Message  response   to   sending   the
  7204.                            ____
  7205.                            EPM_BOOK_ID message to the applications window.
  7206.  
  7207.  
  7208.  
  7209.                            Returns
  7210.                              VOID
  7211.  
  7212.  
  7213.  
  7214.                            Remarks
  7215.  
  7216.                            This  function  traverses through all existing frame
  7217.                            windows searching for the applications  window.  The
  7218.                            Custom message EPM_BOOK_ID is used to test whether a
  7219.                            windows  is  that  of  the  application. If a window
  7220.                            responds to an EPM_BOOK_ID message with ID  then  it
  7221.                            is  the  applications window.   GlobData->ShrMsgBuff
  7222.                            contains the name of the file to open.
  7223.  
  7224.  
  7225.  
  7226.  
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.   -----------------------------------------------------------------------------
  7242.                                                                    ERES.DLL  99
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.   ERESSHUTDOWN
  7252.   ____________
  7253.  
  7254.                       -----------
  7255.                            (SHUT DOWN)
  7256.  
  7257.  
  7258.                            Purpose Systematically closes all E-MLE's associated
  7259.                            with an application.
  7260.  
  7261.  
  7262.  
  7263.                            Prototype:  ERESSHUTDOWN
  7264.                                     _______________
  7265.  
  7266.  
  7267.  
  7268.                            Parameters
  7269.  
  7270.                            GLOBDATA   (GLOBDATA   *)   Pointer  to  application
  7271.                            ___________
  7272.                            instance data.
  7273.  
  7274.  
  7275.  
  7276.                            Returns RC(BOOL)
  7277.                                    __
  7278.  
  7279.                            o   TRUE  - A given file in an edit window does  not
  7280.                                wish to close down because
  7281.                                            it has yet to be saved.
  7282.                            o   FLASE - Shut down of all edit windows completed.
  7283.  
  7284.  
  7285.                            Remarks
  7286.  
  7287.  
  7288.  
  7289.  
  7290.  
  7291.  
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.   -----------------------------------------------------------------------------
  7312.   100  Programmers Guide to the E Editor Toolkit. Version 2.0
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.   ERESINITERESSTRUCT
  7322.   __________________
  7323.  
  7324.                       -------------------------------
  7325.                            (INITIALIZE THE ERES STRUCTURE)
  7326.  
  7327.  
  7328.                            Purpose  Initializes  the eres field of the GlobData
  7329.                            structure.
  7330.  
  7331.  
  7332.  
  7333.                            Prototype:  ERESINITERESSTRUCT
  7334.                                     _____________________
  7335.  
  7336.  
  7337.  
  7338.                            Parameters
  7339.  
  7340.                            HWND (HWND) The window handle  of  the  applications
  7341.                            _____
  7342.                            client window.
  7343.  
  7344.                            GLOBDATA   (GLOBDATA   *)  Pointer  to  applications
  7345.                            ___________
  7346.                            instance data.
  7347.  
  7348.  
  7349.  
  7350.                            Returns
  7351.                              VOID
  7352.  
  7353.  
  7354.  
  7355.                            Remarks
  7356.  
  7357.                            The pointer to this structure  is  copied  and  used
  7358.                            internally in ERES.DLL.
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.   -----------------------------------------------------------------------------
  7382.                                                                   ERES.DLL  101
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.  
  7389.  
  7390.  
  7391.   ERESCHECKVERSION
  7392.   ________________
  7393.  
  7394.                       ------------------------
  7395.                            (CHECK ERES.DLL VERSION)
  7396.  
  7397.  
  7398.                            Purpose  Compare  the ERES.DLL's version number with
  7399.                            that of E.DLL .
  7400.  
  7401.  
  7402.  
  7403.                            Prototype:  ERESCHECKVERSION
  7404.                                     ___________________
  7405.  
  7406.  
  7407.  
  7408.                            Parameters
  7409.  
  7410.                             No Parameters
  7411.  
  7412.  
  7413.  
  7414.                            Returns RC (BOOL)
  7415.                                    ___
  7416.  
  7417.                            o   TRUE  - The Version numbers are the same.
  7418.                            o   FLASE - Version conflict exits.
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.  
  7434.  
  7435.  
  7436.  
  7437.  
  7438.  
  7439.  
  7440.  
  7441.  
  7442.  
  7443.  
  7444.  
  7445.  
  7446.  
  7447.  
  7448.  
  7449.  
  7450.   -----------------------------------------------------------------------------
  7451.   102  Programmers Guide to the E Editor Toolkit. Version 2.0
  7452.  
  7453.  
  7454.  
  7455.  
  7456.  
  7457.  
  7458.  
  7459.  
  7460.   ERESPROCESSCOMMANDS
  7461.   ___________________
  7462.  
  7463.                       --------------------------
  7464.                            (PROCESS COMMAND MESSAGES)
  7465.  
  7466.  
  7467.                            Purpose  Process  WM_COMMAND  messages  sent  to the
  7468.                            applications default window procedure.
  7469.  
  7470.  
  7471.  
  7472.                            Prototype:  ERESPROCESSCOMMANDS
  7473.                                     ______________________
  7474.  
  7475.  
  7476.  
  7477.                            Parameters
  7478.  
  7479.                            MP1 (MPARAM) WM_COMMAND message parameter.
  7480.                            ____
  7481.  
  7482.                            MP2 (MPARAM) Pointer to dialog input information.
  7483.                            ____
  7484.  
  7485.                            GLOBDATA  (GLOBDATA  *)   Pointer   to   application
  7486.                            __________
  7487.                            instance data.
  7488.  
  7489.  
  7490.  
  7491.                            Returns
  7492.                              VOID
  7493.  
  7494.  
  7495.  
  7496.                            Remarks
  7497.  
  7498.                            This  functions is used when  ERESCommonWndProc() is
  7499.                            the default window procedure of the application.
  7500.  
  7501.  
  7502.  
  7503.  
  7504.  
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.   -----------------------------------------------------------------------------
  7522.                                                                   ERES.DLL  103
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.   ERESEDITWINDOWLIST
  7532.   __________________
  7533.  
  7534.                       ----------------------------------------
  7535.                            (SHOW LISTING OF AVAILABLE EDIT WINDOWS)
  7536.  
  7537.  
  7538.                            Purpose  Create a Popup menu that contains the names
  7539.                            of the available edit windows  which  the  user  can
  7540.                            transfer control to.
  7541.  
  7542.  
  7543.  
  7544.                            Prototype:  ERESEDITWINDOWLIST
  7545.                                     _____________________
  7546.  
  7547.  
  7548.  
  7549.                            Parameters
  7550.  
  7551.                            GLOBDATA   (GLOBDATA   *)   Pointer  to  application
  7552.                            ___________
  7553.                            instance data.
  7554.  
  7555.  
  7556.  
  7557.                            Returns
  7558.                              VOID
  7559.  
  7560.  
  7561.  
  7562.                            Remarks
  7563.  
  7564.                            GlobData->EditWindowListStyle  controls  the   posi-
  7565.                            tioning  of the edit list window dialog  relative to
  7566.                            the applications client window. (See Appendix F  for
  7567.                            the available options)
  7568.  
  7569.  
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.   -----------------------------------------------------------------------------
  7591.   104  Programmers Guide to the E Editor Toolkit. Version 2.0
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.   ERES.DLL - EXPORTED DIALOG BOX PROCEDURES
  7601.   _________________________________________
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.                            The  following dialog box procedures are exported by
  7610.                            ERES.DLL. In order to use any of  these  dialogs  an
  7611.                            application  must  adhere  to the required code out-
  7612.                            lined in the previous section.
  7613.  
  7614.  
  7615.                            o   ERESOPENDLGPROC Open dialog procedure. Full file
  7616.                                _______________
  7617.                                selection dialog box includes fields  specifying
  7618.                                drives,  directories,  files,  path  name, and a
  7619.                                file name entry field.
  7620.  
  7621.                            o   ERESOPEN1DLGPROC Open dialog procedure. Contains
  7622.                                ________________
  7623.                                a list of previously entered file names, and  an
  7624.                                entry field.
  7625.  
  7626.                            o   ERESCOMMANDDLGPROC  Edit  window  command dialog
  7627.                                __________________
  7628.                                box.
  7629.  
  7630.                            o   FINDCHANGEDLGPROC Allows find/change commands to
  7631.                                _________________
  7632.                                be enter from dialog box.
  7633.  
  7634.                            o   CONFIGDLGPROC Configuration edit  window  dialog
  7635.                                _____________
  7636.                                procedure.
  7637.  
  7638.                            o   ENTRYBOXDLGPROC  General  purpose  entry  dialog
  7639.                                _______________
  7640.                                box.
  7641.  
  7642.                            o   LISTBOXDLGPROC List box dialog.
  7643.                                ______________
  7644.  
  7645.                            o   QUITBOXDLGPROC
  7646.                                ______________
  7647.                                 Quit box dialog.
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.   -----------------------------------------------------------------------------
  7666.                                  ERES.DLL - Exported Dialog Box Procedures  105
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674.  
  7675.   ERESOPEN1DLGPROC
  7676.   ________________
  7677.  
  7678.                       ---------------------------
  7679.                            (OPEN DIALOG PROCEDURE ONE)
  7680.  
  7681.  
  7682.                            Purpose Open1 dialog box procedure.
  7683.  
  7684.  
  7685.  
  7686.                            Prototype:  ERESOPEN1DLGPROC
  7687.                                     ___________________
  7688.  
  7689.  
  7690.  
  7691.                            Parameters
  7692.  
  7693.                            HWND (HWND)
  7694.                            _____
  7695.                             The handle to the dialog box.
  7696.  
  7697.                            MESSAGE (USHORT)
  7698.                            ________
  7699.                             Window message.
  7700.  
  7701.                            LPARM1 (MPARAM)
  7702.                            _______
  7703.                             Message parameter one.
  7704.  
  7705.                            LPARM2 (MPARAM)
  7706.                            _______
  7707.                             Message parameter two.
  7708.  
  7709.  
  7710.  
  7711.                            Returns
  7712.                              VOID
  7713.  
  7714.  
  7715.  
  7716.                            Remarks
  7717.  
  7718.                            This  dialog  contains  a list of previously entered
  7719.                            file names, and an entry field. This dialog  can  be
  7720.                            called using the WinDlgBox() function.  For example:
  7721.  
  7722.                                  WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  7723.  
  7724.                            o   Parent      - Window handle of the parent of the
  7725.                                dialog
  7726.                            o   Owner        - Window handle of the owner of the
  7727.                                dialog
  7728.                            o   DlgProc       - Window procedure of  the  dialog
  7729.                                (ERESOpen1DlgProc)
  7730.                            o   Resource        -  Where  the dialog resource is
  7731.                                located (ERES)
  7732.                            o   Dlgid       - Dialog id (DLG_OPEN1)
  7733.                            o   CreateParam - Dialog creation parameter. Must be
  7734.                                set to(&GlobData->eres).
  7735.  
  7736.  
  7737.   -----------------------------------------------------------------------------
  7738.   106  Programmers Guide to the E Editor Toolkit. Version 2.0
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.  
  7745.  
  7746.  
  7747.  
  7748.  
  7749.  
  7750.  
  7751.  
  7752.  
  7753.  
  7754.  
  7755.  
  7756.  
  7757.  
  7758.  
  7759.  
  7760.  
  7761.  
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.   -----------------------------------------------------------------------------
  7804.                                  ERES.DLL - Exported Dialog Box Procedures  107
  7805.  
  7806.  
  7807.  
  7808.  
  7809.  
  7810.  
  7811.  
  7812.  
  7813.   ERESCOMMANDDLGPROC
  7814.   __________________
  7815.  
  7816.                       --------------------------
  7817.                            (COMMAND DIALOG PROCEDURE)
  7818.  
  7819.  
  7820.                            Purpose Edit window command line dialog procedure.
  7821.  
  7822.  
  7823.  
  7824.                            Prototype:  ERESCOMMANDDLGPROC
  7825.                                     _____________________
  7826.  
  7827.  
  7828.  
  7829.                            Parameters
  7830.  
  7831.                            HWND (HWND)
  7832.                            _____
  7833.                             The handle to the dialog box.
  7834.  
  7835.                            MESSAGE (USHORT)
  7836.                            ________
  7837.                             Window message.
  7838.  
  7839.                            LPARM1 (MPARAM)
  7840.                            _______
  7841.                             Message parameter one.
  7842.  
  7843.                            LPARM2 (MPARAM)
  7844.                            _______
  7845.                             Message parameter two.
  7846.  
  7847.  
  7848.  
  7849.                            Returns
  7850.                              VOID
  7851.  
  7852.  
  7853.  
  7854.                            Remarks
  7855.  
  7856.                            This  is  an  edit  window  command line dialog box,
  7857.                            which includes an entry field and a scrollable  list
  7858.                            of  previous  commands.    This dialog can be called
  7859.                            using the WinDlgBox() function.  For example:
  7860.  
  7861.                                 WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  7862.  
  7863.                            o   Parent      - Window handle of the parent of the
  7864.                                dialog
  7865.                            o   Owner       - Window handle of the owner of  the
  7866.                                dialog
  7867.                            o   DlgProc         - Window procedure of the dialog
  7868.                                (ERESCommandDlgProc)
  7869.                            o   Resource      - Where  the  dialog  resource  is
  7870.                                located (ERES)
  7871.                            o   Dlgid       - Dialog id (IDM_COMMANDS)
  7872.  
  7873.  
  7874.  
  7875.   -----------------------------------------------------------------------------
  7876.   108  Programmers Guide to the E Editor Toolkit. Version 2.0
  7877.  
  7878.  
  7879.  
  7880.  
  7881.  
  7882.  
  7883.  
  7884.  
  7885.                            o   CreateParam - Dialog creation parameter. Must be
  7886.                                set to(&GlobData->eres).
  7887.  
  7888.  
  7889.  
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929.  
  7930.  
  7931.  
  7932.  
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.   -----------------------------------------------------------------------------
  7942.                                  ERES.DLL - Exported Dialog Box Procedures  109
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.   ERESFINDCHANGEDLGPROC
  7952.   _____________________
  7953.  
  7954.                       ------------------------------
  7955.                            (FIND/CHANGE DIALOG PROCEDURE)
  7956.  
  7957.  
  7958.                            Purpose Find/Change commands dialog procedure.
  7959.  
  7960.  
  7961.                            Prototype:  ERESFINDCHANGEDLGPROC
  7962.                                     ________________________
  7963.  
  7964.  
  7965.  
  7966.                            Parameters
  7967.  
  7968.                            HWND (HWND)
  7969.                            _____
  7970.                             The handle to the dialog box.
  7971.  
  7972.                            MESSAGE (USHORT)
  7973.                            ________
  7974.                             Window message.
  7975.  
  7976.                            LPARM1 (MPARAM)
  7977.                            _______
  7978.                             Message parameter one.
  7979.  
  7980.                            LPARM2 (MPARAM)
  7981.                            _______
  7982.                             Message parameter two.
  7983.  
  7984.  
  7985.  
  7986.                            Returns
  7987.                              VOID
  7988.  
  7989.  
  7990.  
  7991.                            Remarks
  7992.  
  7993.                            This   dialog  allows  find/change  commands  to  be
  7994.                            entered directly from it.  This dialog can be called
  7995.                            using the WinDlgBox() function.  For example:
  7996.  
  7997.                                 WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  7998.  
  7999.                            o   Parent      - Window handle of the parent of the
  8000.                                dialog
  8001.                            o   Owner       - Window handle of the owner of  the
  8002.                                dialog
  8003.                            o   DlgProc         - Window procedure of the dialog
  8004.                                (ERESFindChangeDlgProc)
  8005.                            o   Resource      - Where  the  dialog  resource  is
  8006.                                located (ERES)
  8007.                            o   Dlgid       - Dialog id (DLG_CHANGE).
  8008.                            o   CreateParam - Dialog creation parameter. Must be
  8009.                                set to(&GlobData->eres).
  8010.  
  8011.  
  8012.  
  8013.   -----------------------------------------------------------------------------
  8014.   110  Programmers Guide to the E Editor Toolkit. Version 2.0
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.   ERESCONFIGDLGPROC
  8024.   _________________
  8025.  
  8026.                       -------------------------------
  8027.                            (CONFIGUATION DIALOG PROCEDURE)
  8028.  
  8029.  
  8030.                            Purpose  Allow  edit window options to be configured
  8031.                            from dialog box.
  8032.  
  8033.  
  8034.  
  8035.                            Prototype:  ERESCONFIGDLGPROC
  8036.                                     ____________________
  8037.  
  8038.  
  8039.  
  8040.                            Parameters
  8041.  
  8042.                            HWND (HWND)
  8043.                            _____
  8044.                             The handle to the dialog box.
  8045.  
  8046.                            MESSAGE (USHORT)
  8047.                            ________
  8048.                             Window message.
  8049.  
  8050.                            LPARM1 (MPARAM)
  8051.                            _______
  8052.                             Message parameter one.
  8053.  
  8054.                            LPARM2 (MPARAM)
  8055.                            _______
  8056.                             Message parameter two.
  8057.  
  8058.  
  8059.  
  8060.                            Returns
  8061.                              VOID
  8062.  
  8063.  
  8064.  
  8065.                            Remarks
  8066.  
  8067.                            This dialog  allows  configuration  of  edit  window
  8068.                            options.  These  options  include  setting  margins,
  8069.                            autosave level,  tabs,  colors,  and  paths.    This
  8070.                            dialog can be called using the WinDlgBox() function.
  8071.                            For example:
  8072.  
  8073.                                  WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  8074.  
  8075.                            o   Parent      - Window handle of the parent of the
  8076.                                dialog
  8077.                            o   Owner        - Window handle of the owner of the
  8078.                                dialog
  8079.                            o   DlgProc       - Window procedure of  the  dialog
  8080.                                (ERESConfigDlgProc)
  8081.                            o   Resource        -  Where  the dialog resource is
  8082.                                located (ERES)
  8083.  
  8084.  
  8085.   -----------------------------------------------------------------------------
  8086.                                  ERES.DLL - Exported Dialog Box Procedures  111
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.                            o   Dlgid       - Dialog id (DLG_CONFIG)
  8096.                            o   CreateParam - Dialog creation parameter. Must be
  8097.                                set to(&GlobData->eres).
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.  
  8141.  
  8142.  
  8143.  
  8144.  
  8145.  
  8146.  
  8147.  
  8148.  
  8149.  
  8150.  
  8151.   -----------------------------------------------------------------------------
  8152.   112  Programmers Guide to the E Editor Toolkit. Version 2.0
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.   ENTRYBOXDLGPROC
  8162.   _______________
  8163.  
  8164.                       ----------------------------
  8165.                            (ENTRY DIALOG BOX PROCEDURE)
  8166.  
  8167.  
  8168.                            Purpose General purpose entry dialog box.
  8169.  
  8170.  
  8171.  
  8172.                            Prototype:  ENTRYBOXDLGPROC
  8173.                                     __________________
  8174.  
  8175.  
  8176.  
  8177.                            Parameters
  8178.  
  8179.                            HWND (HWND)
  8180.                            _____
  8181.                             The handle to the dialog box.
  8182.  
  8183.                            MESSAGE (USHORT)
  8184.                            ________
  8185.                             Window message.
  8186.  
  8187.                            LPARM1 (MPARAM)
  8188.                            _______
  8189.                             Message parameter one.
  8190.  
  8191.                            LPARM2 (MPARAM)
  8192.                            _______
  8193.                             Message parameter two.
  8194.  
  8195.  
  8196.  
  8197.                            Returns
  8198.                              VOID
  8199.  
  8200.  
  8201.  
  8202.                            Remarks
  8203.  
  8204.                            This  dialog  can  be  called  using the WinDlgBox()
  8205.                            function.  For example:
  8206.  
  8207.                                WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  8208.  
  8209.                            o   Parent      - Window handle of the parent of the
  8210.                                dialog
  8211.                            o   Owner       - Window handle of the owner of  the
  8212.                                dialog
  8213.                            o   DlgProc         - Window procedure of the dialog
  8214.                                (EntryBoxDlgProc)
  8215.                            o   Resource      - Where  the  dialog  resource  is
  8216.                                located (ERES)
  8217.                            o   Dlgid       - Dialog id (IDD_ENTRYBOX)
  8218.                            o   CreateParam - Dialog creation parameter. Must be
  8219.                                set to(PENTRYBOXINFO).
  8220.  
  8221.  
  8222.  
  8223.   -----------------------------------------------------------------------------
  8224.                                  ERES.DLL - Exported Dialog Box Procedures  113
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.                                                   Check eres.h for a desription
  8234.                                of the structure
  8235.                                                   ENTRYBOXINFO.  A  pointer  to
  8236.                                this structure must be allocated
  8237.                                                   and passed  into  the  dialog
  8238.                                procedure via this parameter.
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.  
  8258.  
  8259.  
  8260.  
  8261.  
  8262.  
  8263.  
  8264.  
  8265.  
  8266.  
  8267.  
  8268.  
  8269.  
  8270.  
  8271.  
  8272.  
  8273.  
  8274.  
  8275.  
  8276.  
  8277.  
  8278.  
  8279.  
  8280.  
  8281.  
  8282.  
  8283.  
  8284.  
  8285.  
  8286.  
  8287.  
  8288.  
  8289.   -----------------------------------------------------------------------------
  8290.   114  Programmers Guide to the E Editor Toolkit. Version 2.0
  8291.  
  8292.  
  8293.  
  8294.  
  8295.  
  8296.  
  8297.  
  8298.  
  8299.   LISTBOXDLGPROC
  8300.   ______________
  8301.  
  8302.                       ---------------------------
  8303.                            (LIST BOX DIALOG PROCEDURE)
  8304.  
  8305.  
  8306.                            Purpose General purpose list dialog procedure.
  8307.  
  8308.  
  8309.  
  8310.                            Prototype:  LISTBOXDLGPROC
  8311.                                     _________________
  8312.  
  8313.  
  8314.  
  8315.                            Parameters
  8316.  
  8317.                            HWND (HWND)
  8318.                            _____
  8319.                             The handle to the dialog box.
  8320.  
  8321.                            MESSAGE (USHORT)
  8322.                            ________
  8323.                             Window message.
  8324.  
  8325.                            LPARM1 (MPARAM)
  8326.                            _______
  8327.                             Message parameter one.
  8328.  
  8329.                            LPARM2 (MPARAM)
  8330.                            _______
  8331.                             Message parameter two.
  8332.  
  8333.  
  8334.  
  8335.                            Returns
  8336.                              VOID
  8337.  
  8338.  
  8339.  
  8340.                            Remarks
  8341.  
  8342.                            This  dialog  can  be  called  using the WinDlgBox()
  8343.                            function.  For example:
  8344.  
  8345.                                 WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  8346.  
  8347.                            o   Parent      - Window handle of the parent of the
  8348.                                dialog
  8349.                            o   Owner       - Window handle of the owner of  the
  8350.                                dialog
  8351.                            o   DlgProc         - Window procedure of the dialog
  8352.                                (ListBoxDlgProc)
  8353.                            o   Resource      - Where  the  dialog  resource  is
  8354.                                located (ERES)
  8355.                            o   Dlgid       - Dialog id (ID_LISTBOX)
  8356.                            o   CreateParam - Dialog creation parameter. Must be
  8357.                                set to(PLISTBOXINFO).
  8358.  
  8359.  
  8360.  
  8361.   -----------------------------------------------------------------------------
  8362.                                  ERES.DLL - Exported Dialog Box Procedures  115
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.                                                   Check     eres.h     for    a
  8372.                                description of the LISTBOXINFO
  8373.                                                   structure.  A pointer to this
  8374.                                structure must be
  8375.                                                   allocated and passed into the
  8376.                                dialog procedure via this
  8377.                                                   parameter.
  8378.  
  8379.  
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.  
  8394.  
  8395.  
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.   -----------------------------------------------------------------------------
  8428.   116  Programmers Guide to the E Editor Toolkit. Version 2.0
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.  
  8437.   QUITBOXDLGPROC
  8438.   ______________
  8439.  
  8440.                       ---------------------------
  8441.                            (QUIT BOX DIALOG PROCEDURE)
  8442.  
  8443.  
  8444.                            Purpose   Sample   Quit  box  dialog  which  handles
  8445.                            EPM_EDIT_ASKTOxxx messages.
  8446.  
  8447.  
  8448.  
  8449.                            Prototype:  QUITBOXDLGPROC
  8450.                                     _________________
  8451.  
  8452.  
  8453.  
  8454.                            Parameters
  8455.  
  8456.                            HWND (HWND)
  8457.                            _____
  8458.                             The handle to the dialog box.
  8459.  
  8460.                            MESSAGE (USHORT)
  8461.                            ________
  8462.                             Window message.
  8463.  
  8464.                            LPARM1 (MPARAM)
  8465.                            _______
  8466.                             Message parameter one.
  8467.  
  8468.                            LPARM2 (MPARAM)
  8469.                            _______
  8470.                             Message parameter two.
  8471.  
  8472.  
  8473.  
  8474.                            Returns
  8475.                              VOID
  8476.  
  8477.  
  8478.  
  8479.                            Remarks
  8480.  
  8481.                            This dialog informs the user that a  file  has  been
  8482.                            modified. It includes an entry field to specify what
  8483.                            name  the  modifications should be saved as, and the
  8484.                            pushbuttons: Save , Discard, Cancel, and Help.  This
  8485.                            dialog can be called using the WinDlgBox() function.
  8486.                            For example:
  8487.  
  8488.  
  8489.                                WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  8490.  
  8491.                            o   Parent      - Window handle of the parent of the
  8492.                                dialog
  8493.                            o   Owner       - Window handle of the owner of  the
  8494.                                dialog
  8495.                            o   DlgProc         - Window procedure of the dialog
  8496.                                (QuitBoxDlgProc)
  8497.  
  8498.  
  8499.   -----------------------------------------------------------------------------
  8500.                                  ERES.DLL - Exported Dialog Box Procedures  117
  8501.  
  8502.  
  8503.  
  8504.  
  8505.  
  8506.  
  8507.  
  8508.  
  8509.                            o   Resource      - Where  the  dialog  resource  is
  8510.                                located (ERES)
  8511.                            o   Dlgid       - Dialog id (IDD_QUITBOX)
  8512.                            o   CreateParam - Dialog creation parameter. Must be
  8513.                                set to(PQUITBOXINFO).
  8514.                                                   See  eres.h for a description
  8515.                                of the QUITBOXINFO
  8516.                                                   structure. A pointer to  this
  8517.                                structure must be allocated
  8518.                                                   and  passed  into  the dialog
  8519.                                via this parameter.
  8520.  
  8521.  
  8522.                            Returns
  8523.  
  8524.                            This dialog returns one of the following codes.
  8525.  
  8526.                            o   ERES_SAVE    - Save was selected. File  name  is
  8527.                                stored in QUITBOXINFO->filename
  8528.                            o   ERES_CANCEL  - Cancel was selected.
  8529.                            o   ERES_DISCARD - Discard was selected.
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542.  
  8543.  
  8544.  
  8545.  
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.  
  8555.  
  8556.  
  8557.  
  8558.  
  8559.  
  8560.  
  8561.  
  8562.  
  8563.  
  8564.  
  8565.   -----------------------------------------------------------------------------
  8566.   118  Programmers Guide to the E Editor Toolkit. Version 2.0
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.  
  8585.  
  8586.  
  8587.  
  8588.  
  8589.  
  8590.  
  8591.  
  8592.  
  8593.  
  8594.  
  8595.  
  8596.  
  8597.  
  8598.  
  8599.  
  8600.  
  8601.  
  8602.  
  8603.  
  8604.  
  8605.  
  8606.  
  8607.  
  8608.  
  8609.  
  8610.  
  8611.  
  8612.  
  8613.  
  8614.  
  8615.  
  8616.  
  8617.  
  8618.  
  8619.  
  8620.  
  8621.  
  8622.  
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.   -----------------------------------------------------------------------------
  8632.                                  ERES.DLL - Exported Dialog Box Procedures  119
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.  
  8657.  
  8658.  
  8659.  
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.  
  8671.  
  8672.  
  8673.  
  8674.  
  8675.  
  8676.  
  8677.  
  8678.  
  8679.  
  8680.  
  8681.  
  8682.  
  8683.  
  8684.  
  8685.  
  8686.  
  8687.  
  8688.  
  8689.  
  8690.  
  8691.  
  8692.  
  8693.  
  8694.  
  8695.  
  8696.  
  8697.   -----------------------------------------------------------------------------
  8698.   120  Programmers Guide to the E Editor Toolkit. Version 2.0
  8699.  
  8700.  
  8701.  
  8702.  
  8703.  
  8704.  
  8705.  
  8706.  
  8707.   EXAMPLE E TOOLKIT APPLICATION
  8708.   _____________________________
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.                            The following sample source code demonstrates how an
  8717.                            application  can  use  various  features  of  the  E
  8718.                            Toolkit. The source files included are:
  8719.  
  8720.  
  8721.                            o   Edllsamp.c  - creates a sample edit window using
  8722.                                E.DLL
  8723.  
  8724.                            o   edllsamp.e  - macros defining the  edit  windows
  8725.                                profile
  8726.  
  8727.                            o   eressamp.c    - dialog resource management func-
  8728.                                tions
  8729.  
  8730.                            o   sampdlg.c   - sample dll which demonstrates  two
  8731.                                types of PM dialogs.
  8732.  
  8733.                            o   sampdlg.e   - macros demonstrating how to invoke
  8734.                                the sampdlg.c dialogs.
  8735.  
  8736.  
  8737.  
  8738.  
  8739.  
  8740.  
  8741.  
  8742.  
  8743.  
  8744.  
  8745.  
  8746.  
  8747.  
  8748.  
  8749.  
  8750.  
  8751.  
  8752.  
  8753.  
  8754.  
  8755.  
  8756.  
  8757.  
  8758.  
  8759.  
  8760.  
  8761.  
  8762.  
  8763.  
  8764.   -----------------------------------------------------------------------------
  8765.                                              Example E Toolkit Application  121
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.  
  8783.  
  8784.  
  8785.  
  8786.  
  8787.  
  8788.  
  8789.  
  8790.  
  8791.  
  8792.  
  8793.  
  8794.  
  8795.  
  8796.  
  8797.  
  8798.  
  8799.  
  8800.  
  8801.  
  8802.  
  8803.  
  8804.  
  8805.  
  8806.  
  8807.  
  8808.  
  8809.  
  8810.  
  8811.  
  8812.  
  8813.  
  8814.  
  8815.  
  8816.  
  8817.  
  8818.  
  8819.  
  8820.  
  8821.  
  8822.  
  8823.  
  8824.  
  8825.  
  8826.  
  8827.  
  8828.  
  8829.  
  8830.   -----------------------------------------------------------------------------
  8831.   122  Programmers Guide to the E Editor Toolkit. Version 2.0
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.   APPENDIX
  8841.   ________
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.   APPENDIX A -
  8850.   ____________
  8851.  
  8852.                       ---------------------------------------------------------
  8853.                            DESCRIPTION OF THE EDITOR INFORMATION STRUCTURE.
  8854.                            (EDITORINFO)
  8855.  
  8856.                            ___________________________
  8857.  
  8858.                               .------------------------------------------------------------------------.
  8859.                               |   Editor Information Structure defined in 'C'                          |
  8860.                               |------------------------------------------------------------------------|
  8861.                               | typedef struct EDIT_INFO_TYPE {                                        |
  8862.                               |    HAB       hab;           /* application anchor block              */|
  8863.                               |    HWND      hwndparent;    /* handle to parent of edit window       */|
  8864.                               |    HWND      hwndowner;     /* handle to owner of edit window        */|
  8865.                               |    PRECTL    rect;          /* positioning of edit window            */|
  8866.                               |    PSZ       filename;      /* file to be edited (with wildcard)     */|
  8867.                               |    HPOINTER  hEditPtr;      /* handle to editor pointer icon.        */|
  8868.                               |    HPOINTER  hMarkPtr;      /* handle to mark pointer icon.          */|
  8869.                               |    VOID FAR *hEditorIcon;   /* editor ICON.                          */|
  8870.                               |    ULONG     editorstyle;   /* internal editor options               */|
  8871.                               |    ULONG     pmstyle;       /* PM standard window styles (FCF_xxxx)  */|
  8872.                               |    USHORT    font;          /* TRUE = LARGE FONT,  FALSE = SMALL FONT*/|
  8873.                               |    PSZ       exfile;        /* pre-compiled macro code file (xxx.EX) */|
  8874.                               |    PSZ       *topmkr;       /* top and bottom of file marker         */|
  8875.                               |    PSZ       *botmkr;       /*                                       */|
  8876.                               |    SHORT     editid;        /* unique window id specified for  window  |
  8877.                               |    PSZ       exsearchpath;  /* environment varible-search for .ex files|
  8878.                               |    SHORT     reserved0;     /* for future use.                       */|
  8879.                               | } EDITORINFO;                                                          |
  8880.                               |                                                                        |
  8881.                               `------------------------------------------------------------------------'
  8882.  
  8883.  
  8884.                            hab Application Anchor Block.   To obtain the appli-
  8885.                            cations anchor block use the WinInitialize function.
  8886.                            (example:  hab = WinInitialize(NULL);  )
  8887.  
  8888.  
  8889.  
  8890.  
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.   -----------------------------------------------------------------------------
  8899.                                                                   Appendix  123
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.  
  8907.  
  8908.                            hwndparent  Window handle of the edit window parent.
  8909.                            Effects the positioning of the edit  window.      In
  8910.                            EPM,  for  example, the parent to the edit window is
  8911.                            the desk top window (HWND_DESKTOP).    This  is  why
  8912.                            the edit windows created by EPM are free to roam the
  8913.                            entire desk top.
  8914.  
  8915.  
  8916.  
  8917.                            hwndowner  Window  handle  of the edit window owner.
  8918.                            Determines which window receives messages  from  the
  8919.                            edit  window.   For example, if a command is send to
  8920.                            the edit window (via the EPM_EDIT_COMMAND  message),
  8921.                            and  the command generates some type of return code.
  8922.                            The return code is put into message  form  (via  the
  8923.                            EPM_EDIT_RETCODE  message),  and  passed to the edit
  8924.                            window owner.
  8925.  
  8926.  
  8927.  
  8928.                            rect Pointer to a PM rectangle structure.     Deter-
  8929.                            mines  the  positioning  of  the edit window.    The
  8930.                            '.xLeft'  and  '.yBottom'  fields  set   the   lower
  8931.                            lefthand  corner of the edit window.   The '.xRight'
  8932.                            and '.yTop' fields set the width and height  of  the
  8933.                            edit  window.      Since this is a pointer to a rec-
  8934.                            tangle structure, pass the address of a RECTL in the
  8935.                            following manner:     epm.rect = ▭
  8936.  
  8937.  
  8938.  
  8939.                            filename Pointer to a Asciiz string that contains  a
  8940.                            fully  qualified path.  If 'filename' is NULL then a
  8941.                            blank file will be edited.  The blank file  will  be
  8942.                            named  '.Unnamed  file'.    'filename'   can contain
  8943.                            wildcards.  For example, if '*.dat' were  specified,
  8944.                            all  the  files  with  the  extension '.dat' will be
  8945.                            placed in the newly created edit window.
  8946.  
  8947.  
  8948.  
  8949.                            hEditPtr Handle to a pointer icon that  will  become
  8950.                            active  when  the  mouse  pointer is over the client
  8951.                            area    of     the     edit     window.          Use
  8952.                            WinQueryPointer(HWND_DESKTOP);  to use current mouse
  8953.                            pointer.
  8954.  
  8955.  
  8956.  
  8957.                            hMarkPtr Handle to a pointer that will be  displayed
  8958.                            when editor is marking text.
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.   -----------------------------------------------------------------------------
  8965.   124  Programmers Guide to the E Editor Toolkit. Version 2.0
  8966.  
  8967.  
  8968.  
  8969.  
  8970.  
  8971.  
  8972.  
  8973.  
  8974.                            hEditIcon  Handle  to  a icon that will be displayed
  8975.                            when the edit window is minimized.
  8976.  
  8977.  
  8978.  
  8979.                            editorstyle  Internal  Editor style flags.   Logical
  8980.                            'OR' these flags together  to  form  desired  editor
  8981.                            configuration.
  8982.  
  8983.                            o   EDIT_STYLE_BROWSE            - browse file (view
  8984.                                file only)
  8985.  
  8986.                            o   EDIT_STYLE_ACTIVEFOCUS      - when  edit  window
  8987.                                becomes active it will
  8988.                                                                take focus.
  8989.  
  8990.                            o   EDIT_STYLE_STATUSLINE       - Create edit window
  8991.                                with status line
  8992.  
  8993.                            o   EDIT_STYLE_MESSAGELINE     - Create edut  window
  8994.                                with message line
  8995.  
  8996.  
  8997.  
  8998.                            pmstyle
  8999.  
  9000.                            Standard  PM window FCF_xxx styles.  For example, if
  9001.                            you want to create a edit window with a  Title  Bar,
  9002.                            Vertical  Scroll Bar, and Size Border, you would use
  9003.                            the following flags:
  9004.  
  9005.                               FCF_TITLEBAR | FCF_SIZEBORDER | FCF_VERTSCROLL
  9006.  
  9007.  
  9008.  
  9009.  
  9010.                            nt Flag that specifies the size font to use  in  the
  9011.                            edit  window.  If font is TRUE, the largest possible
  9012.                            system AVIO font will be used. If font is FALSE, the
  9013.                            smallest possible system AVIO font will be used.
  9014.  
  9015.  
  9016.  
  9017.                            exfile Pointer to a  asciiz  string  containing  the
  9018.                            name  of  a .EX file.   A .EX file contains compiled
  9019.                            macro code.      The  file  must  be  created  using
  9020.                            ETPM.EXE.    If  this parameter is NULL, "EPM.EX" is
  9021.                            used.
  9022.  
  9023.  
  9024.  
  9025.                            topmkr Pointer to a  asciiz  string  containing  the
  9026.                            text that will be used to denote the top of file.
  9027.  
  9028.  
  9029.  
  9030.   -----------------------------------------------------------------------------
  9031.                                                                   Appendix  125
  9032.  
  9033.  
  9034.  
  9035.  
  9036.  
  9037.  
  9038.  
  9039.  
  9040.                            botmkr  Pointer  to  a  asciiz string containing the
  9041.                            text that will be used to denote the bottom of file.
  9042.  
  9043.  
  9044.  
  9045.                            editid  A  unique  editor  id number that is used to
  9046.                            identify edit windows created by a particular appli-
  9047.                            cation.
  9048.  
  9049.  
  9050.  
  9051.                            exsearchpath A pointer to a string that contains the
  9052.                            name of  an  environment  variable.    The  internal
  9053.                            toolkit  will  use  the  paths  associated with this
  9054.                            environment variable to search for .ex files  speci-
  9055.                            fied  during  the  life of an edit window.   If this
  9056.                            field is NULL, EPMPATH is searched by default.
  9057.  
  9058.  
  9059.  
  9060.                            reserved0 Reserved for future enhancements.
  9061.  
  9062.  
  9063.  
  9064.  
  9065.  
  9066.  
  9067.  
  9068.  
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.  
  9088.  
  9089.  
  9090.  
  9091.  
  9092.  
  9093.  
  9094.  
  9095.  
  9096.   -----------------------------------------------------------------------------
  9097.   126  Programmers Guide to the E Editor Toolkit. Version 2.0
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.  
  9106.   APPENDIX A1 -
  9107.   _____________
  9108.  
  9109.                       ---------------
  9110.                            FIELD CONSTANTS
  9111.  
  9112.                              Used  by  EtkSetFileField(...), EtkQueryFileField,
  9113.                            and EtkQueryFileFieldString.
  9114.  
  9115.  
  9116.                                ATTRIBUTE_SUPPORT_LEVEL  -    0 = No Attributes supported
  9117.                                AUTOSAVE_FIELD           -    File Modifies Before Autosaving
  9118.                                CODEPAGE_FIELD           -    Code page
  9119.                                COL_FIELD                -    Column of Cursor.
  9120.                                CURSORX_FIELD            -    X Cursor Position in pels.
  9121.                                CURSORYG_FIELD           -
  9122.                                CURSORY_FIELD            -    Y Cursor Position in pels.
  9123.                                CURSOR_COLUMN            -    column of the cursor
  9124.                                CURSOR_OFFSET            -
  9125.                                DRAGCOLOR_FIELD          -    drag shadow
  9126.                                DRAGSTYLE_FIELD          -    drag type (linbe, block, character)
  9127.                                EA_AREA_FIELD            -    pointer to extended attribute area
  9128.                                FILENAME_FIELD           -    file name
  9129.                                FONTHEIGHT_FIELD         -    average font width
  9130.                                FONTWIDTH_FIELD          -    average font height
  9131.                                FONT_FIELD               -    internal font identifier string
  9132.                                KEYSET_FIELD             -    Key set name
  9133.                                LAST_FIELD               -    Number of last line in file. (absolute position)
  9134.                                LINEG_FIELD              -
  9135.                                LINE_FIELD               -    Number of line where cursor is located. (absolute position)
  9136.                                LOCKHANDLE_FIELD         -    TRUE = File is locked
  9137.                                MARGINS_FIELD            -    Margin String. ( Left Right Paragraph )
  9138.                                MARKCOLOR_FIELD          -    Color of selected text
  9139.                                MODIFY_FIELD             -    number of file modifications
  9140.                                MOUSEX_FIELD             -    x position of mouse
  9141.                                MOUSEY_FIELD             -    y position of mouse
  9142.                                READONLY_FIELD           -    TRUE = BROWSE MODE
  9143.                                SCROLLX_FIELD            -    x scroll increment
  9144.                                SCROLLY_FIELD            -    y scroll increment
  9145.                                TABS_FIELD               -    Tab rack.
  9146.                                TEXTCOLOR_FIELD          -    forground and background text color
  9147.                                TITLETEXT_FIELD          -    text to be placed on title bar
  9148.                                USERSTRING_FIELD         -    string to be used by user
  9149.                                VISIBLE_FIELD            -    file visible flag (FALSE=NOT in ring)
  9150.                                WINDOWHEIGHTG_FIELD      -
  9151.                                WINDOWHEIGHT_FIELD       -    height of window in pels
  9152.                                WINDOWWIDTHG_FIELD       -
  9153.                                WINDOWWIDTH_FIELD        -    width of window in pels
  9154.                                WINDOWX_FIELD            -    starting x position of window
  9155.                                WINDOWY_FIELD            -    starting x position of window
  9156.  
  9157.  
  9158.  
  9159.  
  9160.  
  9161.  
  9162.  
  9163.   -----------------------------------------------------------------------------
  9164.                                                                   Appendix  127
  9165.  
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173.   APPENDIX B -
  9174.   ____________
  9175.  
  9176.                       ----------------
  9177.                            EDITOR COMMANDS.
  9178.  
  9179.                            See  EPM  Users  guide for a list of editor Command.
  9180.                            (EPM SCRIPT)
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.  
  9206.  
  9207.  
  9208.  
  9209.  
  9210.  
  9211.  
  9212.  
  9213.  
  9214.  
  9215.  
  9216.  
  9217.  
  9218.  
  9219.  
  9220.  
  9221.  
  9222.  
  9223.  
  9224.  
  9225.  
  9226.  
  9227.  
  9228.  
  9229.  
  9230.   -----------------------------------------------------------------------------
  9231.   128  Programmers Guide to the E Editor Toolkit. Version 2.0
  9232.  
  9233.  
  9234.  
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.   APPENDIX C -
  9241.   ____________
  9242.  
  9243.                       -------------------
  9244.                            EDITOR RETURN CODES
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.  
  9261.  
  9262.  
  9263.  
  9264.  
  9265.  
  9266.  
  9267.  
  9268.  
  9269.  
  9270.  
  9271.  
  9272.  
  9273.  
  9274.  
  9275.  
  9276.  
  9277.  
  9278.  
  9279.  
  9280.  
  9281.  
  9282.  
  9283.  
  9284.  
  9285.  
  9286.  
  9287.  
  9288.  
  9289.  
  9290.  
  9291.  
  9292.  
  9293.  
  9294.  
  9295.  
  9296.  
  9297.   -----------------------------------------------------------------------------
  9298.                                                                   Appendix  129
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.                                .----------------------------------------------------------.
  9308.                                | Descriptor Constant                 | Return Code Value  |
  9309.                                |----------------------------------------------------------|
  9310.                                | SEE_MESSAGE                         |  0                 |
  9311.                                |----------------------------------------------------------|
  9312.                                | FILE_NOT_FOUND_RC                   | -2                 |
  9313.                                |----------------------------------------------------------|
  9314.                                | PATH_NOT_FOUND_RC                   | -3                 |
  9315.                                |----------------------------------------------------------|
  9316.                                | TOO_MANY_OPEN_FILES_RC              | -4                 |
  9317.                                |----------------------------------------------------------|
  9318.                                | ACCESS_DENIED_RC                    | -5                 |
  9319.                                |----------------------------------------------------------|
  9320.                                | MEMORY_CONTROL_BLOCKS_RC            | -7                 |
  9321.                                |----------------------------------------------------------|
  9322.                                | INSUFFICIENT_MEMORY_RC              | -8                 |
  9323.                                |----------------------------------------------------------|
  9324.                                | INVALID_DRIVE_RC                    | -15                |
  9325.                                |----------------------------------------------------------|
  9326.                                | NO_MORE_FILES_RC                    | -18                |
  9327.                                |----------------------------------------------------------|
  9328.                                | NUMERIC_OVERFLOW_RC                 | -254               |
  9329.                                |----------------------------------------------------------|
  9330.                                | INVALID_NUMBER_ARGUMENT_RC          | -255               |
  9331.                                |----------------------------------------------------------|
  9332.                                | RECURSION_TOO_DEEP_RC               | -256               |
  9333.                                |----------------------------------------------------------|
  9334.                                | INVALID_NUMBER_OF_PARAMETERS_RC     | -257               |
  9335.                                |----------------------------------------------------------|
  9336.                                | OUT_OF_STRING_SPACE_RC              | -258               |
  9337.                                |----------------------------------------------------------|
  9338.                                | EXPRESSION_STACK_OVERFLOW_RC        | -259               |
  9339.                                |----------------------------------------------------------|
  9340.                                | INVALID_FILEID_RC                   | -260               |
  9341.                                |----------------------------------------------------------|
  9342.                                | ILLEGAL_OPCODE_RC                   | -261               |
  9343.                                |----------------------------------------------------------|
  9344.                                | TOO_MANY_WINDOWS_RC                 | -262               |
  9345.                                |----------------------------------------------------------|
  9346.                                | INVALID_ARGUMENT_RC                 | -263               |
  9347.                                |----------------------------------------------------------|
  9348.                                | LOOP_STACK_OVERFLOW_RC              | -264               |
  9349.                                |----------------------------------------------------------|
  9350.                                | DIVIDE_BY_ZERO_RC                   | -265               |
  9351.                                |----------------------------------------------------------|
  9352.                                | UNABLE_TO_SHRINK_RC                 | -266               |
  9353.                                |----------------------------------------------------------|
  9354.                                | INVALID_CALL_BY_REFERENCE_RC        | -267               |
  9355.                                |----------------------------------------------------------|
  9356.                                | PROCEDURE_NEEDS_MORE_ARGUMENTS_     | -268               |
  9357.                                |----------------------------------------------------------|
  9358.                                | BREAK_KEY_PRESSED_RC                | -269               |
  9359.                                |----------------------------------------------------------|
  9360.                                | NOT_ENOUGH_MEMORY_RC                | -270               |
  9361.  
  9362.  
  9363.   -----------------------------------------------------------------------------
  9364.   130  Programmers Guide to the E Editor Toolkit. Version 2.0
  9365.  
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.                                +.---------------------------------------------------------+
  9374.  
  9375.  
  9376.  
  9377.  
  9378.  
  9379.  
  9380.  
  9381.  
  9382.  
  9383.  
  9384.  
  9385.  
  9386.  
  9387.  
  9388.  
  9389.  
  9390.  
  9391.  
  9392.  
  9393.  
  9394.  
  9395.  
  9396.  
  9397.  
  9398.  
  9399.  
  9400.  
  9401.  
  9402.  
  9403.  
  9404.  
  9405.  
  9406.  
  9407.  
  9408.  
  9409.  
  9410.  
  9411.  
  9412.  
  9413.  
  9414.  
  9415.  
  9416.  
  9417.  
  9418.  
  9419.  
  9420.  
  9421.  
  9422.  
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.   -----------------------------------------------------------------------------
  9430.                                                                   Appendix  131
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.                                +----------------------------------------------------------+
  9440.                                | ERROR_IN_MARGIN_SETTINGS_RC         | -271               |
  9441.                                |----------------------------------------------------------|
  9442.                                | ERROR_IN_TAB_SETTINGS_RC            | -272               |
  9443.                                |----------------------------------------------------------|
  9444.                                | STRING_NOT_FOUND_RC                 | -273               |
  9445.                                |----------------------------------------------------------|
  9446.                                | UNKNOWN_COMMAND_RC                  | -274               |
  9447.                                |----------------------------------------------------------|
  9448.                                | MISSING_FILENAME_RC                 | -275               |
  9449.                                |----------------------------------------------------------|
  9450.                                | LINE_TOO_LONG_TO_JOIN_RC            | -276               |
  9451.                                |----------------------------------------------------------|
  9452.                                | TOO_MANY_FILES_RC                   | -277               |
  9453.                                |----------------------------------------------------------|
  9454.                                | LINES_TRUNCATED_RC                  | -278               |
  9455.                                |----------------------------------------------------------|
  9456.                                | TEXT_ALREADY_MARKED_RC              | -279               |
  9457.                                |----------------------------------------------------------|
  9458.                                | TEXT_NOT_MARKED_RC                  | -280               |
  9459.                                |----------------------------------------------------------|
  9460.                                | SOURCE_DEST_CONFLICT_RC             | -281               |
  9461.                                |----------------------------------------------------------|
  9462.                                | NEW_FILE_RC                         | -282               |
  9463.                                |----------------------------------------------------------|
  9464.                                | LINE_MARK_REQUIRED_RC               | -283               |
  9465.                                |----------------------------------------------------------|
  9466.                                | ERROR_OPENING_FILE_RC               | -284               |
  9467.                                |----------------------------------------------------------|
  9468.                                | ERROR_WRITING_FILE_RC               | -285               |
  9469.                                |----------------------------------------------------------|
  9470.                                | ERROR_READING_FILE_RC               | -286               |
  9471.                                |----------------------------------------------------------|
  9472.                                | INSUFFICIENT_DISK_SPACE_RC          | -287               |
  9473.                                |----------------------------------------------------------|
  9474.                                | BLOCK_MARK_REQUIRED_RC              | -288               |
  9475.                                |----------------------------------------------------------|
  9476.                                | TOO_MANY_RINGS_RC                   | -289               |
  9477.                                |----------------------------------------------------------|
  9478.                                | INCORRECT_VERSION_RC                | -290               |
  9479.                                |----------------------------------------------------------|
  9480.                                | NO_MAIN_ENTRY_POINT_RC              | -291               |
  9481.                                |----------------------------------------------------------|
  9482.                                | ERROR_CLOSING_FILE_RC               | -292               |
  9483.                                |----------------------------------------------------------|
  9484.                                | CMDLINE_TOO_LONG_RC                 | -300               |
  9485.                                |----------------------------------------------------------|
  9486.                                | CANT_UNLINK_MOD_IN_USE_RC           | -301               |
  9487.                                |----------------------------------------------------------|
  9488.                                | CANT_UNLINK_KEY_MOD_RC              | -302               |
  9489.                                |----------------------------------------------------------|
  9490.                                | INTERNAL_INVALID_MOD_NBR_RC         | -303               |
  9491.                                |----------------------------------------------------------|
  9492.                                | LINK_MODULE_ERROR_RC                | -304               |
  9493.  
  9494.  
  9495.   -----------------------------------------------------------------------------
  9496.   132  Programmers Guide to the E Editor Toolkit. Version 2.0
  9497.  
  9498.  
  9499.  
  9500.  
  9501.  
  9502.  
  9503.  
  9504.  
  9505.                                +----------------------------------------------------------+
  9506.  
  9507.                                +----------------------------------------------------------+
  9508.                                | MAIN_NOT_FOUND_RC                   | -305               |
  9509.                                |----------------------------------------------------------|
  9510.                                | INIT_NOT_FOUND_RC                   | -306               |
  9511.                                |----------------------------------------------------------|
  9512.                                | LOADFILE_FINDFILE_RC                | -307               |
  9513.                                |----------------------------------------------------------|
  9514.                                | LOADFILE_MAKEFILE_RC                | -308               |
  9515.                                |----------------------------------------------------------|
  9516.                                | LOADFILE_ALREADYLINKED_RC           | -309               |
  9517.                                |----------------------------------------------------------|
  9518.                                | UNLINK_UNKNOWN_MODULE_RC            | -310               |
  9519.                                |----------------------------------------------------------|
  9520.                                | UNLINK_BAD_MODULE_FN_RC             | -311               |
  9521.                                |----------------------------------------------------------|
  9522.                                | CALL_DUPLICATED_PROC_RC             | -312               |
  9523.                                |----------------------------------------------------------|
  9524.                                | CALL_UNKNOWN_PROC_RC                | -313               |
  9525.                                |----------------------------------------------------------|
  9526.                                | GREP_MEMORY_ERROR                   | -314               |
  9527.                                |----------------------------------------------------------|
  9528.                                | GREP_MISSING_BRACKET                | -315               |
  9529.                                |----------------------------------------------------------|
  9530.                                | GREP_BAD_RANGE                      | -316               |
  9531.                                |----------------------------------------------------------|
  9532.                                | GREP_EMPTY_RANGE                    | -317               |
  9533.                                |----------------------------------------------------------|
  9534.                                | GREP_REGULAR_EXPRESSION_LONG        | -318               |
  9535.                                |----------------------------------------------------------|
  9536.                                | DYNALINK_INCORRECT_PARAMETERS       | -319               |
  9537.                                |----------------------------------------------------------|
  9538.                                | CANNOT_FIND_KEYSET                  | -321               |
  9539.                                |----------------------------------------------------------|
  9540.                                | BAD_LIBRARY_OR_PROC                 | -322               |
  9541.                                |----------------------------------------------------------|
  9542.                                | INVALID_LINE_NUMBER                 | -323               |
  9543.                                |----------------------------------------------------------|
  9544.                                | KBDSETSTATUS_FAILED                 | -324               |
  9545.                                |----------------------------------------------------------|
  9546.                                | BUFFER_CREATE_SIZE                  | -325               |
  9547.                                |----------------------------------------------------------|
  9548.                                | BAD_PROCEDURE                       | -326               |
  9549.                                `----------------------------------------------------------'
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.  
  9558.  
  9559.  
  9560.  
  9561.   -----------------------------------------------------------------------------
  9562.                                                                   Appendix  133
  9563.  
  9564.  
  9565.  
  9566.  
  9567.  
  9568.  
  9569.  
  9570.  
  9571.   APPENDIX E -
  9572.   ____________
  9573.  
  9574.                       -----------------------------------------------------
  9575.                            DESCRIPTION OF THE GLOBAL DATA  STRUCTURE.
  9576.                            (GLOBDATA)
  9577.  
  9578.                            _____________________
  9579.  
  9580.                               +------------------------------------------------------------------------+
  9581.                               |   Global Data Structure defined in 'C'                                 |
  9582.                               |------------------------------------------------------------------------|
  9583.                               |   typedef struct {                                                     |
  9584.                               |       HAB         hAB;                                                 |
  9585.                               |       EPMRES      eres;                                                |
  9586.                               |       HMODULE     eresModule;                                          |
  9587.                               |       HMQ         hmq;                                                 |
  9588.                               |       HDC         hDCApp;                                              |
  9589.                               |       PFNWP       DefFrameProc;                                        |
  9590.                               |       PSZ         ShrMsgBuff;                                          |
  9591.                               |       RECTL       rc;                                                  |
  9592.                               |       USHORT      stagcount;                                           |
  9593.                               |       CHAR        LastCmdLine[256];                                    |
  9594.                               |       CHAR        EPMClass[32];                                        |
  9595.                               |       CHAR        AllowMultProcesses;                                  |
  9596.                               |       HWND        hwndHelpInstance;                                    |
  9597.                               |       HELPINIT    hmiHelpData;                                         |
  9598.                               |       CHAR        IniApplicationName[20];                              |
  9599.                               |       PSZ         ExSearchPath;                                        |
  9600.                               |       BOOL        CountOnlyVisibleWindows;                             |
  9601.                               |       USHORT      ApplicationID;                                       |
  9602.                               |       CHAR        ApplicationName[20];                                 |
  9603.                               |       ULONG       EditWindowListStyle;                                 |
  9604.                               |       } GLOBDATA;                                                      |
  9605.                               |                                                                        |
  9606.                               +------------------------------------------------------------------------+
  9607.  
  9608.  
  9609.                            hAB  The  Application Anchor Block.    To obtain the
  9610.                            applications  anchor  block  use  the  WinInitialize
  9611.                            function.  (example:  hab = WinInitialize(NULL);  )
  9612.  
  9613.  
  9614.  
  9615.                            eres   Structure  shared  between  applications  and
  9616.                            ERES.DLL. The pointer to this  structure  is  passed
  9617.                            into  ERES.DLL  where  it is used internally.   (See
  9618.                            Appendix G for a description of this structure)
  9619.  
  9620.  
  9621.  
  9622.                            eresModule Module handle of ERES.DLL. Optained  with
  9623.                            the DosLoadModule function.
  9624.  
  9625.  
  9626.  
  9627.  
  9628.   -----------------------------------------------------------------------------
  9629.   134  Programmers Guide to the E Editor Toolkit. Version 2.0
  9630.  
  9631.  
  9632.  
  9633.  
  9634.  
  9635.  
  9636.  
  9637.  
  9638.                            hmq The handle to the applications message queue.
  9639.  
  9640.  
  9641.  
  9642.                            hDCApp  The handle to the applications window device
  9643.                            context.
  9644.  
  9645.  
  9646.  
  9647.                            DefFrameProc Used internally.
  9648.  
  9649.  
  9650.  
  9651.                            ShrMsgBuff The pointer to  the  applications  shared
  9652.                            message buffer.
  9653.  
  9654.  
  9655.  
  9656.                            rc Used in positioning editwindows.
  9657.  
  9658.  
  9659.  
  9660.                            stagcount Stagger window count.
  9661.  
  9662.  
  9663.  
  9664.                            LastCmdLine  The  last command line used to  open an
  9665.                            edit window.
  9666.  
  9667.  
  9668.  
  9669.                            EPMClass Edit window class name.  Used  to  identify
  9670.                            edit windows.
  9671.  
  9672.  
  9673.  
  9674.                            AllowMultProcesses Flag to allow multiple processes
  9675.  
  9676.  
  9677.  
  9678.                            hwndHelpInstance   Window   handle  of  the  a  help
  9679.                            instance of the information presentation facility
  9680.  
  9681.  
  9682.  
  9683.                            hmiHelpData Hook for  the  information  presentation
  9684.                            facility.
  9685.  
  9686.  
  9687.  
  9688.                            IniApplicationName  Name of the ini file to save and
  9689.                            retrieve internal data from.
  9690.  
  9691.  
  9692.  
  9693.  
  9694.   -----------------------------------------------------------------------------
  9695.                                                                   Appendix  135
  9696.  
  9697.  
  9698.  
  9699.  
  9700.  
  9701.  
  9702.  
  9703.  
  9704.                            ExSearchPath Ex file search path.
  9705.  
  9706.  
  9707.  
  9708.                            CountOnlyVisibleWindows  When  set this flag insures
  9709.                            that ERESCountEwindows returns only  the  number  of
  9710.                            visible edit windows.
  9711.  
  9712.  
  9713.  
  9714.                            ApplicationID   Unique   window   id  specified  for
  9715.                            editwindows.
  9716.  
  9717.  
  9718.  
  9719.                            ApplicationName Name of application.
  9720.  
  9721.  
  9722.  
  9723.                            EditWindowListStyle Edit window  list  dialog  style
  9724.                            flag.  The  following  flags can be used to position
  9725.                            the edit window list dialog.
  9726.  
  9727.                            o   EWindow_List_Window_Middle  -  display  in   the
  9728.                                middle of the active window.
  9729.  
  9730.                            o   EWindow_List_Window_Corner   -  display  in  the
  9731.                                lower right corner of the
  9732.                                                                 active window.
  9733.  
  9734.  
  9735.  
  9736.  
  9737.  
  9738.  
  9739.  
  9740.  
  9741.  
  9742.  
  9743.  
  9744.  
  9745.  
  9746.  
  9747.  
  9748.  
  9749.  
  9750.  
  9751.  
  9752.  
  9753.  
  9754.  
  9755.  
  9756.  
  9757.  
  9758.  
  9759.  
  9760.   -----------------------------------------------------------------------------
  9761.   136  Programmers Guide to the E Editor Toolkit. Version 2.0
  9762.  
  9763.  
  9764.  
  9765.  
  9766.  
  9767.  
  9768.  
  9769.  
  9770.   APPENDIX F -
  9771.   ____________
  9772.  
  9773.                       ------------------------------------------------
  9774.                            DESCRIPTION OF THE ERES DATA STRUCTURE. (EPMRES)
  9775.  
  9776.                            _____________________
  9777.  
  9778.                               .------------------------------------------------------------------------.
  9779.                               |   Eres Data Structure defined in 'C'                                   |
  9780.                               |------------------------------------------------------------------------|
  9781.                               |   typedef struct EPMRES_TYPE {                                         |
  9782.                               |      HAB     hAB;                                                      |
  9783.                               |      HWND    hwndAppFrame;                                             |
  9784.                               |      HWND    hwndAppClient;                                            |
  9785.                               |      HWND    hwndActiveEdit;                                           |
  9786.                               |      HWND    hwndActiveDlgBox;                                         |
  9787.                               |      HWND    hwndSearchReplaceBox;                                     |
  9788.                               |      CHAR    exfilename[MAXFILENAME];                                  |
  9789.                               |      LISTDLG cmd;                                                      |
  9790.                               |      LISTDLG msgbox;                                                   |
  9791.                               |      LISTDLG open1;                                                    |
  9792.                               |      BOOL    skipopen1;                                                |
  9793.                               |      CHAR    saveretpath[MAXFILENAME];                                 |
  9794.                               |      PVOID   dlgin;                                                    |
  9795.                               |      PVOID   internal;                                                 |
  9796.                               |   } EPMRES;                                                            |
  9797.                               .------------------------------------------------------------------------.
  9798.  
  9799.  
  9800.  
  9801.                            hAB  The  Application Anchor Block.    To obtain the
  9802.                            applications  anchor  block  use  the  WinInitialize
  9803.                            function.  (example:  hab = WinInitialize(NULL);  )
  9804.  
  9805.  
  9806.  
  9807.                            hwndAppFrame The applications frame window handle.
  9808.  
  9809.  
  9810.  
  9811.                            hwndAppClient The applications client window handle.
  9812.  
  9813.  
  9814.  
  9815.                            hwndActiveEdit  The window handle of the active edit
  9816.                            window.
  9817.  
  9818.  
  9819.  
  9820.                            hwndActiveDlgBox The window  handle  of  the  active
  9821.                            dialog box.
  9822.  
  9823.  
  9824.  
  9825.  
  9826.  
  9827.   -----------------------------------------------------------------------------
  9828.                                                                   Appendix  137
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.                            hwndSearchReplaceBox The window handle of the Search
  9838.                            Replace dialog box.
  9839.  
  9840.  
  9841.  
  9842.                            exfilename String containing the name of the main ex
  9843.                            file.
  9844.  
  9845.  
  9846.  
  9847.                            cmd  Structure  used to store entries in the command
  9848.                            dialog box.
  9849.  
  9850.  
  9851.  
  9852.                            msgbox  Structure  used  to  store  entries  in  the
  9853.                            Message box dialog.
  9854.  
  9855.  
  9856.  
  9857.                            open1  Structure  containing previous entries in the
  9858.                            open dialog box.
  9859.  
  9860.  
  9861.  
  9862.                            skipopen1 When set skips the open1  dialog  box  and
  9863.                            presents the list dialog box.
  9864.  
  9865.  
  9866.  
  9867.                            saveretpath The name of the file containing retrieve
  9868.                            list data.
  9869.  
  9870.  
  9871.  
  9872.                            dlgin Pointer to dialog input information.
  9873.  
  9874.  
  9875.  
  9876.                            internal Used internally in ERES.DLL.
  9877.  
  9878.  
  9879.  
  9880.  
  9881.  
  9882.  
  9883.  
  9884.  
  9885.  
  9886.  
  9887.  
  9888.  
  9889.  
  9890.  
  9891.  
  9892.  
  9893.   -----------------------------------------------------------------------------
  9894.   138  Programmers Guide to the E Editor Toolkit. Version 2.0
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.   APPENDIX G -
  9904.   ____________
  9905.  
  9906.                       -------------------------------------------------------
  9907.                            DESCRIPTION THE MESSAGES HANDLED BY
  9908.                            ERESCOMMONWNDPROC()
  9909.  
  9910.                            _____________________
  9911.  
  9912.                            The     Following    message    are    handled    by
  9913.                            ERESCommonWndProc():
  9914.  
  9915.  
  9916.                            o   WM_COMMAND
  9917.                            o   EPM_EDIT_NEWFILE
  9918.                            o   EPM_EDIT_HELPNOTIFY
  9919.                            o   EPM_EDIT_RETCODE
  9920.                            o   EPM_EDIT_DESTROYNOTIFY
  9921.                            o   EPM_POPCMDLINE
  9922.                            o   EPM_POPMSGBOX
  9923.                            o   EPM_POPOPENDLG
  9924.                            o   EPM_POPCHANGEDLG
  9925.                            o   EPM_POPCONFIGDLG
  9926.                            o   EPM_POPHELPBROWSER
  9927.                            o   EPM_POPHELPMGRPANEL
  9928.                            o   EPM_OPEN_EDITWINDOW
  9929.                            o   EPM_SAVE_LISTS
  9930.                            o   EPM_RETRIEVE_LISTS
  9931.                            o   EPM_EDIT_ACTIVEHWND
  9932.  
  9933.  
  9934.                            WM_COMMAND
  9935.  
  9936.                            Process a message from the system menu bar.  Message
  9937.                            parameter one is the id of the item selected.
  9938.  
  9939.  
  9940.  
  9941.                            EPM_EDIT_NEWFILE   An   existing   edit   window  is
  9942.                            requesting  to  open   up   a   new   edit   window.
  9943.                            ERESOpenEditWindow is called to handle it.
  9944.  
  9945.  
  9946.  
  9947.                            EPM_EDIT_HELPNOTIFY This message is in response to a
  9948.                            WM_HELP message that was received by an edit window.
  9949.                            It  is  handled  by  either  creating a help manager
  9950.                            panel, or create a file with the help brower file.
  9951.  
  9952.  
  9953.  
  9954.                            EPM_EDIT_RETCODE
  9955.                             Used internally.
  9956.  
  9957.  
  9958.  
  9959.  
  9960.   -----------------------------------------------------------------------------
  9961.                                                                   Appendix  139
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.                            EPM_EDIT_DESTROYNOTIFY  This  message  notifies  EPM
  9971.                            that  a  edit window has been closed.  If it was the
  9972.                            last edit  window  and  the  search  replace  dialog
  9973.                            exists, destroy that dialog.
  9974.  
  9975.  
  9976.  
  9977.                            EPM_POPCMDLINE This message is handled by poping the
  9978.                            command line dialog box.
  9979.  
  9980.  
  9981.  
  9982.                            EPM_POPMSGBOX  This message is handled by poping the
  9983.                            message dialog box.
  9984.  
  9985.  
  9986.  
  9987.                            EPM_POPOPENDLG This message is handled by poping the
  9988.                            open1 dialog box.
  9989.  
  9990.  
  9991.  
  9992.                            EPM_POPCHANGEDLG This message is handled  by  poping
  9993.                            the find/change dialog box.
  9994.  
  9995.  
  9996.  
  9997.                            EPM_POPCONFIGDLG  This  message is handled by poping
  9998.                            the configuration dialog box.
  9999.  
  10000.  
  10001.  
  10002.                            EPM_POPHELPBROWSER This message is handled by poping
  10003.                            an edit window containing the help browser file.
  10004.  
  10005.  
  10006.  
  10007.                            EPM_POPHELPMGRPANEL This message pops a help manager
  10008.                            panel.
  10009.  
  10010.  
  10011.  
  10012.                            EPM_OPEN_EDITWINDOW Used internally by EPM
  10013.  
  10014.  
  10015.  
  10016.                            EPM_SAVE_LISTS Calls ERESSaveLists()
  10017.  
  10018.  
  10019.  
  10020.                            EPM_RETRIEVELIST Calls ERESRetrieveList()
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.   -----------------------------------------------------------------------------
  10027.   140  Programmers Guide to the E Editor Toolkit. Version 2.0
  10028.  
  10029.  
  10030.  
  10031.  
  10032.  
  10033.  
  10034.  
  10035.  
  10036.                            EPM_EDIT_ACTIVEHWND Used internally.
  10037.  
  10038.  
  10039.  
  10040.  
  10041.  
  10042.  
  10043.  
  10044.  
  10045.  
  10046.  
  10047.  
  10048.  
  10049.  
  10050.  
  10051.  
  10052.  
  10053.  
  10054.  
  10055.  
  10056.  
  10057.  
  10058.  
  10059.  
  10060.  
  10061.  
  10062.  
  10063.  
  10064.  
  10065.  
  10066.  
  10067.  
  10068.  
  10069.  
  10070.  
  10071.  
  10072.  
  10073.  
  10074.  
  10075.  
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.  
  10087.  
  10088.  
  10089.  
  10090.  
  10091.  
  10092.   -----------------------------------------------------------------------------
  10093.                                                                   Appendix  141
  10094.  
  10095.  
  10096.  
  10097.