home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmcsamp.zip / EPMCSAMP / ETKE.INF (.txt) next >
OS/2 Help File  |  1994-10-18  |  186KB  |  3,937 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction. ΓòÉΓòÉΓòÉ
  3.  
  4. The E-Toolkit assists a software developer in building applications that edit 
  5. multiple lines of text.  The E-Toolkit gives developers access to OS/2 
  6. functions and PM messages that enable the creation and manipulation of an 
  7. advanced multi-line edit control window.  This multi-line edit window contains 
  8. an advanced text editor engine based on the "E" text editor technology. This 
  9. multi-line edit window is referred to as the E-MLE.  The E-MLE is a versatile 
  10. control window that supports many primitive operations which allow easy access 
  11. to powerful text editing capabilities. 
  12.  
  13. For example, The E-MLE supports the editing of large files (limited only by 
  14. system memory).  Each E-MLE can store multiple files, each of which can be 
  15. viewed one at a time.  (The feature is known as a "file RING") The E-MLE 
  16. supports text with associated attribute information.  Using the attribute 
  17. feature your application can display text in Multiple Fonts, Multiple colors, 
  18. and even associate commands with regions of text. (Associating commands with 
  19. regions of text can be a way of implementing HyperText.)  An advanced feature 
  20. is available which allows other window classes to be overlayed with in a E-MLE. 
  21. Using this "Overlay Window" feature, a E-MLE can incorporate images along with 
  22. text. 
  23.  
  24. The behavior of an E-MLE can be enhanced by adding new methods of behavior in 
  25. any of the following ways.  The E-MLE can be sub-classed using traditional PM 
  26. functions written in C. (i.e WinSubclassWindow(...)).  New methods can also be 
  27. added to an E-MLE by simply extending event definitions by writing E or REXX 
  28. macros. 
  29.  
  30. This document describes the Application Program Interface (API) of the 
  31. E-Toolkit.  Examples are provided that demonstrate some of the more popular way 
  32. in which an E-MLE can be used. 
  33.  
  34. As mentioned above, The E-MLE can also be extended by writing Macros.  The E 
  35. Technical Reference manual describes how macros can be written. 
  36.  
  37.  
  38. ΓòÉΓòÉΓòÉ 2. Overview ΓòÉΓòÉΓòÉ
  39.  
  40.  
  41. ΓòÉΓòÉΓòÉ 2.1. E Tool-Kit Programming ΓòÉΓòÉΓòÉ
  42.  
  43.  The E Tool-Kit was designed to supply a highly configurable edit control to 
  44. application programmers.  The three major components of the E Tool-Kit are: 
  45.  
  46.  1. ETKExxx.DLL - Creation of E-MLE, Etk Functions 
  47.  2. E Macros   - Customizing editing function 
  48.  3. ETKRxxx.DLL - E Toolkit Resource DLL, ERES Functions 
  49.  
  50.  ETKExxx.DLL is the dynamic link library that contains the functions that will 
  51. allow you to create your own custom E-MLE windows.  Both messages and functions 
  52. are available for a user to subclass the behavior of an E-MLE.  Functions 
  53. include: EtkInsertText, EtkProcessEditKey, and EtkSetFileField, and 
  54. EtkQueryText. Messages include the EPM_EDIT_COMMAND message which allows any 
  55. defined editor commands to be issued to an E-MLE.  The API to this library is 
  56. described in detail in this document. All functions from this library include 
  57. names prefixed with Etk. 
  58.  
  59.  ETKExxx.DLL contains all of the primitives required for an edit control. E 
  60. Macros are used to build function into the edit control. Therefore, without any 
  61. macros the edit control can't supply any editing function. The E Macros are 
  62. used to map function to keys, and create new edit commands. For example, you 
  63. can build new commands using the E macros "defc" construct. The E Macro 
  64. language is described in "The EPM Technical Reference" documentation. An 
  65. application can either supply its own macros when using the E-MLE or use the  E 
  66. Tool-Kit's base macros. It is recommended that applications use the base E 
  67. Macros and extend them where function is needed. See the "EPM Technical 
  68. Reference" for more information about the base E Macros and macro programming. 
  69.  
  70.  ETKRxxx.dll includes dialogs and function that are needed in most 
  71. applications. Dialog include search, undo, print, settings, and open. It 
  72. requires that an application is using the base E Macros. The dialogs and 
  73. functions in ETKRxx.dll issue edit commands that are defined in the base E 
  74. Macros. All functions in ETKRxxx.dll have names prefixed with ERES. Sample 
  75. program 2 uses the functions in this DLL. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ 2.2. Special Notes!!! ΓòÉΓòÉΓòÉ
  79.  
  80.  1. PM Queue size. 
  81.  
  82. The E-MLE requires a large queue for message passing, therefore when your 
  83. application creates its message queue it should be at least 0x100. For 
  84. examples, 
  85.  
  86.     hmq = WinCreateMsgQueue(hab, 0x100);    // Create Queue
  87.  
  88.  
  89. ΓòÉΓòÉΓòÉ 3. The E-MLE Control ΓòÉΓòÉΓòÉ
  90.  
  91.  
  92. ΓòÉΓòÉΓòÉ 3.1. Description ΓòÉΓòÉΓòÉ
  93.  
  94.  A simple E-MLE is just an edit window with no other types of windows like a 
  95. frame or vertical and horizontal scroll bars. A simple E-MLE is typically 
  96. imbeded in other windows like the client area of a standard window, or a 
  97. dialog. Since the simple E-MLE has no other windows associated with it it's 
  98. easy to integrate and customize it with your applications user interface. 
  99.  
  100.  
  101. ΓòÉΓòÉΓòÉ 3.2. Creating a Simple E-MLE ΓòÉΓòÉΓòÉ
  102.  
  103.  To Create an E-MLE your application must do the following: 
  104.  
  105.  1. Register the E-MLE window class. By calling the EtkRegisterEMLEClass() 
  106.     function of the E Toolkit your application will register the E-MLE and 
  107.     receive the E-MLE window class name. 
  108.  
  109.  Example 
  110.  
  111.                 PSZ E_MLE_ClassName;
  112.  
  113.                 E_MLE_ClassName = EtkRegisterEMLEClass(hab);
  114.  
  115.  2. Allocate storage for a variable of type EDITWNDCTRLDATA, and initialize all 
  116.     fields appropriate for your application. Insure that all fields not used 
  117.     are set to NULL. EDITWNDCTRLDATA has the following fields: 
  118.  
  119.    FileName 
  120.              The name of the file to be edited.  This string can include 
  121.              multiple file names or wildcards ("ESIMPLE.C ESIMPLE.E" or "*.C"), 
  122.              in which case multiple files will be added to the E-MLE ring of 
  123.              files. 
  124.    EditorStyle Editor Style flags. The following flags can be set. 
  125.  
  126.       EDIT_STYLE_BROWSE 
  127.                 causes read-only access to file. 
  128.       EDIT_STYLE_CURSORON 
  129.                 enables the edit window cursor. 
  130.    ExFile 
  131.              The name of the pre-compiled macro code file. ("ESIMPLE.EX"). 
  132.    TopMkr 
  133.              Top of file marker. 
  134.    BotMkr 
  135.              Bottom of file marker. 
  136.    ExSearchPath 
  137.              The name an environment variable with the path to use for macro 
  138.              file searches.  The E Macro Language has the ability to link in 
  139.              additional *.EX files.  See the E Technical Reference manual for 
  140.              further information on linking additional macros. 
  141.    ExePath 
  142.              A string containing directory where the application started.  This 
  143.              field is also used for macro file searches. 
  144.  
  145.  Example 
  146.  
  147.  
  148.               EDITWNDCTRLDATA EditWndCtrlData;
  149.  
  150.               EditWndCtrlData.FileName    = "ESIMPLE.C";
  151.               EditWndCtrlData.EditorStyle = EDIT_STYLE_CURSORON;
  152.               EditWndCtrlData.ExFile      = "ESIMPLE.EX";
  153.               EditWndCtrlData.TopMkr      = "---Top of File---"
  154.               EditWndCtrlData.BotMkr      = "---Bottom of File---"
  155.               EditWndCtrlData.ExePath     = ".";
  156.  
  157.  3. Create an E-MLE window using WinCreateWindow().  Typically the class name 
  158.     returned by EtkRegisterEMLEClass() is used with WinCreateWindow() to create 
  159.     a standard E-MLE window. 
  160.  
  161.  Example 
  162.  
  163.               HWND   HwndEMLE;
  164.               USHORT My_EMLE_ID = 1001;
  165.  
  166.               HwndEMLE = WinCreateWindow(HwndParent,
  167.                                          E_MLE_ClassName,
  168.                                          NULL,
  169.                                          0L,
  170.                                          10, 10, 200, 400,
  171.                                          HwndOwner,
  172.                                          HWND_TOP,
  173.                                          My_EMLE_ID,
  174.                                          NULL);
  175.  
  176.  4. Subclass the E-MLE window procedure to process any desired messages. The 
  177.     E-MLE doesn't send any messages to its owner, except for 
  178.     EPM_EDIT_DESTROYNOTIFY.  E-MLE messages are sent to itself, therefore the 
  179.     owner of the E-MLE is required to subclass the E-MLE to process any of its 
  180.     messages.  To dynamically subclass the edit window after it has been 
  181.     created use WinSubclassWindow().  If you application needs to process all 
  182.     initial messages including WM_CREATE, or wants to add more window words 
  183.     then static subclassing of the E-MLE class is required before creating the 
  184.     window.  See appendix A for a description of the steps required to 
  185.     statically subclass an E-MLE. 
  186.  
  187.  Example 
  188.  
  189.               //*************************************************************
  190.               //Dynamically subclass the E-MLE after it has been created.
  191.               PFNWP DefaultEMLEWindowProc;
  192.  
  193.               DefaultEMLEWindowProc = WinSubclassWindow(HwndEMLE, EMLESubclassWndProc);
  194.  
  195.               //EMLESubcassWndProc is the window procedure your application will
  196.               //supply to subclass all E-MLE messages. All messages that your
  197.               //application doesn't use should be sent to the E-MLE window procedure.
  198.               //In this example it would be DefaultEMLEWindowProc.
  199.  
  200.  
  201. ΓòÉΓòÉΓòÉ 4. The EFrame Control ΓòÉΓòÉΓòÉ
  202.  
  203.  
  204. ΓòÉΓòÉΓòÉ 4.1. Description ΓòÉΓòÉΓòÉ
  205.  
  206.  An EFrame is a similiar to a PM standard window with the client area being an 
  207. E-MLE. In addition to the controls supplied with a standard window like a 
  208. frame, scroll bars, and min-max buttons, an EFrame control adds the following: 
  209.  
  210. Status  line 
  211.           Can be customized to display various status information relate to the 
  212.           file currently being edited in the E-MLE ring.  By default it 
  213.           displays, line, column, modified status, insert/replace status, and 
  214.           the number of files in the E-MLE ring. 
  215. Message line 
  216.           A text field which displays internal editor messages, or messages 
  217.           generated by the SAYERROR, E macro statement.  Your application can 
  218.           use this control to send messages to users, by writing a command 
  219.           macro which executes a SAYERROR.  (See the E Technical Reference for 
  220.           more information on writing E macro commands and SAYERROR) 
  221. Direct manipulation title bar 
  222.           Allows a user to double click with the right mouse button on the 
  223.           title bar to change the name of the file. 
  224. Drag-Drop support 
  225.           Allows the current file or all the files in the E-MLE ring to be drag 
  226.           and drop to and from another application or window.  In addition 
  227.           marked text can be drag and droped to another application or another 
  228.           place in the file being edited. 
  229. Ring buttons 
  230.           Switches the current file being edited to the next file in the E-MLE 
  231.           ring. 
  232. Task list entry support 
  233.           Handles task list entry related functions.  Displays the name of the 
  234.           current file in the E-MLE ring, and optionally an application name 
  235.           prefix in the task list. 
  236.  An EFrame is typically used as a desktop window or the child of a standard 
  237. window. It is used when standard editing function is required, like editing 
  238. multiple files, or draging and droping to and from other applications and 
  239. windows. The EPM application uses the EFrame control to display edit windows. 
  240.  
  241.  
  242. ΓòÉΓòÉΓòÉ 4.2. Creating an EFrame Control ΓòÉΓòÉΓòÉ
  243.  
  244.  To create an EFrame control your application must do the following: 
  245.  
  246.  1. Call the EtkRegisterEFrameClass() function of the E Toolkit to register the 
  247.     EFrame window class. 
  248.  
  249.  Example 
  250.  
  251.               PSZ EFrameClassName;
  252.  
  253.               EFrameClassName = EtkRegisterEFrameClass(hab);
  254.  
  255.  2. Allocate storage for a variable of type EFRAMEEDITWNDCTRLDATA, and 
  256.     initialize all fields appropriate for your application.  Insure that all 
  257.     fields not used are set to NULL.  EFRAMEEDITWNDCTRLDATA is composed of the 
  258.     struct of type EDITWNDCTRLDATA described in the section "Creating a Simple 
  259.     E-MLE", an optional string with the name of the statically subclassed E-MLE 
  260.     control, and a struct of type EFRAMECTRLDATA. EFRAMECTRLDATA has the 
  261.     following fields: 
  262.  
  263.    PMFlags 
  264.              Standard PM Frame flags.  Use the PM FCF_* Frame control flags to 
  265.              set any controls PM supplies with its frame control. 
  266.    Flags 
  267.              EFrame flags.  Can be set with the following flag constants: 
  268.  
  269.       EFRAMEF_STATUSWND 
  270.                 Status line window 
  271.       EFRAMEF_MESSAGEWND 
  272.                 Message line window 
  273.       EFRAMEF_RINGBUTTONS 
  274.                 Ring buttons 
  275.       EFRAMEF_INFOONTOP 
  276.                 Moves Status and Message windows above the E-MLE window 
  277.       EFRAMEF_FILEWND 
  278.                 File Icon window place on the EFrame title bar used for drag 
  279.                 and drop 
  280.       EFRAMEF_DMTBWND 
  281.                 Direct Manipulation title bar 
  282.       EFRAMEF_TASKLISTENTRY 
  283.                 Task list entry support 
  284.    HIcon 
  285.              Handle to the icon the EFrame should use when its minimized.  If 
  286.              set to NULL the default EFrame icon is used. 
  287.  
  288.     The EditWndClassName field of the EFRAMEEDITWNDCTRLDATA structure is used 
  289.     if the class of the E-MLE is different from the default E-MLE window class. 
  290.     If your application statically subclasses the E-MLE window class before the 
  291.     EFrame is created this field can be set to the new class you have created. 
  292.  
  293.  Example 
  294.  
  295.               EFRAMEEDITWNDCTRLDATA EFrameEditWndCtrlData;
  296.  
  297.               //Initialize E-MLE related fields
  298.               EFrameEditWndCtrlData.EditWndCtrlData.FileName    = "ESIMPLE.C";
  299.               EFrameEditWndCtrlData.EditWndCtrlData.EditorStyle = EDIT_STYLE_CURSORON;
  300.               EFrameEditWndCtrlData.EditWndCtrlData.ExFile      = "ESIMPLE.EX";
  301.               EFrameEditWndCtrlData.EditWndCtrlData.TopMkr      = "---Top of File---"
  302.               EFrameEditWndCtrlData.EditWndCtrlData.BotMkr      = "---Bottom of File---"
  303.               EFrameEditWndCtrlData.EditWndCtrlData.ExePath     = ".";
  304.  
  305.               //Initialize EFrame related fields
  306.               EFrameEditWndCtrlData.EFrameCtrlData.PMFlags =
  307.                                               FCF_TITLEBAR        | FCF_SIZEBORDER |
  308.                                               FCF_VERTSCROLL      | FCF_HORZSCROLL |
  309.                                               FCF_NOMOVEWITHOWNER | FCF_SYSMENU    |
  310.                                               FCF_MINMAX;
  311.  
  312.               EFrameEditWndCtrlData.EFrameCtrlData.Flags   =
  313.                                               EFRAMEF_STATUSWND   | EFRAMEF_MESSAGEWND |
  314.                                               EFRAMEF_FILEWND     | EFRAMEF_DMTBWND    |
  315.                                               EFRAMEF_RINGBUTTONS |
  316.                                               EFRAMEF_TASKLISTENTRY;
  317.  
  318.               EFrameEditWndCtrlData.EFrameCtrlData.HIcon  = NULL;
  319.  
  320.               EFrameEditWndCtrlData.EditWndClassName      = NULL;
  321.  
  322.  3. Create an EFrame window using WinCreateWindow(). 
  323.  
  324.  Example 
  325.  
  326.               HWND HwndEFrame;
  327.  
  328.               EFrame = WinCreateWindow(  HwndParent,
  329.                                          EFrameClassName,
  330.                                          NULL,
  331.                                          0L,
  332.                                          10, 40, 200, 200,
  333.                                          HwndOwner,
  334.                                          HWND_TOP,
  335.                                          1001,
  336.                                          &EFrameEditWndCtrlData,
  337.                                          (PVOID)NULL);
  338.  
  339.  4. Subclass the E-MLE window of the EFrame to process any desired messages. 
  340.     When creating an EFrame the window ID of the E-MLE is set to FID_CLIENT. 
  341.     This window ID is used to query the window handle of the E-MLE with the PM 
  342.     function WinWindowFromID(). 
  343.  
  344.  Example 
  345.  
  346.              HWND   HwndEMLE;
  347.              PFNWP  DefaultEMLEWndProc;
  348.  
  349.              HwndEMLE = WinWindowFromID(EFrame, FID_CLIENT);
  350.              DefaultEMLEWndProc = WinSubclassWindow(HwndEMLE, EMLESubclassedWndProc);
  351.  
  352.  
  353. ΓòÉΓòÉΓòÉ 5. E Toolkit functions at a glance. ΓòÉΓòÉΓòÉ
  354.  
  355. The following functions are used to manipulate various aspects of an E-MLE. 
  356.  
  357.  
  358. ΓòÉΓòÉΓòÉ 5.1. Class Registration, and Version Query Functions ΓòÉΓòÉΓòÉ
  359.  
  360. EtkVersion 
  361.           Query E Toolkit version 
  362. EtkRegisterEMLEClass 
  363.           Register the EMLE class 
  364. EtkRegisterEFrameClass 
  365.           Register the EFrame class 
  366. EtkRegisterEMLEClientClass 
  367.           Register the EMLEClient class 
  368.  
  369.  
  370. ΓòÉΓòÉΓòÉ 5.2. Event Execution. ΓòÉΓòÉΓòÉ
  371.  
  372. EtkExecuteCommand 
  373.           Execute an command 
  374. EtkProcessEditKey 
  375.           Execute a "built-in" key action 
  376.  
  377.  
  378. ΓòÉΓòÉΓòÉ 5.3. Text Manipulation ΓòÉΓòÉΓòÉ
  379.  
  380. EtkDeleteText 
  381.           Delete a line of text. 
  382. EtkReplaceText 
  383.           Replace a line of text with a new line. 
  384. EtkInsertText 
  385.           Insert a new line of text. 
  386. EtkQueryText 
  387.           Retreive a line of text. 
  388. EtkQueryTextBuffer 
  389.           Retreive a range of lines. 
  390. EtkInsertTextBuffer 
  391.           Insert a stream of text. 
  392. EtkFindAttribute 
  393.           Search for an attribute associated with a line. 
  394. EtkInvalidateText 
  395.           Invalidate a region of text 
  396.  
  397.  
  398. ΓòÉΓòÉΓòÉ 5.4. Text Selection ΓòÉΓòÉΓòÉ
  399.  
  400. EtkSetSelection 
  401.           Select text 
  402. EtkQuerySelection 
  403.           Query selection region. 
  404. EtkQuerySelectionType 
  405.           Query Selection Type. 
  406.  
  407.  
  408. ΓòÉΓòÉΓòÉ 5.5. File Information ΓòÉΓòÉΓòÉ
  409.  
  410. EtkQueryFileID 
  411.           Query the active files id. 
  412. EtkSetFileField 
  413.           Set file related information 
  414. EtkQueryFileField 
  415.           Query file related information 
  416. EtkQueryFileFieldString 
  417.           Query file related information 
  418.  
  419.  
  420. ΓòÉΓòÉΓòÉ 5.6. Fonts ΓòÉΓòÉΓòÉ
  421.  
  422. EtkRegisterFont 
  423.           Register a new font 
  424. EtkRegisterFont2 
  425.           Register a new fixed pitch font. 
  426.  
  427.  
  428. ΓòÉΓòÉΓòÉ 6. Class Registration, Version Query functions ΓòÉΓòÉΓòÉ
  429.  
  430.  
  431. ΓòÉΓòÉΓòÉ 6.1. EtkVersion ΓòÉΓòÉΓòÉ
  432.  
  433.  
  434.   EtkVersion - 
  435.   (Dynalink Version) 
  436.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  437.  
  438.      Get the version of the Editor dynalink library(ETKExxx.DLL) 
  439.  
  440.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  441.           Γöé EtkVersion (version_str,  )
  442.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  443.  
  444.  Parameters 
  445.  
  446.      version_str ( PSZ ) - output 
  447.         Pointer to a buffer of memory.  This will be filled with the current 
  448.         dynalink version. The return string is in the following format: 
  449.  
  450.  Example 
  451.  
  452.               byte [1]           - length of string to follow.
  453.               byte [2 - length]  - Null terminated version string.
  454.  
  455.  Returns VOID 
  456.  
  457.  Remarks 
  458.  
  459.      A constant, 'EVERSION', is provided in the EDLL.H file.  This constant is 
  460.      to be compared to the results of the EtkVersion procedure.  An example 
  461.      follows: 
  462.  
  463.  Example 
  464.  
  465.               CHAR EDLLVersion[20];
  466.  
  467.               EtkVersion( EDLLVersion );              // Get Version from .DLL
  468.               vercmp=strcmp( EDLLVersion, EVERSION ); // compare version numbers
  469.               if (vercmp) {
  470.                  WinMessageBox ((HWND)HWND_DESKTOP,   // Display editor return code
  471.                                 (HWND)hwndAppFrame,
  472.                                 (PSZ)"Version Mismatch",
  473.                                 (PSZ)"Check ETKExxx.DLL version",
  474.                                 NULL,
  475.                                 MB_ICONEXCLAMATION
  476.                                );
  477.                  return(1);
  478.               }
  479.  
  480.  
  481. ΓòÉΓòÉΓòÉ 6.2. EtkRegisterEMLEClass ΓòÉΓòÉΓòÉ
  482.  
  483.  
  484.   EtkRegisterEMLEClass - 
  485.   (Register an E-Multi-line Edit Window) 
  486.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  487.  
  488.      Register the E-Multi-Line Edit Window Class for this process. 
  489.  
  490.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  491.           Γöé EtkRegisterEMLEClass (  hab , Window_Class_Name )
  492.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  493.  
  494.  Parameters 
  495.  
  496.      hab  ( HAB ) - input 
  497.         Application anchor block 
  498.  
  499.  Returns 
  500.  
  501.      Window_Class_Name (PSZ ) - 
  502.         Pointer to window-class-name string in which the editor window was 
  503.         registered under. 
  504.  
  505.  Remarks 
  506.  
  507.      This call only needs to be called once per application.  It returns the 
  508.      window class which you will use in creating an E-MLE with 
  509.      WinCreateWindow(). 
  510.  
  511.  
  512. ΓòÉΓòÉΓòÉ 6.3. EtkRegisterEFrameClass ΓòÉΓòÉΓòÉ
  513.  
  514.  
  515.   EtkRegisterEFrameClass - 
  516.   (Register an EFrame class) 
  517.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  518.  
  519.      Register the EFrame class. 
  520.  
  521.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  522.           Γöé EtkRegisterEFrameClass (  hab , Window_Class_Name )
  523.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  524.  
  525.  Parameters 
  526.  
  527.      hab  ( HAB ) - input 
  528.         Application anchor block 
  529.  
  530.  Returns 
  531.  
  532.      Window_Class_Name (PSZ ) - 
  533.         Pointer to window-class-name string in which the editor window was 
  534.         registered under. 
  535.  
  536.  Remarks 
  537.  
  538.      This call only needs to be called once per application.  It returns the 
  539.      window class which you will use in creating an EFrame with 
  540.      WinCreateWindow(). 
  541.  
  542.  
  543. ΓòÉΓòÉΓòÉ 6.4. EtkRegisterEMLEClientClass ΓòÉΓòÉΓòÉ
  544.  
  545.  
  546.   EtkRegisterEMLEClientClass - 
  547.   (Register an EMLEClient class) 
  548.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  549.  
  550.      Register the EMLEClient class. 
  551.  
  552.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  553.           Γöé EtkRegisterEMLEClientClass (  hab , Window_Class_Name )
  554.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  555.  
  556.  Parameters 
  557.  
  558.      hab  ( HAB ) - input 
  559.         Application anchor block 
  560.  
  561.  Returns 
  562.  
  563.      Window_Class_Name (PSZ ) - 
  564.         Pointer to window-class-name string in which the editor window was 
  565.         registered under. 
  566.  
  567.  Remarks 
  568.  
  569.      This call only needs to be called once per application.  It returns the 
  570.      window class used in creating an EMLEClient. An EMLEClient is the window 
  571.      class of the EMLE used in an EFrame control. This function is only needed 
  572.      if your application needs to statically subclass the EMLE of an EFrame 
  573.      control. An EMLEClient class has additional logic for communicating with 
  574.      the EFrame and its controls. 
  575.  
  576.  
  577. ΓòÉΓòÉΓòÉ 7. Event Execution. ΓòÉΓòÉΓòÉ
  578.  
  579.  
  580. ΓòÉΓòÉΓòÉ 7.1. EtkExecuteCommand ΓòÉΓòÉΓòÉ
  581.  
  582.  
  583.   EtkExecuteCommand - 
  584.   (Execute an E -Command) 
  585.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  586.  
  587.       This function will execute any predefined command. 
  588.  
  589.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  590.           Γöé EtkExecuteCommand (  hwndEdit, command , rc )
  591.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  592.  
  593.  Parameters 
  594.  
  595.      hwndEdit  ( HWND ) - input 
  596.         Window handle to the E-MLE in which the specified command will execute. 
  597.  
  598.      command  ( PSZ ) - input 
  599.         An asciiz command string that is defined as either an internal command, 
  600.         an E macro, or a REXX macro. 
  601.  
  602.  Returns 
  603.  
  604.      rc ( ULONG ) - 
  605.         TRUE if action failed. 
  606.  
  607.  Remarks 
  608.  
  609.      This is one of the more versatile commands available in the E Toolkit. 
  610.      Three classes of commands can be executed: 
  611.  
  612.      o Internal Commands. (examples - SAVE, L[ocate], and C[hange]). 
  613.      o Predefined E macros. (examples - ADD, DRAW, and GET) 
  614.      o REXX macros commands. (examples - RX SORT.ERX, RX ADDMENU.ERX, RX 
  615.        NEW.ERX) 
  616.      An example of how to use this function follows. 
  617.  
  618.  Example 
  619.  
  620.               {
  621.                 HWND hwndEdit=QueryEditHandle( );
  622.  
  623.                 // issue a "save" command to an E-MLE.   The data is saved in
  624.                 // a file called temp.tmp.
  625.                 EtkExecuteCommand( hwndEdit, "SAVE temp.tmp") ;
  626.               }
  627.  
  628.  
  629. ΓòÉΓòÉΓòÉ 7.2. EtkProcessEditKey ΓòÉΓòÉΓòÉ
  630.  
  631.  
  632.   EtkProcessEditKey - 
  633.   (Execute a editor action) 
  634.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  635.  
  636.      Execute a primitive editor action. 
  637.  
  638.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  639.           Γöé EtkProcessEditKey (  hwndEdit, key, repcount , rc )
  640.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  641.  
  642.  Parameters 
  643.  
  644.      hwndEdit  ( HWND ) - input 
  645.         Window handle of the E-MLE. 
  646.  
  647.      key ( USHORT ) - input 
  648.         Built in key primitives: 
  649.  
  650.         ETK_ADJUST_BLOCK 
  651.         ETK_BACKTAB Tab to the left. 
  652.         ETK_BACKTAB_WORD Tab to the left one word. 
  653.         ETK_BEGIN_LINE Move the cursor to the beginning of the line. 
  654.         ETK_BOTTOM Move the cursor to the last line in the file. 
  655.         ETK_COPY_MARK Copy the current selection to the cursor location. 
  656.         ETK_DELETE_CHAR Delete the character in which the cursor is located. 
  657.         ETK_DELETE_LINE Delete the line in which the cursor is located. 
  658.         ETK_DELETE_MARK Delete the current selection. 
  659.         ETK_DOWN  Scroll down one line. 
  660.         ETK_END_LINE Move the cursor to the end of the current line. 
  661.         ETK_ERASE_END_LINE Erase from the cursor to the end of the line. 
  662.         ETK_INSERT_LINE Insert a new line after the cursor. 
  663.         ETK_INSERT_TOGGLE Toggle between insert and replace cursor. 
  664.         ETK_JOIN  Join next line with the line in which the cursor is located. 
  665.         ETK_LEFT  Scroll one character to the left. 
  666.         ETK_MOVE_MARK Move the current selection to the cursor location. 
  667.         ETK_NEXT_FILE Go to the next file in the Ring. 
  668.         ETK_OVERLAY_BLOCK Overlay the current block selection to the cursor 
  669.                   location. 
  670.         ETK_PAGE_DOWN Scroll one page down. 
  671.         ETK_PAGE_UP Scroll one page up. 
  672.         ETK_PREVFILE_OP Go to the previous file in the Ring. 
  673.         ETK_REFLOW Reflow the text according to the margins settings. 
  674.         ETK_REPEAT_FIND Repeat the last find. 
  675.         ETK_RIGHT Scroll right one character. 
  676.         ETK_RUBOUT Move cursor to the left and delete character. 
  677.         ETK_SHIFT_LEFT Shift the selected text one character to the left. 
  678.         ETK_SHIFT_RIGHT Shift the selected text one character to the right. 
  679.         ETK_SPLIT Split the current line at the cursor. 
  680.         ETK_TAB   Move cursor to the next tab position. 
  681.         ETK_TAB_WORD Tab to the right one word. 
  682.         ETK_TOP   Move the cursor to the first line in the file. 
  683.         ETK_UNDO_LINE Return the current line to its original state. 
  684.         ETK_UNMARK Clear the current selection. 
  685.         ETK_UP    Scroll up one line. 
  686.  
  687.      repcount  ( USHORT ) - input 
  688.         Specifies how many times this primitive action should be performed. 
  689.         Only some primitives support this parameter. 
  690.  
  691.  Returns 
  692.  
  693.      rc ( SHORT ) - 
  694.         TRUE if action failed. 
  695.  
  696.  Remarks 
  697.  
  698.      EtkProcessEditKey() is used to execute a primitive edit action on an EMLE. 
  699.  
  700.  Example 
  701.  
  702.                {
  703.                   HWND HwndEMLE;
  704.                   EtkProcessEditKey(HwndEMLE, ETK_INSERT_LINE, 1);
  705.                }
  706.  
  707.  
  708. ΓòÉΓòÉΓòÉ 8. Text Manipulation ΓòÉΓòÉΓòÉ
  709.  
  710.  
  711. ΓòÉΓòÉΓòÉ 8.1. EtkQueryText ΓòÉΓòÉΓòÉ
  712.  
  713.  
  714.   EtkQueryText - 
  715.   (Retrieve a line) 
  716.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  717.  
  718.      Retrieve a line of text and its associated attributes. 
  719.  
  720.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  721.           Γöé EtkQueryText ( hwndEdit, fileid, linenum, Text, AttrArray, LastAttr , rc )
  722.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  723.  
  724.  Parameters 
  725.  
  726.      hwndEdit  ( HWND ) - input 
  727.         window handle of the E-MLE. 
  728.  
  729.      fileid  ( FIDTYPE ) - input 
  730.         the fileid of the file containing the specified line.  If 0 is 
  731.         specified, the line will be retrieved from the visible file. 
  732.  
  733.      linenum  ( LINE_INDEX ) - input 
  734.         line number of interest. 
  735.  
  736.      Text  ( PSZ * ) - output 
  737.         returns an indirect pointer to the text found on the specified line. 
  738.  
  739.      AttrArray ( PPATTRIBRECTYPE) - output 
  740.         returns a pointer to the array of attribute structures for the 
  741.         specified line. 
  742.  
  743.      LastAttr ( PPATRIBRECTYPE) - output 
  744.         returns a pointer to the attribute structure which is one beyond the 
  745.         last attribute structure in the attribute array returned. Subtracting 
  746.         LastAttr from AttrArray gives the number of attribute records for the 
  747.         line. 
  748.  
  749.  Returns 
  750.  
  751.      rc ( ULONG ) - 
  752.         TRUE if action failed. 
  753.  
  754.  Remarks 
  755.  
  756.      See the section "Attribute Pairs" in "The EPM Technical Reference" for a 
  757.      description of Attribute support. 
  758.  
  759.  Example 
  760.  
  761.              {
  762.                 PATTRIBRECTYPE AttrArray;      //Pointer to first element in Attr. Array
  763.                 PATTRIBRECTYPE LastAttr;       //Pointer to array element one beyond last
  764.                 ULONG          NumberOfAttrs;  //Number of Attrs. on line
  765.                 HWND           HwndEMLE;       //Window handle of the EMLE
  766.                 PSZ            Text;           //Text on the line specfied.
  767.  
  768.                 EtkQueryText(HwndEMLE, 0, 1, &Text, &AttrArray, &LastAttr);
  769.  
  770.                 NumberOfAttrs = LastAttr - AttrArray;
  771.              }
  772.  
  773.  
  774. ΓòÉΓòÉΓòÉ 8.2. EtkDeleteText ΓòÉΓòÉΓòÉ
  775.  
  776.  
  777.   EtkDeleteText - 
  778.  (Delete text) 
  779.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  780.  
  781.      Delete an area of text. 
  782.  
  783.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  784.           Γöé  ( hwndEdit, fileid, startline, number_oflines  , rc )
  785.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  786.  
  787.  Parameters 
  788.  
  789.      hwndEdit  ( HWND ) - input 
  790.         window handle of the E-MLE. 
  791.  
  792.      fileid  ( FIDTYPE) - input 
  793.         the fileid of the file containing the specified line.  If fileid of 0 
  794.         is specified, the line will be retrieved from the visible file. 
  795.  
  796.      startline ( ULONG ) - input 
  797.         starting line number. 
  798.  
  799.      num_of_lines ( ULONG ) - input 
  800.         number of lines to delete.  If (-1L) is specified then lines are 
  801.         deleted from the start line through the last line in the file. 
  802.  
  803.  Returns 
  804.  
  805.      rc ( ULONG ) - 
  806.         TRUE if action failed. 
  807.  
  808.  Remarks 
  809.  
  810.  Example 
  811.  
  812.              {
  813.                 //The following call will delete the first 40 lines of the current file
  814.                 EtkDeleteText(HwndEMLE, 0, 1, 40);
  815.              }
  816.  
  817.  
  818. ΓòÉΓòÉΓòÉ 8.3. EtkReplaceText ΓòÉΓòÉΓòÉ
  819.  
  820.  
  821.   EtkReplaceText - 
  822.   (Replace a line) 
  823.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  824.  
  825.      Replace a line with a new single attributed string 
  826.  
  827.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  828.           Γöé EtkReplaceText ( hwndEdit, fileid, linenum, AttrString, rc )
  829.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  830.  
  831.  Parameters 
  832.  
  833.      hwndEdit (HWND ) - input 
  834.         window handle of  the E-MLE. 
  835.  
  836.      fileid  ( FIDTYPE ) - input 
  837.         the fileid of the file containing the specified line.  If 0 is 
  838.         specified, the line will be retrieved from the visible file. 
  839.  
  840.      linenum  ( LINE_INDEX ) - input 
  841.         line number 
  842.  
  843.      AttrString  ( PPATTRSTRING ) - input 
  844.         an indirect pointer to an ATTRSTRING type. 
  845.  
  846.  Returns 
  847.  
  848.      rc ( ULONG ) - 
  849.         TRUE if action failed. 
  850.  
  851.  Remarks 
  852.  
  853.      See the section "Attribute Pairs" in "The EPM Technical Reference" for a 
  854.      description of Attribute support. 
  855.  
  856.      The ATTRSTRING type only allocates one byte for the Text Field. Your 
  857.      application should allocate memory equal to the size ATTRSTRING plus the 
  858.      length of the text you are replacing and assign it to a PATTRSTRING 
  859.      variable. See the sample below. 
  860.  
  861.  Example 
  862.  
  863.              {
  864.                 HWND            HwndEMLE;         //Window handle of the EMLE
  865.                 UCHAR           String[]="hello"; //String to be inserted.
  866.                 ATTRIBRECTYPE   Attr[3];          //Attributes for the string
  867.                 PATTRSTRING     AttrString;       //Attributed string variable
  868.  
  869.                 AttrString = (PATTRSTRING) malloc(sizeof(ATTRSTRING)+sizeof(String)+1);
  870.  
  871.                 Attr[0].Col    = 1;
  872.                 Attr[0].Class  = COLORCLASS;
  873.                 Attr[0].IsPush = 1;
  874.                 Attr[1].Col    = 10;
  875.                 Attr[1].Class  = COLORCLASS;
  876.                 Attr[1].IsPush = 0;
  877.  
  878.                 AttrString->ALAttr  = &Attr[2];
  879.                 AttrString->Attrs   = &Attr[0];
  880.                 AttrString->SelfPtr = AttrString;
  881.                 AttrString->TextLen = sizeof(String)+1;
  882.  
  883.                 strcpy(AttrString->Text, String);
  884.  
  885.                 EtkReplaceText(HwndEMLE, 0, 10, &AttrString);
  886.              }
  887.  
  888.  
  889. ΓòÉΓòÉΓòÉ 8.4. EtkInsertText ΓòÉΓòÉΓòÉ
  890.  
  891.  
  892.   EtkInsertText - 
  893.  (Add a line) 
  894.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  895.  
  896.      Insert a single attributed string 
  897.  
  898.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  899.           Γöé EtkInsertText ( hwndEdit, fileid, linenum, text, terminatortype , rc )
  900.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  901.  
  902.  Parameters 
  903.  
  904.      hwndEdit  ( HWND ) - input 
  905.         window handle of the E-MLE. 
  906.  
  907.      fileid  ( FIDTYPE ) - input 
  908.         the fileid of the file containing the specified line.  If 0 is 
  909.         specified, the line will be retrieved from the visible file. 
  910.  
  911.      linenum  ( LINE_INDEX ) - input 
  912.         line number 
  913.  
  914.      text  ( PPATTRSTRING ) - input 
  915.         an indirect pointer to an ATTRSTRING type. 
  916.  
  917.      terminatortype  ( TERMTYPE ) - input 
  918.         How the inserted line is to be terminated.  This parameter could 
  919.         specify that the inserted line be treated as if it is terminated by an 
  920.         invisible character or sequence of characters.  For example, CR, CRLF, 
  921.         EOF, NULL, UNTERMINATED.  The significance of these specifications is 
  922.         determined in the way that it might change the behavior of various 
  923.         other editor functions. For example, the value might control what is 
  924.         appended to the line when saved disk or perhaps control how paragraph 
  925.         reflow occurs. The only terminator currently supported is 
  926.         CRLF_TERMINATED. 
  927.  
  928.         At this point the significance of these values to the internal toolkit 
  929.         functions has not been defined.  The definition will probably evolve 
  930.         for a while. 
  931.  
  932.  Returns 
  933.  
  934.      rc ( ULONG ) - 
  935.         TRUE if action failed. 
  936.  
  937.  Remarks 
  938.  
  939.      See the section "Attribute Pairs" in "The EPM Technical Reference" for a 
  940.      description of Attribute support. 
  941.  
  942.      The ATTRSTRING type only allocates one byte for the Text Field. Your 
  943.      application should allocate memory equal to the size ATTRSTRING plus the 
  944.      length of the text you are replacing and assign it to a PATTRSTRING 
  945.      variable. See the sample below. 
  946.  
  947.  Example 
  948.  
  949.              {
  950.                 HWND            HwndEMLE;         //Window handle of the EMLE
  951.                 UCHAR           String[]="hello"; //String to be inserted.
  952.                 ATTRIBRECTYPE   Attr[3];          //Attributes for the string
  953.                 PATTRSTRING     AttrString;       //Attributed string variable
  954.  
  955.                 AttrString = (PATTRSTRING) malloc(sizeof(ATTRSTRING)+sizeof(String)+1);
  956.  
  957.                 Attr[0].Col    = 1;
  958.                 Attr[0].Class  = COLORCLASS;
  959.                 Attr[0].IsPush = 1;
  960.                 Attr[1].Col    = 10;
  961.                 Attr[1].Class  = COLORCLASS;
  962.                 Attr[1].IsPush = 0;
  963.  
  964.                 AttrString->ALAttr  = &Attr[2];
  965.                 AttrString->Attrs   = &Attr[0];
  966.                 AttrString->SelfPtr = AttrString;
  967.                 AttrString->TextLen = sizeof(String)+1;
  968.  
  969.                 strcpy(AttrString->Text, String);
  970.  
  971.                 EtkInsertText(HwndEMLE, 0, 10, &AttrString, CRLF_TERMINATED);
  972.              }
  973.  
  974.  
  975. ΓòÉΓòÉΓòÉ 8.5. EtkQueryTextBuffer ΓòÉΓòÉΓòÉ
  976.  
  977.  
  978.   EtkQueryTextBuffer - 
  979.   (Query Text Buffer) 
  980.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  981.  
  982.       Retrieve a stream of text within a specified line range. 
  983.  
  984.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  985.           Γöé EtkQueryTextBuffer ( hwndEdit, startline, lastline, TotalLen, buffer , characters )
  986.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  987.  
  988.  Parameters 
  989.  
  990.      hwndEdit  ( HWND ) - input 
  991.         window handle of the E-MLE. 
  992.  
  993.      startline  ( ULONG ) - input 
  994.         First line in text range. 
  995.  
  996.      lastline  ( ULONG ) - input 
  997.         Last Line in text range. 
  998.  
  999.      TotalLen ( ULONG ) - input 
  1000.         size of buffer. 
  1001.  
  1002.      buffer ( PSZ ) - output 
  1003.         buffer where text stream will be returned. 
  1004.  
  1005.  Returns 
  1006.  
  1007.      characters (ULONG) - 
  1008.         The number of characters in the buffer is returned. If 0 is returned, 
  1009.         it is likely that a problem occured. (Most likely an invalid line 
  1010.         number) 
  1011.  
  1012.  Remarks 
  1013.  
  1014.      If startline and lastline are zero (0), the entire file will be returned. 
  1015.  
  1016.      The Buffer contains a stream of characters where each line ends in CR-LF. 
  1017.  
  1018.  Example 
  1019.  
  1020.              {
  1021.                 UCHAR Buffer[10000];
  1022.  
  1023.                 EtkQueryTextBuffer(HwndEMLE, 10, 20, sizeof(Buffer), Buffer);
  1024.              }
  1025.  
  1026.  
  1027. ΓòÉΓòÉΓòÉ 8.6. EtkInsertTextBuffer ΓòÉΓòÉΓòÉ
  1028.  
  1029.  
  1030.   EtkInsertTextBuffer - 
  1031.  (Insert Text Buffer) 
  1032.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1033.  
  1034.      Enter a stream of text starting at a specified point. 
  1035.  
  1036.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1037.           Γöé EtkInsertTextBuffer ( hwndEdit, startline, TotalLen, Text, format , lines )
  1038.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1039.  
  1040.  Parameters 
  1041.  
  1042.      hwndEdit ( HWND ) - input 
  1043.         window handle of the E-MLE. 
  1044.  
  1045.      startline ( ULONG ) - input 
  1046.         insert starting at this line. 
  1047.  
  1048.      TotalLen ( ULONG ) - input 
  1049.         size of buffer. 
  1050.  
  1051.      Text ( PSZ ) - input 
  1052.         text stream to insert. 
  1053.  
  1054.      format ( USHORT ) - input 
  1055.         the way the provided text should processed.  Any combination of _LDFLAG 
  1056.         parameters can be used.  The _TERMINATOR_LDFLAG values specify where 
  1057.         what characters and character sequences are recognized as line 
  1058.         terminators. TABEXP_LDFLAG specifies that each tab character in the 
  1059.         input stream should be converted to one or more space characters so as 
  1060.         to cause the following character to be aligned on the next 1,9,17,... 
  1061.         standard tab stop. If this parameter is not set to zero then 
  1062.         NOHEADER_LDFLAG should be used in combination with any other flags 
  1063.         used. 
  1064.  
  1065.  Returns 
  1066.  
  1067.      lines ( ULONG ) - 
  1068.         The number of lines inserted in to the E-MLE. If 0 is returned, it is 
  1069.         likely that a problem occured. (Most likely an invalid line number) 
  1070.  
  1071.  Remarks 
  1072.  
  1073.      If startline is zero (0), the Text is inserted at the current cursor 
  1074.      position. 
  1075.  
  1076.      The Text buffer should contain a stream of characters where each line ends 
  1077.      in CR-LF. 
  1078.  
  1079.  Example 
  1080.  
  1081.              {
  1082.                UCHAR string[512],
  1083.                strcpy(string, "1: This is a test\r\n2: This is line 2\r\n");
  1084.                EtkInsertTextBuffer( hwndEdit, 1, strlen(string), string, 0);
  1085.              }
  1086.  
  1087.  
  1088. ΓòÉΓòÉΓòÉ 8.7. EtkFindAttribute. ΓòÉΓòÉΓòÉ
  1089.  
  1090.  
  1091.   EtkFindAttribute. - 
  1092.   (Retrieve a line attribute) 
  1093.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1094.  
  1095.      Search for an attribute associated with a line. 
  1096.  
  1097.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1098.           Γöé EtkFindAttribute ( hwndEdit, fileid, linenum, Column, ColumnAttrIndex, Attribute, pFound , rc )
  1099.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1100.  
  1101.  Parameters 
  1102.  
  1103.      hwndEdit  ( HWND ) - input 
  1104.         window handle of the E-MLE. 
  1105.  
  1106.      fileid  ( FIDTYPE ) - input 
  1107.         the fileid of the file containing the specified line.  If 0 is 
  1108.         specified, the line will be retrieved from the visible file. 
  1109.  
  1110.      linenum  ( LINE_INDEX ) - input 
  1111.         starting line number 
  1112.  
  1113.      Column ( USHORT ) - input 
  1114.         starting column 
  1115.  
  1116.      ColumnAttrIndex ( USHORT ) - input 
  1117.         the index of the attribute record for the specified column. 
  1118.  
  1119.      Attrs  ( PPATTRIBRECTYPE ) - input 
  1120.         A pointer to an attribute record that was found. 
  1121.  
  1122.      pFound ( BOOL *) - output 
  1123.         found flag. 
  1124.  
  1125.  Returns 
  1126.  
  1127.      rc ( ULONG ) - 
  1128.         TRUE if action failed. 
  1129.  
  1130.  Remarks 
  1131.  
  1132.      See the section "Attribute Pairs" in "The EPM Technical Reference" for a 
  1133.      description of Attribute support. 
  1134.  
  1135.  Example 
  1136.  
  1137.              {
  1138.                 // The following code searches for the attribute in the current file,
  1139.                 // for the character on line one , column 10, at the attribute index -1.
  1140.                 PATTRIBRECTYPE Attr;
  1141.                 BOOL           Found;
  1142.  
  1143.                 EtkFindAttribute(HwndEMLE, 0, 1, 10, -1, &Attr, &Found);
  1144.              }
  1145.  
  1146.  
  1147. ΓòÉΓòÉΓòÉ 8.8. EtkInvalidateText ΓòÉΓòÉΓòÉ
  1148.  
  1149.  
  1150.  EtkInvalidateText - 
  1151.   (Invalidate Text) 
  1152.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1153.  
  1154.      Invalidate text which forces a refresh. 
  1155.  
  1156.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1157.           Γöé EtkInvalidateText ( hwndEdit, firstline, lastline, rc )
  1158.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1159.  
  1160.  Parameters 
  1161.  
  1162.      hwndEdit  (HWND) - input 
  1163.         window handle of the E-MLE. 
  1164.  
  1165.      firstline  (LINE_INDEX) - input 
  1166.         first line to be invalidated. 
  1167.  
  1168.      lastline  (LINE_INDEX) - input 
  1169.         last line to be invalidated. 
  1170.  
  1171.  Returns 
  1172.  
  1173.      rc (USHORT) - 
  1174.  
  1175.  Remarks 
  1176.  
  1177.  Example 
  1178.  
  1179.             {
  1180.                HWND  HwndEMLE;
  1181.                FontID = EtkInvaliateText(HwndEMLE, 1, 10);
  1182.             }
  1183.  
  1184.  
  1185. ΓòÉΓòÉΓòÉ 9. Text Selection. ΓòÉΓòÉΓòÉ
  1186.  
  1187.  
  1188. ΓòÉΓòÉΓòÉ 9.1. EtkQuerySelectionType ΓòÉΓòÉΓòÉ
  1189.  
  1190.  
  1191.   EtkQuerySelectionType - 
  1192.   (Query Current Selection Type) 
  1193.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1194.  
  1195.      Query the current selection type. 
  1196.  
  1197.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1198.           Γöé EtkQuerySelectionType ( hwndEdit, marktype, rc )
  1199.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1200.  
  1201.  Parameters 
  1202.  
  1203.      hwndEdit  ( HWND ) - input 
  1204.         window handle of the E-MLE. 
  1205.  
  1206.      marktype ( PUSHORT) - output 
  1207.         the E Toolkit will fill this value with a constant that represents the 
  1208.         type of mark contained in the visible file. 
  1209.  
  1210.          1. EMT_LINEMARK  - line mark 
  1211.  
  1212.          2. EMT_CHARMARK  - character mark 
  1213.  
  1214.          3. EMT_BLOCKMARK  - block mark 
  1215.  
  1216.          4. EMT_CHARMARKG  - 
  1217.  
  1218.          5. EMT_BLOCKMARKG - 
  1219.  
  1220.          6. EMT_NOMARK   - no mark 
  1221.  
  1222.  Returns 
  1223.  
  1224.      rc ( USHORT) - 
  1225.         TRUE if action failed. 
  1226.  
  1227.  Remarks 
  1228.  
  1229.  Example 
  1230.  
  1231.  
  1232.               {
  1233.                 HWND    hwndEdit=QueryEditHandle( );
  1234.                 USHORT  marktype;
  1235.                 UCHAR   outmsg[MAXSTR];
  1236.  
  1237.                 strcpy( outmsg, "Your file contains ");
  1238.                 EtkQuerySelectionType( hwndEdit, &marktype);
  1239.                 switch (marktype) {
  1240.                    case  EMT_LINEMARK:   strcat( outmsg, "a Line Mark");             break;
  1241.                    case  EMT_CHARMARK:   strcat( outmsg, "a Character Mark");        break;
  1242.                    case  EMT_CHARMARKG:  strcat( outmsg, "a Special Character Mark");break;
  1243.                    case  EMT_BLOCKMARK:  strcat( outmsg, "a Block Mark");            break;
  1244.                    case  EMT_BLOCKMARKG: strcat( outmsg, "a Special Block Mark");    break;
  1245.                    default:
  1246.                          strcat( outmsg, "no mark.");
  1247.                          break;
  1248.                 }
  1249.  
  1250.               }
  1251.  
  1252.  
  1253. ΓòÉΓòÉΓòÉ 9.2. EtkQuerySelection ΓòÉΓòÉΓòÉ
  1254.  
  1255.  
  1256.   EtkQuerySelection - 
  1257.   (Selection Location) 
  1258.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1259.  
  1260.      Returns the coordinates of the selected text area. 
  1261.  
  1262.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1263.           Γöé EtkQuerySelection ( hwndEdit, firstline, lastline, firstcol, lastcol, markfileid, respectattributes, relative2file , rc )
  1264.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1265.  
  1266.  Parameters 
  1267.  
  1268.      hwndEdit ( HWND ) - input 
  1269.         window handle of the E-MLE. 
  1270.  
  1271.      firstline, lastline ( LINE_INDEX ) - output 
  1272.         returns the first and last lines in the selected area. 
  1273.  
  1274.      firstcol, lastcol ( PUSHORT ) - output 
  1275.         returns the first and last columns in the selected area. 
  1276.  
  1277.      markfileid  ( PFIDTYPE ) - output 
  1278.         returns the fileid of the file containing the selected text. 
  1279.  
  1280.      respectattributes  ( PUSHORT ) - output 
  1281.         If TRUE, Font and color attribute information will be taken into 
  1282.         consideration. 
  1283.  
  1284.      relative2file  ( PUSHORT ) - output 
  1285.         Should always be set to TRUE. 
  1286.  
  1287.  Returns 
  1288.  
  1289.      rc (USHORT) - 
  1290.         TRUE if action failed. 
  1291.  
  1292.  Remarks 
  1293.  
  1294.  Example 
  1295.  
  1296.  
  1297.               {
  1298.                 LINE_INDEX firstline, lastline;
  1299.                 USHORT firstcol, lastcol;
  1300.                 LONG   markfileid;
  1301.                 SHORT  marktype;
  1302.                 USHORT respectattributes=FALSE, relative2file=TRUE;
  1303.  
  1304.                 EtkQuerySelectionType( hwndEdit, &marktype);
  1305.  
  1306.                 if (marktype!=NOMARK) {
  1307.                    EtkQuerySelection(QueryActiveEdit(),
  1308.                                     &firstline, &lastline,
  1309.                                     &firstcol,  &lastcol,
  1310.                                     &markfileid,
  1311.                                     respectattributes, relative2file);
  1312.                 }
  1313.               }
  1314.  
  1315.  
  1316. ΓòÉΓòÉΓòÉ 9.3. EtkSetSelection ΓòÉΓòÉΓòÉ
  1317.  
  1318.  
  1319.  EtkSetSelection - 
  1320.  (Select Text) 
  1321.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1322.  
  1323.      Specifiy the type of selection along with the area of text to be selected. 
  1324.  
  1325.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1326.           Γöé EtkSetSelection (  hwndEdit, firstline, lastline, firstcol, lastcol, firstoff, lastoff, marktype, fileid , rc )
  1327.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1328.  
  1329.  Parameters 
  1330.  
  1331.      hwndEdit  ( HWND ) - input 
  1332.         window handle of the E-MLE. 
  1333.  
  1334.      firstline, lastline  ( LINE_INDEX ) - input 
  1335.         The first and last lines in the selected area. 
  1336.  
  1337.      firstcol, lastcol  ( USHORT ) - input 
  1338.         The first and last columns in the selected area. 
  1339.  
  1340.      firstoff, lastoff  ( USHORT ) - input 
  1341.         The attribute offset associated with the first and last column.  (If 
  1342.         color or font attributes are not being used, set to 0) 
  1343.  
  1344.      marktype  ( USHORT ) - input 
  1345.  
  1346.          1. EMT_LINEMARK  - line mark 
  1347.  
  1348.          2. EMT_CHARMARK  - character mark 
  1349.  
  1350.          3. EMT_BLOCKMARK  - block mark 
  1351.  
  1352.          4. EMT_CHARMARKG  - 
  1353.  
  1354.          5. EMT_BLOCKMARKG - 
  1355.  
  1356.          6. EMT_NOMARK   - no mark 
  1357.  
  1358.      fileid  ( FIDTYPE ) - input 
  1359.         the fileid of the file containing the selected text.  If 0 is 
  1360.         specified, the text will be selected in the visible file. 
  1361.  
  1362.  Returns 
  1363.  
  1364.      rc (USHORT) - 
  1365.         TRUE if action failed. 
  1366.  
  1367.  Remarks 
  1368.  
  1369.  Example 
  1370.  
  1371.               {
  1372.                 LINE_INDEX firstline, lastline;
  1373.                 USHORT firstcol, lastcol;
  1374.                 FIDTYPE markfileid;
  1375.                 SHORT  marktype;
  1376.                 USHORT respectattributes=FALSE, relative2file=TRUE;
  1377.  
  1378.                 EtkQuerySelectionType( hwndEdit, &marktype);
  1379.  
  1380.                 if (marktype!=NOMARK) {
  1381.                    HWND hwndEdit=QueryActiveEdit();
  1382.                    EtkQuerySelection(hwndEdit,
  1383.                                     &firstline, &lastline,
  1384.                                     &firstcol,  &lastcol,
  1385.                                     &markfileid,
  1386.                                     respectattributes, relative2file);
  1387.                    // extend the mark one line.
  1388.                    EtkSetSelection(hwndEdit,
  1389.                                     firstline, lastline+1,
  1390.                                     firstcol,  lastcol,  0, 0,
  1391.                                     marktype,
  1392.                                     markfileid);
  1393.                 }
  1394.               }
  1395.  
  1396.  
  1397. ΓòÉΓòÉΓòÉ 10. File Information ΓòÉΓòÉΓòÉ
  1398.  
  1399.  
  1400. ΓòÉΓòÉΓòÉ 10.1. EtkQueryFileID ΓòÉΓòÉΓòÉ
  1401.  
  1402.  
  1403.  EtkQueryFileID - 
  1404.   (Query a files identifier) 
  1405.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1406.  
  1407.      Retrieve the visible files file identifier. 
  1408.  
  1409.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1410.           Γöé EtkQueryFileID (  hwndEdit, fileid , rc )
  1411.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1412.  
  1413.  Parameters 
  1414.  
  1415.      hwndEdit ( HWND ) - input 
  1416.         window handle of the E-MLE. 
  1417.  
  1418.      fileid  ( PFIDTYPE ) - output 
  1419.         returns the fileid of the visible file. 
  1420.  
  1421.  Returns 
  1422.  
  1423.      rc (USHORT) - 
  1424.         TRUE if action failed. 
  1425.  
  1426.  Remarks 
  1427.  
  1428.      The file identifier is an constant that is used by certian functions to 
  1429.      identify a particular file in an E-MLE window Ring. 
  1430.  
  1431.  Example 
  1432.  
  1433.             {
  1434.                FIDTYPE FileID;
  1435.  
  1436.                EtkQueryFileID(HwndEMLE, &FileID);
  1437.             }
  1438.  
  1439.  
  1440. ΓòÉΓòÉΓòÉ 10.2. EtkSetFileField ΓòÉΓòÉΓòÉ
  1441.  
  1442.  
  1443.  EtkSetFileField - 
  1444.   Set some file characteristic 
  1445.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1446.  
  1447.      Set information pertaining to some aspect of a file. (i.e. Margin, Name, 
  1448.      etc) 
  1449.  
  1450.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1451.           Γöé EtkSetFileField (hwndEdit, field, fileid, indata , rc )
  1452.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1453.  
  1454.  Parameters 
  1455.  
  1456.      hwndEdit ( HWND ) - input 
  1457.         window handle of the E-MLE. 
  1458.  
  1459.      field.  ( ULONG) - input 
  1460.         See Appendix A-1 for field constants and values expected by each field. 
  1461.  
  1462.      fileid  (FIDTYPE) - input 
  1463.         the fileid 
  1464.  
  1465.      indata  (PVOID) - input 
  1466.         the input data varies depending on the field being set. See Appendix 
  1467.         A-1 for field constants and values expected by each field. 
  1468.  
  1469.  Returns 
  1470.  
  1471.      rc (USHORT) - 
  1472.         TRUE if action failed. 
  1473.  
  1474.  Remarks 
  1475.  
  1476.  Example 
  1477.  
  1478.              {
  1479.                 UCHAR s[MAXSTR];
  1480.                 ULONG Browse;
  1481.  
  1482.                 Browse = 0L;   // turn OFF browse mode - the file can now be modified.
  1483.                 EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse);
  1484.  
  1485.                 // Insert a stream of text...
  1486.                 strcpy( s,"Hello World\r\nAnother Line\r\nAnd another...");
  1487.                 EtkInsertTextBuffer( hwndMLE, 1, strlen(s), s);
  1488.  
  1489.                 Browse = 1L;   // turn ON browse mode - the file is now read only!
  1490.                 EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse);
  1491.              }
  1492.  
  1493.  
  1494. ΓòÉΓòÉΓòÉ 10.3. EtkQueryFileField ΓòÉΓòÉΓòÉ
  1495.  
  1496.  
  1497.  EtkQueryFileField - 
  1498.   (Query some file characteristic) 
  1499.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1500.  
  1501.      Query information pertaining to some aspect of a file. (i.e. Margin, Name, 
  1502.      etc) 
  1503.  
  1504.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1505.           Γöé EtkQueryFileField ( hwndEdit, field, fileid, returndata , rc )
  1506.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1507.  
  1508.  Parameters 
  1509.  
  1510.      hwndEdit  (HWND) - input 
  1511.         window handle of the E-MLE. 
  1512.  
  1513.      field.  (ULONG) - input 
  1514.         See Appendix A-1 for field constants and values expected by each field. 
  1515.  
  1516.      fileid  (FILEID) - input 
  1517.         the fileid 
  1518.  
  1519.      returndata  (PVOID) - output 
  1520.         data returned. This data varies depending on the field being queried. 
  1521.         See Appendix A-1 for field constants and values expected by each field. 
  1522.  
  1523.  Returns 
  1524.  
  1525.      rc (USHORT) - 
  1526.         TRUE if action failed. 
  1527.  
  1528.  Remarks 
  1529.  
  1530.  Example 
  1531.  
  1532.             {
  1533.                ULONG numlines;
  1534.  
  1535.                // query the number of lines in a given file.
  1536.                EtkQueryFileField(hwndMLE,(ULONG)LAST_FIELD,(ULONG)0,(PVOID)&numlines);
  1537.             }
  1538.  
  1539.  
  1540. ΓòÉΓòÉΓòÉ 11. Fonts ΓòÉΓòÉΓòÉ
  1541.  
  1542.  
  1543. ΓòÉΓòÉΓòÉ 11.1. EtkRegisterFont ΓòÉΓòÉΓòÉ
  1544.  
  1545.  
  1546.  EtkRegisterFont - 
  1547.   (Register a Font) 
  1548.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1549.  
  1550.      Register a font for use in font attribute support 
  1551.  
  1552.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1553.           Γöé EtkRegisterFont ( hwndEdit, fontname, size, fontattr , rc )
  1554.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1555.  
  1556.  Parameters 
  1557.  
  1558.      hwndEdit  (HWND) - input 
  1559.         window handle of the E-MLE. 
  1560.  
  1561.      fontname  (PLSTRING) - input 
  1562.         name of the font to be registered. 
  1563.  
  1564.      size  (SHORT) - input 
  1565.         point size of the font 
  1566.  
  1567.      fontattr  (SHORT) - output 
  1568.         font attribute bit field. Values that can be used include: 
  1569.  
  1570.         o FATTR_SEL_ITALIC 
  1571.  
  1572.         o FATTR_SEL_UNDERSCORE 
  1573.  
  1574.         o FATTR_SEL_OUTLINE 
  1575.  
  1576.         o FATTR_SEL_STRIKEOUT 
  1577.  
  1578.         o FATTR_SEL_BOLD 
  1579.         These values are defined in the OS/2 Programmers Tool-Kit. 
  1580.  
  1581.  Returns 
  1582.  
  1583.      fontid (USHORT) - 
  1584.         returns a font ID. If 0 then the font was not found. 
  1585.  
  1586.  Remarks 
  1587.  
  1588.  Example 
  1589.  
  1590.             {
  1591.                HWND  HwndEMLE;
  1592.                SHORT FontID;
  1593.                FontID = EtkRegisterFont(HwndEMLE, "Helvetica", 12, FATTR_SEL_BOLD);
  1594.             }
  1595.  
  1596.  
  1597. ΓòÉΓòÉΓòÉ 11.2. EtkRegisterFont2 ΓòÉΓòÉΓòÉ
  1598.  
  1599.  
  1600.  EtkRegisterFont2 - 
  1601.   (Register a Font) 
  1602.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  1603.  
  1604.      Register a bitmap font for use in font attribute support 
  1605.  
  1606.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1607.           Γöé EtkRegisterFont ( hwndEdit, fontname, size, fontheight, fontwidth fontattr , rc )
  1608.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1609.  
  1610.  Parameters 
  1611.  
  1612.      hwndEdit  (HWND) - input 
  1613.         window handle of the E-MLE. 
  1614.  
  1615.      fontname  (PLSTRING) - input 
  1616.         name of the font to be registered. 
  1617.  
  1618.      size  (SHORT) - input 
  1619.         point size of the font 
  1620.  
  1621.      fontheight  (SHORT) - input 
  1622.         height of the bitmap font 
  1623.  
  1624.      fontwidth  (SHORT) - input 
  1625.         width of the bitmap font 
  1626.  
  1627.      fontattr  (SHORT) - output 
  1628.         font attribute bit field. Values that can be used include: 
  1629.  
  1630.         o FATTR_SEL_ITALIC 
  1631.  
  1632.         o FATTR_SEL_UNDERSCORE 
  1633.  
  1634.         o FATTR_SEL_OUTLINE 
  1635.  
  1636.         o FATTR_SEL_STRIKEOUT 
  1637.  
  1638.         o FATTR_SEL_BOLD 
  1639.         These values are defined in the OS/2 Programmers Tool-Kit. 
  1640.  
  1641.  Returns 
  1642.  
  1643.      fontid (USHORT) - 
  1644.         returns a font ID. If 0 then the font was not found. 
  1645.  
  1646.  Remarks 
  1647.  
  1648.  Example 
  1649.  
  1650.             {
  1651.                HWND  HwndEMLE;
  1652.                SHORT FontID;
  1653.                FontID = EtkRegisterFont2(HwndEMLE, "System Monospaced", 0, 12, 9, FATTR_SEL_BOLD);
  1654.             }
  1655.  
  1656.  
  1657. ΓòÉΓòÉΓòÉ 12. ERES Dialog Box Procedures ΓòÉΓòÉΓòÉ
  1658.  
  1659.  The following dialog box procedures are exported by ETKRxxx.DLL. These dialogs 
  1660. are used in conjunction which the base E macros. Each dialog issues Edit 
  1661. Commands which are contained in the base E macros. 
  1662.  
  1663.      o ERESOpenDlgProc Open dialog procedure. Contains a list of previously 
  1664.        entered file names, and an entry field. It also includes a button which 
  1665.        opens the system's standard Open Dialog. 
  1666.      o ERESCommandDlgProc Edit window command dialog box. Includes support for 
  1667.        listing previously entered commands. 
  1668.      o ERESFindChangeDlgProc Allows find/change commands to be enter from 
  1669.        dialog box. 
  1670.      o ERESSettingsDlgProc Configures EMLE. Contains a notebook with pages for 
  1671.        configuring margins, paths, autosave, fonts, keys, tabs, and colors. 
  1672.      o ERESQuitBoxDlgProc  Quit box dialog. 
  1673.      o ERESUndoDlgProc Undo dialog. Allows users to go to previous undo states. 
  1674.      o ERESRingDlgProc Ring Dialog. Lists the current files in the ring, and 
  1675.        allows users to switch to one. 
  1676.      o ERESPringDlgProc Pring Dialog. Lists available print queues and has a 
  1677.        previewer. 
  1678.      o ERESStyleDlgProc Style Dialog. Allows for registering and applying 
  1679.        different styles. Styles consist of Font Faces, point size, and color. 
  1680.      o ERESMsgDlgProc Message Dialog. Lists messages previously received 
  1681.        messages. 
  1682.  
  1683.  
  1684. ΓòÉΓòÉΓòÉ 12.1. ERESOpenDlgProc ΓòÉΓòÉΓòÉ
  1685.  
  1686.  
  1687. ΓòÉΓòÉΓòÉ 12.1.1. Description (Open dialog procedure) ΓòÉΓòÉΓòÉ
  1688.  
  1689. ThisdialogallowsuserstoaddanewfileorfilestotheEMLE ' sring 
  1690. ,importafileintothecurrentfile ,orselectafiletobeopenedinanewEMLE .
  1691.  
  1692.  
  1693. ΓòÉΓòÉΓòÉ 12.1.2. OPENBOXINFO Structure ΓòÉΓòÉΓòÉ
  1694.  
  1695. Size  The size of the OPENBOXINFO structure. 
  1696.  
  1697. Mode  Determines the mode of the Open Dialog. This field is set to one of the 
  1698. following constants. 
  1699.  
  1700.      o OPEN_MODE - Open a edit window. This mode cause either an 
  1701.        EPM_EDIT_NEWFILE or EPM_EDIT_NEWFILE message to be sent. 
  1702.      o GET_MODE  - Imports a file into the current file. 
  1703.      o EDIT_MODE - Adds a file to the EMLE's ring. 
  1704.  
  1705.      List  Pointer to a Dialog List. Displays the Dialog List in the Open 
  1706.      dialogs list box. If this is set to NULL then the dialog automatically 
  1707.      retrieves and stores its lists in the applications ini file under the 
  1708.      Application name and Key name given. 
  1709.  
  1710.      Hini  Handle to the applications ini file. Used to store previous dialog 
  1711.      postion and Dialog List information, when the list field is set to null. 
  1712.  
  1713.      Files  Upon return contains the name of the file selected by the user. 
  1714.  
  1715.      MultipleFilesArray  If Multiple files were selected this field contains a 
  1716.      pointer to an array of pointers to strings with all the files selected. 
  1717.  
  1718.      HwndEdit  Window handle to the EMLE. 
  1719.  
  1720.      HwndApp  Window handle of the application. 
  1721.  
  1722.      Style  Determines what action to take when the user selects a file. When 
  1723.      set to 0, the dialog takes no action an simply returns the file selected 
  1724.      in either the files field or MultipleFilesArray field. When set to 
  1725.      OPENF_ISSUE_OPEN the dialog is either add the file selected to the EMLE's 
  1726.      ring, import the selected file in the EMLE's current file, or send an 
  1727.      EPM_EDIT_NEWFILE or EPM_EDIT_NEWFILES message request that the application 
  1728.      open a new EMLE. 
  1729.  
  1730.      AppName  Application name to use when storing and retrieving information 
  1731.      in the INI file. If this is set to NULL the dialog will store and retrieve 
  1732.      its list information in the Dialog List specified in the list field. 
  1733.  
  1734.      KeyName  Key to use when storing and retrieving information in the INI 
  1735.      file. If this is set to NULL the dialog will store and retrieve its list 
  1736.      information in the Dialog List specified in the list field. 
  1737.  
  1738.      Calling the Open Dialog 
  1739.  
  1740.      To call the Open dialog use the PM function WinDlgBox(). 
  1741.  
  1742.  Example 
  1743.  
  1744.               WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  1745.  
  1746.      o Parent - Window handle of the parent of the dialog 
  1747.      o Owner - Window handle of the owner of the dialog 
  1748.      o DlgProc - Window procedure of the dialog (ERESOpenDlgProc) 
  1749.      o Resource - Set to handle of the ETKRxxx.dll module. 
  1750.      o Dlgid- Dialog id (DLG_OPEN) 
  1751.      o CreateParam - Dialog creation parameter. Must be set to(&OpenBoxInfo). 
  1752.  
  1753.  Example 
  1754.  
  1755.              OPENBOXINFO OpenBoxInfo;
  1756.              memset(&OpenBoxInfo, 0, sizeof(OPENBOXINFO));
  1757.              OpenBoxInfo.Size     = sizeof(OPENBOXINFO);
  1758.              OpenBoxInfo.Mode     = EDIT_MODE;
  1759.              OpenBoxInfo.List     = 0;
  1760.              OpenBoxInfo.Hini     = Hini;
  1761.              OpenBoxInfo.HwndApp  = HwndApplication;
  1762.              OpenBoxInfo.Style    = OPENF_ISSUE_OPEN;
  1763.              OpenBoxInfo.HwndEdit = HwndEMLE;
  1764.              OpenBoxInfo.AppName  = "EMLE_SAMP";
  1765.              OpenBoxInfo.KeyName  = "OpenBox";
  1766.  
  1767.              WinDlgBox(HWND_DESKTOP,
  1768.                        HwndApplication,
  1769.                        (PFNWP)ERESOpenDlgProc,
  1770.                        HModuleERES,
  1771.                        DLG_OPEN,
  1772.                        (PVOID)&OpenBoxInfo);
  1773.  
  1774.  
  1775. ΓòÉΓòÉΓòÉ 12.1.3. Processing Help ΓòÉΓòÉΓòÉ
  1776.  
  1777. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  1778. is sent to HwndEdit with mp1 set to HELP_OPENFILE when Mode is OPEN_MODE, 
  1779. HELP_ADDFILE when Mode is EDIT_MODE, and HELP_GETFILE when Mode is GET_MODE. 
  1780.  
  1781.  
  1782. ΓòÉΓòÉΓòÉ 12.2. ERESCommandDlgProc ΓòÉΓòÉΓòÉ
  1783.  
  1784.  
  1785. ΓòÉΓòÉΓòÉ 12.2.1. Description(Command dialog procedure) ΓòÉΓòÉΓòÉ
  1786.  
  1787. This is an edit window command line dialog box, which includes an entry field 
  1788. and a scrollable list of previous commands. 
  1789.  
  1790.  
  1791. ΓòÉΓòÉΓòÉ 12.2.2. COMMANDBOXINFO Structure ΓòÉΓòÉΓòÉ
  1792.  
  1793. Size  The size of the COMMANDBOXINFO structure. 
  1794.  
  1795. Hini  Handle to the applications INI file. 
  1796.  
  1797. CmdText  Command to display in the entry field of the dialog. If set to NULL 
  1798. the entry field is blank. 
  1799.  
  1800. List  Pointer to a Dialog List. Displays the Dialog List in the dialogs list 
  1801. box. If this is set to NULL then the dialog automatically retrieves and stores 
  1802. its lists in the applications ini file under the Application name and Key name 
  1803. given. 
  1804.  
  1805. HwndApp  Window handle of the application. 
  1806.  
  1807. HwndEdit  Window handle of the EMLE. 
  1808.  
  1809. Command  Upon return contains the command entered by the user. 
  1810.  
  1811. Style  If set to NULL the dialog issues the command to the give EMLE. If set to 
  1812. CB_RETURN_COMMAND the command entered is returned in the command field and no 
  1813. action is taken by the dialog. 
  1814.  
  1815. AppName  Application name to use when storing and retrieving information in the 
  1816. INI file. If this is set to NULL the dialog will store and retrieve its list 
  1817. information in the Dialog List specified in the list field. 
  1818.  
  1819. KeyName  Key to use when storing and retrieving information in the INI file. If 
  1820. this is set to NULL the dialog will store and retrieve its list information in 
  1821. the Dialog List specified in the list field. 
  1822.  
  1823. This is an edit window command line dialog box, which includes an entry field 
  1824. and a scrollable list of previous commands. 
  1825.  
  1826. Calling the Command Dialog 
  1827.  
  1828. This dialog can be called using the WinDlgBox() function. For example 
  1829.  
  1830.  Example 
  1831.  
  1832.              WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  1833.  
  1834.      o Parent    - Window handle of the parent of the dialog 
  1835.      o Owner    - Window handle of the owner of the dialog 
  1836.      o DlgProc   - Window procedure of the dialog (ERESCommandDlgProc) 
  1837.      o Resource   - Set to handle of the ETKRxxx.dll module. 
  1838.      o Dlgid    - Dialog id (DLG_COMMAND) 
  1839.      o CreateParam - Dialog creation parameter. Must be set 
  1840.        to(&CommandBoxInfo). 
  1841.  
  1842.  Example 
  1843.  
  1844.              COMMANDBOXINFO CommandBoxInfo;
  1845.  
  1846.              CommandBoxInfo.Size    = sizeof(COMMANDBOXINFO);
  1847.              CommandBoxInfo.Hini    = Hini;
  1848.              CommandBoxInfo.CmdText = "";
  1849.              CommandBoxInfo.HwndApp = HwndApplication;
  1850.              CommandBoxInfo.HwndEdit= HwndEMLE;
  1851.              CommandBoxInfo.List    = 0;
  1852.              CommandBoxInfo.Style   = CB_ISSUE_COMMAND;
  1853.              CommandBoxInfo.AppName = "EMLE_SAMP";
  1854.              CommandBoxInfo.KeyName = "CommandBox";
  1855.  
  1856.              WinDlgBox(HWND_DESKTOP,
  1857.                        hwnd,
  1858.                        (PFNWP)ERESCommandDlgProc,
  1859.                        HModuleERES,
  1860.                        DLG_COMMAND,
  1861.                        (PVOID)&CommandBoxInfo);
  1862.  
  1863.  
  1864. ΓòÉΓòÉΓòÉ 12.2.3. Processing Help ΓòÉΓòÉΓòÉ
  1865.  
  1866. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  1867. is sent to HwndEdit with mp1 set to HELP_COMMAND. 
  1868.  
  1869.  
  1870. ΓòÉΓòÉΓòÉ 12.3. ERESFindChangeDlgProc : ΓòÉΓòÉΓòÉ
  1871.  
  1872.  
  1873. ΓòÉΓòÉΓòÉ 12.3.1. Description(Find/Change dialog procedure) ΓòÉΓòÉΓòÉ
  1874.  
  1875. This dialog allows find/change commands to be entered directly from it. 
  1876.  
  1877.  
  1878. ΓòÉΓòÉΓòÉ 12.3.2. FINDBOXINFO Structure ΓòÉΓòÉΓòÉ
  1879.  
  1880. Size  The size of the FINDBOXINFO structure. 
  1881.  
  1882. Hini  The handle to the applications INI file. 
  1883.  
  1884. FindText  Text to fill the find entry field with. 
  1885.  
  1886. HwndEdit  Window handle of the EMLE. 
  1887.  
  1888. This dialog can be called using the WinDlgBox() function. For example: 
  1889.  
  1890.  Example 
  1891.  
  1892.              WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  1893.  
  1894.      o Parent    - Window handle of the parent of the dialog 
  1895.      o Owner    - Window handle of the owner of the dialog 
  1896.      o DlgProc   - Window procedure of the dialog (ERESFindChangeDlgProc) 
  1897.      o Resource   - Where the dialog resource is located (ERES) 
  1898.      o Dlgid    - Dialog id (DLG_CHANGE). 
  1899.      o CreateParam - Dialog creation parameter. Must be set to(&FindBoxInfo). 
  1900.  
  1901.  Example 
  1902.  
  1903.  
  1904.              FINDBOXINFO FindBoxInfo;
  1905.              FindBoxInfo.Size     = sizeof(FINDBOXINFO);
  1906.              FindBoxInfo.Hini     = Hini;
  1907.              FindBoxInfo.FindText = "";
  1908.              FindBoxInfo.HwndApp  = HwndApplication;
  1909.              FindBoxInfo.HwndEdit = HwndEMLE;
  1910.              WinDlgBox(HWND_DESKTOP, hwnd, ERESFindChangeDlgProc,
  1911.                        HModuleERES, DLG_CHANGE, &FindBoxInfo);
  1912.  
  1913.  
  1914. ΓòÉΓòÉΓòÉ 12.3.3. Processing Help ΓòÉΓòÉΓòÉ
  1915.  
  1916. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  1917. is sent to HwndEdit with mp1 set to HELP_CHANGE. 
  1918.  
  1919.  
  1920. ΓòÉΓòÉΓòÉ 12.4. ERESSettingsDlgProc ΓòÉΓòÉΓòÉ
  1921.  
  1922.  
  1923. ΓòÉΓòÉΓòÉ 12.4.1. Description(Settings dialog procedure) ΓòÉΓòÉΓòÉ
  1924.  
  1925. Allow edit window options to be configured from dialog box. This dialog allows 
  1926. configuration of edit window options. These options include setting margins, 
  1927. autosave level, tabs, colors, paths, fonts, and enter keys. 
  1928.  
  1929.  
  1930. ΓòÉΓòÉΓòÉ 12.4.2. SETBOXINFO Structure ΓòÉΓòÉΓòÉ
  1931.  
  1932. Size  The size of the SETBOXINFO structure. 
  1933.  
  1934. Hini  The handle to the applications INI file. 
  1935.  
  1936. HwndApp  Window handle of the application. 
  1937.  
  1938. HwndEdit  Window handle of the EMLE. 
  1939.  
  1940. Pages  Specifies what pages of the Settings dialog to display. Bits 0-6 each 
  1941. correspond to seven pages of the dialog. If a page bit is 0 the page is 
  1942. displayed, if 1 then it is omitted. Therefore setting this field to 0 will 
  1943. insure that all pages are displayed. 
  1944.  
  1945. Options  Options bit field. Bit 0 is set if you have the spell checking 
  1946. package. All other fields are currently reserved. 
  1947.  
  1948. This dialog can be called using the WinDlgBox() function. For example: 
  1949.  
  1950.  Example 
  1951.  
  1952.               WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  1953.  
  1954.      o Parent    - Window handle of the parent of the dialog 
  1955.      o Owner    - Window handle of the owner of the dialog 
  1956.      o DlgProc   - Window procedure of the dialog (ERESSettingsDlgProc) 
  1957.      o Resource   - Where the dialog resource is located (ERES) 
  1958.      o Dlgid    - Dialog id (DLG_SETTINGS) 
  1959.      o CreateParam - Dialog creation parameter. Must be set to(&SetBoxInfo). 
  1960.  
  1961.  Example 
  1962.  
  1963.              SETBOXINFO SetBoxInfo;
  1964.  
  1965.              SetBoxInfo.Size     =  sizeof(SETBOXINFO);
  1966.              SetBoxInfo.Hini     =  Hini;
  1967.              SetBoxInfo.HwndApp  =  HwndApplication;
  1968.              SetBoxInfo.HwndEdit =  HwndEMLE;
  1969.              SetBoxInfo.Pages    =  0;
  1970.              SetBoxInfo.Options  =  1;
  1971.  
  1972.              WinDlgBox(HWND_DESKTOP,
  1973.                        HwndEMLE,
  1974.                        (PFNWP)ERESSettingsDlgProc,
  1975.                        HModuleERES,
  1976.                        DLG_SETTINGS,
  1977.                        (PVOID)&SetBoxInfo);
  1978.  
  1979.  
  1980. ΓòÉΓòÉΓòÉ 12.4.3. Processing Help ΓòÉΓòÉΓòÉ
  1981.  
  1982. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  1983. is sent to HwndEdit with mp1 set to HELP_STYLEDLG. 
  1984.  
  1985.  
  1986. ΓòÉΓòÉΓòÉ 12.5. ERESQuitBoxDlgProc ΓòÉΓòÉΓòÉ
  1987.  
  1988.  
  1989. ΓòÉΓòÉΓòÉ 12.5.1. Description(Quit box dialog procedure) ΓòÉΓòÉΓòÉ
  1990.  
  1991. Sample Quit box dialog which handles EPM_EDIT_ASKTOxxx messages. This dialog 
  1992. informs the user that a file has been modified. It includes an entry field to 
  1993. specify what name the modifications should be saved as, and the pushbuttons: 
  1994. Save , Discard, Cancel, and Help. This dialog can be called using the 
  1995. WinDlgBox() function. 
  1996.  
  1997.  
  1998. ΓòÉΓòÉΓòÉ 12.5.2. QUITBOXINFO Structure ΓòÉΓòÉΓòÉ
  1999.  
  2000. Size  The size of the QUITBOXINFO strucuture. 
  2001.  
  2002. Filename  The filename to display in the dialogs entry field. 
  2003.  
  2004. DlgTitle  The title of the dialog. 
  2005.  
  2006. DlgMessage  The message to display in the dialog. 
  2007.  
  2008. HwndApp  The Window handle of the application. 
  2009.  
  2010. This dialog can be called using the WinDlgBox() function. 
  2011.  
  2012.  Example 
  2013.  
  2014.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2015.  
  2016.      o Parent    - Window handle of the parent of the dialog 
  2017.      o Owner    - Window handle of the owner of the dialog 
  2018.      o DlgProc   - Window procedure of the dialog (ERESQuitBoxDlgProc) 
  2019.      o Resource   - Where the dialog resource is located (ERES) 
  2020.      o Dlgid    - Dialog id (DLG_QUITBOX) 
  2021.      o CreateParam - Dialog creation parameter. Must be set to(PQUITBOXINFO). 
  2022.       This dialog returns one of the following codes. 
  2023.  
  2024.      o ERES_SAVE   - Save was selected. File name is stored in 
  2025.        QUITBOXINFO.filename 
  2026.      o ERES_CANCEL  - Cancel was selected. 
  2027.      o ERES_DISCARD - Discard was selected. 
  2028.  
  2029.  Example 
  2030.  
  2031.              QUITBOXINFO              QuitBoxInfo;
  2032.              QuitBoxInfo.Size       = sizeof(QUITBOXINFO);
  2033.              QuitBoxInfo.Filename   = "myfile";
  2034.              QuitBoxInfo.DlgTitle   = "Quit Dialog"
  2035.              QuitBoxInfo.DlgMessage = "Would you like to save this file";
  2036.              QuitBoxInfo.HwndApp    =  HwndApplication;
  2037.  
  2038.              WinDlgBox(HWND_DESKTOP, (HWND)HwndApplication, (PFNWP)ERESQuitDlgProc,
  2039.                 HModuleERES, DLG_QUITBOX, (PVOID) &QuitBoxInfo);
  2040.  
  2041.  
  2042. ΓòÉΓòÉΓòÉ 12.5.3. Processing Help ΓòÉΓòÉΓòÉ
  2043.  
  2044. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2045. is sent to HwndEdit with mp1 set to HELP_QUIT. 
  2046.  
  2047.  
  2048. ΓòÉΓòÉΓòÉ 12.6. ERESUndoDlgProc ΓòÉΓòÉΓòÉ
  2049.  
  2050.  
  2051. ΓòÉΓòÉΓòÉ 12.6.1. Description(Undo dialog procedure) ΓòÉΓòÉΓòÉ
  2052.  
  2053. Allows users to go to a previous undo state of the current file. 
  2054.  
  2055.  
  2056. ΓòÉΓòÉΓòÉ 12.6.2. UNDOBOXINFO Structure ΓòÉΓòÉΓòÉ
  2057.  
  2058. Size  The size of the UNDOBOXINFO Structure. 
  2059.  
  2060. Hini  The handle to the applications INI file. 
  2061.  
  2062. HwndApp  Window handle of the application. 
  2063.  
  2064. HwndEdit  Window handle of the EMLE. 
  2065.  
  2066. This dialog can be called using the WinDlgBox() function. 
  2067.  
  2068.  Example 
  2069.  
  2070.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2071.  
  2072.      o Parent    - Window handle of the parent of the dialog 
  2073.      o Owner    - Window handle of the owner of the dialog 
  2074.      o DlgProc   - Window procedure of the dialog (ERESUndoDlgProc) 
  2075.      o Resource   - Set to the handle of the EKTRxxx.dll module. 
  2076.      o Dlgid    - Dialog id (DLG_UNDO) 
  2077.      o CreateParam - Dialog creation parameter. Must be set to(PUNDOBOXINFO). 
  2078.  
  2079.  Example 
  2080.  
  2081.              UNDOBOXINFO UndoBoxInfo;
  2082.              UndoBoxInfo.Size     = sizeof(UNDOBOXINFO);
  2083.              UndoBoxInfo.Hini     = Hini;
  2084.              UndoBoxInfo.HwndApp  = HwndApplication;
  2085.              UndoBoxInfo.HwndEdit = HwndEMLE;
  2086.  
  2087.              WinDlgBox(HWND_DESKTOP,
  2088.                        HwndEMLE,
  2089.                        (PFNWP)ERESUndoDlgProc,
  2090.                        HModuleERES,
  2091.                        DLG_UNDO,
  2092.                        (PVOID)&UndoBoxInfo);
  2093.  
  2094.  
  2095. ΓòÉΓòÉΓòÉ 12.6.3. Processing Help ΓòÉΓòÉΓòÉ
  2096.  
  2097. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2098. is sent to HwndEdit with mp1 set to HELP_UNDO. 
  2099.  
  2100.  
  2101. ΓòÉΓòÉΓòÉ 12.7. ERESPrintDlgProc ΓòÉΓòÉΓòÉ
  2102.  
  2103.  
  2104. ΓòÉΓòÉΓòÉ 12.7.1. Description(Print dialog procedure) ΓòÉΓòÉΓòÉ
  2105.  
  2106. Print Dialog which allows users to select the print queue to send the file to 
  2107. and also preview the file. 
  2108.  
  2109.  
  2110. ΓòÉΓòÉΓòÉ 12.7.2. PRINTBOXINFO Structure ΓòÉΓòÉΓòÉ
  2111.  
  2112. Size  The size of the PRINTBOXINFO strucuture. 
  2113.  
  2114. Hini  The handle to the applications INI file. 
  2115.  
  2116. HwndApp  Window handle of the application. 
  2117.  
  2118. HwndEdit  Window handle of the EMLE. 
  2119.  
  2120. This dialog can be called using the WinDlgBox() function. 
  2121.  
  2122.  Example 
  2123.  
  2124.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2125.  
  2126.      o Parent    - Window handle of the parent of the dialog 
  2127.      o Owner    - Window handle of the owner of the dialog 
  2128.      o DlgProc   - Window procedure of the dialog (ERESPrintDlgProc) 
  2129.      o Resource   - Set to the handle of the EKTRxxx.dll module. 
  2130.      o Dlgid    - Dialog id (DLG_UNDO) 
  2131.      o CreateParam - Dialog creation parameter. Must be set to(PPRINTBOXINFO). 
  2132.  
  2133.  Example 
  2134.  
  2135.              PRINTBOXINFO PrintBoxInfo;
  2136.  
  2137.              PrintBoxInfo.Size     = sizeof(PRINTBOXINFO);
  2138.              PrintBoxInfo.Hini     = Hini;
  2139.              PrintBoxInfo.HwndApp  = HwndApplication;
  2140.              PrintBoxInfo.HwndEdit = HwndEMLE;
  2141.              WinDlgBox(HWND_DESKTOP,
  2142.                        HwndEMLE,
  2143.                        (PFNWP)ERESPrintDlgProc,
  2144.                        HModuleERES,
  2145.                        DLG_PRINT,
  2146.                        (PVOID)&PrintBoxInfo);
  2147.  
  2148.  
  2149. ΓòÉΓòÉΓòÉ 12.7.3. Processing Help ΓòÉΓòÉΓòÉ
  2150.  
  2151. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2152. is sent to HwndEdit with mp1 set to DPR_HELP. 
  2153.  
  2154.  
  2155. ΓòÉΓòÉΓòÉ 12.8. ERESProofDlgProc ΓòÉΓòÉΓòÉ
  2156.  
  2157.  
  2158. ΓòÉΓòÉΓòÉ 12.8.1. Description(Proof dialog procedure) ΓòÉΓòÉΓòÉ
  2159.  
  2160. Proof Dialog which allows users to proof read a file. 
  2161.  
  2162.  
  2163. ΓòÉΓòÉΓòÉ 12.8.2. PROOFBOXINFO Structure ΓòÉΓòÉΓòÉ
  2164.  
  2165. Size  The size of the PROOFBOXINFO strucuture. 
  2166.  
  2167. Hini  The handle to the applications INI file. 
  2168.  
  2169. HwndApp  Window handle of the application. 
  2170.  
  2171. HwndEdit  Window handle of the EMLE. 
  2172.  
  2173. AutoSuggest  This field initializes the Auto Suggest check box in the dialog. 
  2174. This field is ignored if Hini and AppName are initializated, in which case the 
  2175. Auto Suggest check box is initialized with the current setting in the ini file. 
  2176.  
  2177. AppName  Application name to use when accessing  the INI file. 
  2178.  
  2179. This dialog can be called using the WinDlgBox() function. 
  2180.  
  2181.  Example 
  2182.  
  2183.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2184.  
  2185.      o Parent    - Window handle of the parent of the dialog 
  2186.      o Owner    - Window handle of the owner of the dialog 
  2187.      o DlgProc   - Window procedure of the dialog (ERESProofDlgProc) 
  2188.      o Resource   - Set to the handle of the EKTRxxx.dll module. 
  2189.      o Dlgid    - Dialog id (DLG_PROOF) 
  2190.      o CreateParam - Dialog creation parameter. Must be set to(PPROOFBOXINFO). 
  2191.  
  2192.  Example 
  2193.  
  2194.  
  2195.              PROOFBOXINFO ProofBoxInfo;
  2196.              ProofBoxInfo.size       = sizeof(PROOFBOXINFO);
  2197.              ProofBoxInfo.Hini       = Hini;
  2198.              ProofBoxInfo.HwndApp    = HwndAppClient;
  2199.              ProofBoxInfo.HwndEdit   = HwndActiveEdit;
  2200.              ProofBoxInfo.IniAppName = "EMLE_SAMP";
  2201.              ProofBoxInfo.ListFilled = 0;
  2202.  
  2203.              WinDlgBox(HWND_DESKTOP,
  2204.                           HwndAppClient,
  2205.                           (PFNWP)ERESProofDlgProc,
  2206.                           HModuleERES,
  2207.                           DLG_PROOF,
  2208.                           (PVOID)&ProofBoxInfo);
  2209.  
  2210.  
  2211. ΓòÉΓòÉΓòÉ 12.8.3. Processing Help ΓòÉΓòÉΓòÉ
  2212.  
  2213. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2214. is sent to HwndEdit with mp1 set to HELP_PROOFDLG. 
  2215.  
  2216.  
  2217. ΓòÉΓòÉΓòÉ 12.9. ERESRingDlgProc ΓòÉΓòÉΓòÉ
  2218.  
  2219.  
  2220. ΓòÉΓòÉΓòÉ 12.9.1. Description(Ring dialog procedure) ΓòÉΓòÉΓòÉ
  2221.  
  2222. Displays the files in the EMLE ring. 
  2223.  
  2224.  
  2225. ΓòÉΓòÉΓòÉ 12.9.2. RINGBOXINFO Structure ΓòÉΓòÉΓòÉ
  2226.  
  2227. Size  The size of the RINGBOXINFO structure. 
  2228.  
  2229. Hini  The handle to the applications INI file. 
  2230.  
  2231. HwndApp  Window handle of the application. 
  2232.  
  2233. HwndEdit  Window handle of the EMLE. 
  2234.  
  2235. This dialog can be called using the WinDlgBox() function. 
  2236.  
  2237.  Example 
  2238.  
  2239.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2240.  
  2241.      o Parent    - Window handle of the parent of the dialog 
  2242.      o Owner    - Window handle of the owner of the dialog 
  2243.      o DlgProc   - Window procedure of the dialog (ERESRingBoxDlgProc) 
  2244.      o Resource   - Set to the handle of the EKTRxxx.dll module. 
  2245.      o Dlgid    - Dialog id (DLG_RING) 
  2246.      o CreateParam - Dialog creation parameter. Must be set to(PRINGBOXINFO). 
  2247.  
  2248.  Example 
  2249.  
  2250.  
  2251.              RINGBOXINFO    RingBoxInfo;
  2252.  
  2253.              RingBoxInfo.Size    = sizeof(RINGBOXINFO);
  2254.              RingBoxInfo.Hini    = Hini;
  2255.              RingBoxInfo.HwndApp = HwndApplication;
  2256.              RingBoxInfo.HwndEdit= HwndEMLE;
  2257.  
  2258.              WinDlgBox(HWND_DESKTOP,
  2259.                             HwndEMLE,
  2260.                             (PFNWP)ERESRingDlgProc,
  2261.                             HModuleERES,
  2262.                             DLG_RING,
  2263.                             (PVOID)&RingBoxInfo);
  2264.  
  2265.  
  2266. ΓòÉΓòÉΓòÉ 12.9.3. Processing Help ΓòÉΓòÉΓòÉ
  2267.  
  2268. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2269. is sent to HwndEdit with mp1 set to HELP_RING. 
  2270.  
  2271.  
  2272. ΓòÉΓòÉΓòÉ 12.10. ERESMsgDlgProc ΓòÉΓòÉΓòÉ
  2273.  
  2274.  
  2275. ΓòÉΓòÉΓòÉ 12.10.1. Description(Message dialog procedure) ΓòÉΓòÉΓòÉ
  2276.  
  2277. Displays a list of messages. 
  2278.  
  2279.  
  2280. ΓòÉΓòÉΓòÉ 12.10.2. MSGBOXINFO Structure ΓòÉΓòÉΓòÉ
  2281.  
  2282. Size  The size of the MSGBOXINFO structure. 
  2283.  
  2284. HwndApp  Window handle of the application. 
  2285.  
  2286. MsgText  Message text to display in the entry field of the dialog. 
  2287.  
  2288. List  Pointer to a Dialog List. Displays the Dialog List in the dialogs list 
  2289. box. If this is set to NULL then the dialog automatically retrieves and stores 
  2290. its lists in the applications ini file under the Application name and Key name 
  2291. given. 
  2292.  
  2293. AppName  Application name to use when storing and retrieving information in the 
  2294. INI file. If this is set to NULL the dialog will store and retrieve its list 
  2295. information in the Dialog List specified in the list field. 
  2296.  
  2297. KeyName  Key to use when storing and retrieving information in the INI file. If 
  2298. this is set to NULL the dialog will store and retrieve its list information in 
  2299. the Dialog List specified in the list field. 
  2300.  
  2301. This dialog can be called using the WinDlgBox() function. 
  2302.  
  2303.  Example 
  2304.  
  2305.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2306.  
  2307.      o Parent    - Window handle of the parent of the dialog 
  2308.      o Owner    - Window handle of the owner of the dialog 
  2309.      o DlgProc   - Window procedure of the dialog (ERESMsgBoxDlgProc) 
  2310.      o Resource   - Set to the handle of the EKTRxxx.dll module. 
  2311.      o Dlgid    - Dialog id (DLG_MSGBOX) 
  2312.      o CreateParam - Dialog creation parameter. Must be set to(PMSGBOXINFO). 
  2313.  
  2314.  Example 
  2315.  
  2316.              MSGBOXINFO MsgBoxInfo;
  2317.              MsgBoxInfo.Size    = sizeof(MSGBOXINFO);
  2318.              MsgBoxInfo.HwndApp = HwndAppClient;
  2319.              MsgBoxInfo.MsgText = mp2;
  2320.              MsgBoxInfo.List    = &MsgDlgList;
  2321.              MsgBoxInfo.Hini    = Hini;
  2322.              MsgBoxInfo.AppName = (PSZ)0;
  2323.              MsgBoxInfo.KeyName = (PSZ)0;
  2324.  
  2325.              WinDlgBox(HWND_DESKTOP,
  2326.                        HwndActiveEdit,
  2327.                        (PFNWP)ERESMsgBoxDlgProc,
  2328.                        HModuleERES,
  2329.                        DLG_MSGBOX,
  2330.                        (PVOID)&MsgBoxInfo);
  2331.  
  2332.  
  2333. ΓòÉΓòÉΓòÉ 12.10.3. Processing Help ΓòÉΓòÉΓòÉ
  2334.  
  2335. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2336. is sent to HwndEdit with mp1 set to HELP_MSGBOX. 
  2337.  
  2338.  
  2339. ΓòÉΓòÉΓòÉ 12.11. ERESStyleDlgProc ΓòÉΓòÉΓòÉ
  2340.  
  2341.  
  2342. ΓòÉΓòÉΓòÉ 12.11.1. Description(Style dialog procedure) ΓòÉΓòÉΓòÉ
  2343.  
  2344. Allows users to register and apply styles to active file in the EMLE. 
  2345.  
  2346.  
  2347. ΓòÉΓòÉΓòÉ 12.11.2. STYLEBOXINFO Structure ΓòÉΓòÉΓòÉ
  2348.  
  2349. Size  The size of the STYLEBOXINFO structure. 
  2350.  
  2351. Hini  The handle to the applications INI file. 
  2352.  
  2353. HwndApp  Window handle of the application. 
  2354.  
  2355. HwndEdit  Window handle of the EMLE. 
  2356.  
  2357. Type  This field must be set to STYLEDLG_DIALOG. All other values are reserved. 
  2358.  
  2359. Owner  This field is a reserved field and must be set to 0. 
  2360.  
  2361. This dialog can be called using the WinDlgBox() function. 
  2362.  
  2363.  Example 
  2364.  
  2365.             WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam);
  2366.  
  2367.      o Parent    - Window handle of the parent of the dialog 
  2368.      o Owner    - Window handle of the owner of the dialog 
  2369.      o DlgProc   - Window procedure of the dialog (ERESStyleDlgProc) 
  2370.      o Resource   - Set to the handle of the EKTRxxx.dll module. 
  2371.      o Dlgid    - Dialog id (DLG_STYLE) 
  2372.      o CreateParam - Dialog creation parameter. Must be set to(PSTYLEBOXINFO). 
  2373.  
  2374.  Example 
  2375.  
  2376.              STYLEBOXINFO StyleBoxInfo;
  2377.              StyleBoxInfo.Size             = sizeof(STYLEBOXINFO);
  2378.              StyleBoxInfo.Hini             = Hini;
  2379.              StyleBoxInfo.HwndApp          = HwndApplication;
  2380.              StyleBoxInfo.HwndEdit         = HwndEMLE;
  2381.              StyleBoxInfo.Type             = STYLEDLG_DIALOG;
  2382.              StyleBoxInfo.Owner            = 0;
  2383.  
  2384.              WinDlgBox(HWND_DESKTOP,
  2385.                        HwndEMLE,
  2386.                        (PFNWP)ERESStyleDlgProc,
  2387.                        HModuleERES,
  2388.                        DLG_STYLE,
  2389.                        (PVOID)&StyleBoxInfo);
  2390.  
  2391.  
  2392. ΓòÉΓòÉΓòÉ 12.11.3. Processing Help ΓòÉΓòÉΓòÉ
  2393.  
  2394. When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message 
  2395. is sent to HwndEdit with mp1 set to HELP_STYLEDLG. 
  2396.  
  2397.  
  2398. ΓòÉΓòÉΓòÉ 13. ERES Functions ΓòÉΓòÉΓòÉ
  2399.  
  2400.  
  2401. ΓòÉΓòÉΓòÉ 13.1. ERESSaveDlgList ΓòÉΓòÉΓòÉ
  2402.  
  2403.  
  2404.   ERESSaveDlgList - 
  2405.  (Save a dialog list) 
  2406.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2407.  
  2408.      Save an applications list to an INI file. 
  2409.  
  2410.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2411.           Γöé ERESSaveList ( Hini, List, AppName, KeyName, ,  )
  2412.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2413.  
  2414.  Parameters 
  2415.  
  2416.      Hini  ( HWND ) - input 
  2417.         Handle to the INI file to place the dialog list in. 
  2418.  
  2419.      List  ( PLISTDLG ) - input 
  2420.         Pointer to a dialog list to be saved. 
  2421.  
  2422.      AppName  ( PSZ ) - input 
  2423.         Application name to use when saving to the INI file. 
  2424.  
  2425.      KeyName  ( PSZ ) - input 
  2426.         Key name to use when saving to the INI file. 
  2427.  
  2428.  Returns 
  2429.  
  2430.      rc ( VOID ) - 
  2431.  
  2432.  Remarks 
  2433.  
  2434.      This function is used to save an applications dialog list to an INI file. 
  2435.      Dialog list are used by the Command, Open, and Message dialog. 
  2436.  
  2437.  Example 
  2438.  
  2439.              DLGLIST MsgDlgList;
  2440.  
  2441.              ERESSaveList(Hini, &MsgDlgList, "EMLE_SAMP", "MsgList");
  2442.  
  2443.  Related Functions 
  2444.  
  2445.      ERESRetrieveDlgList 
  2446.  
  2447.  
  2448. ΓòÉΓòÉΓòÉ 13.2. ERESRetrieveDlgList ΓòÉΓòÉΓòÉ
  2449.  
  2450.  
  2451.   ERESRetrieveDlgList - 
  2452.  (Retrieve a dialog list) 
  2453.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2454.  
  2455.      Retrieves a dialog list from an INI file. 
  2456.  
  2457.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2458.           Γöé ERESRetrieveList ( Hini, List, AppName, KeyName, ,  )
  2459.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2460.  
  2461.  Parameters 
  2462.  
  2463.      Hini  ( HWND ) - input 
  2464.         Handle to the INI file to place the dialog list in. 
  2465.  
  2466.      List  ( PLISTDLG ) - input 
  2467.         Pointer to a dialog list to be retrieved. 
  2468.  
  2469.      AppName  ( PSZ ) - input 
  2470.         Application name to use when accessing  the INI file. 
  2471.  
  2472.      KeyName  ( PSZ ) - input 
  2473.         Key name to use when accessing  the INI file. 
  2474.  
  2475.  Returns 
  2476.  
  2477.      rc ( VOID ) - 
  2478.  
  2479.  Remarks 
  2480.  
  2481.      This function is used to retrieve an applications dialog list from an INI 
  2482.      file. Dialog list are used by the Command, Open, and Message dialog. 
  2483.  
  2484.  Example 
  2485.  
  2486.              DLGLIST MsgDlgList;
  2487.  
  2488.              ERESRetrieveDlgList(Hini, &MsgDlgList, "EMLE_SAMP", "MsgList");
  2489.  
  2490.  Related Functions 
  2491.  
  2492.      ERESSaveDlgList 
  2493.  
  2494.  
  2495. ΓòÉΓòÉΓòÉ 13.3. ERESAddToWndList ΓòÉΓòÉΓòÉ
  2496.  
  2497.  
  2498.   ERESAddToWndList - 
  2499.  (Add window to list) 
  2500.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2501.  
  2502.      Adds a window to a window list. 
  2503.  
  2504.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2505.           Γöé ERESAddToWndList ( HwndList, Hwnd, ,  )
  2506.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2507.  
  2508.  Parameters 
  2509.  
  2510.      HwndList  ( PHWNDLIST ) - input 
  2511.         Pointer to a handle to window list. 
  2512.  
  2513.      Hwnd  ( HWND ) - input 
  2514.         Window handle to add to the list. 
  2515.  
  2516.  Returns 
  2517.  
  2518.      rc ( VOID ) - 
  2519.  
  2520.  Remarks 
  2521.  
  2522.      ERESAddToWndList is used to add a window to a window list. 
  2523.  
  2524.  Example 
  2525.  
  2526.              HWNDLIST HwndList;
  2527.  
  2528.              ERESAddToWndList(&HwndList, HwndEdit);
  2529.  
  2530.  Related Functions 
  2531.  
  2532.      ERESDeleteFromWndList  ERESShowWndList 
  2533.  
  2534.  
  2535. ΓòÉΓòÉΓòÉ 13.4. ERESDeleteFromWndList ΓòÉΓòÉΓòÉ
  2536.  
  2537.  
  2538.   ERESDeleteFromWndList - 
  2539.  (Deletes a window from a list) 
  2540.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2541.  
  2542.      Adds a window to a window list. 
  2543.  
  2544.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2545.           Γöé ERESDeleteFromWndList ( HwndList, Hwnd, ,  )
  2546.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2547.  
  2548.  Parameters 
  2549.  
  2550.      HwndList  ( PHWNDLIST ) - input 
  2551.         Pointer to a handle to window list. 
  2552.  
  2553.      Hwnd  ( HWND ) - input 
  2554.         Window handle to add to the list. 
  2555.  
  2556.  Returns 
  2557.  
  2558.      rc ( VOID ) - 
  2559.  
  2560.  Remarks 
  2561.  
  2562.      ERESDeleteFromWndList is used to delete a window to a window list. 
  2563.  
  2564.  Example 
  2565.  
  2566.              HWNDLIST HwndList;
  2567.  
  2568.              ERESDeleteFromWndList(&HwndList, HwndEdit);
  2569.  
  2570.  Related Functions 
  2571.  
  2572.      ERESAddToWndList  ERESShowWndList  ERESCountWndList 
  2573.  
  2574.  
  2575. ΓòÉΓòÉΓòÉ 13.5. ERESShowWndList ΓòÉΓòÉΓòÉ
  2576.  
  2577.  
  2578.   ERESShowWndList - 
  2579.  (Display a window list) 
  2580.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2581.  
  2582.      Displays  window list dialog. 
  2583.  
  2584.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2585.           Γöé ERESShowList ( HwndParent, HwndList, ,  )
  2586.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2587.  
  2588.  Parameters 
  2589.  
  2590.      HwndParent  ( HWND ) - input 
  2591.         Window which will be the parent of the window list dialog. 
  2592.  
  2593.      HWndList  ( PHWNDLIST ) - input 
  2594.         Pointer to a handle to window list. 
  2595.  
  2596.  Returns 
  2597.  
  2598.      rc ( VOID ) - 
  2599.  
  2600.  Remarks 
  2601.  
  2602.      ERESShowWndList displays a dialog with a list of all EMLEs in the list. 
  2603.      The user can activate any EMLE in the list. 
  2604.  
  2605.  Example 
  2606.  
  2607.              HWNDLIST HwndList;
  2608.              HWND     HwndApplication;
  2609.  
  2610.              ERESShowList(HwndApplication, &HwndList);
  2611.  
  2612.  Related Functions 
  2613.  
  2614.      ERESDeleteWndFromList  ERESAddWndToList    ERESCountWndList 
  2615.  
  2616.  
  2617. ΓòÉΓòÉΓòÉ 13.6. ERESCountWndList ΓòÉΓòÉΓòÉ
  2618.  
  2619.  
  2620.   ERESCountWndList - 
  2621.  (Counts window list) 
  2622.  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ 
  2623.  
  2624.      Returns the number of windows in the window list. 
  2625.  
  2626.           ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2627.           Γöé ERESCountWndList ( HwndList ,  )
  2628.           ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2629.  
  2630.  Parameters 
  2631.  
  2632.      HWndList  ( HWNDLIST ) - input 
  2633.         Handle to the window list. 
  2634.  
  2635.  Returns 
  2636.  
  2637.      rc ( VOID ) - 
  2638.  
  2639.  Remarks 
  2640.  
  2641.      ERESCountWndList returns the number of windows in the list. 
  2642.  
  2643.  Example 
  2644.  
  2645.              HWNDLIST HwndList;
  2646.  
  2647.              ERESCountWndList(HwndList);
  2648.  
  2649.  Related Functions 
  2650.  
  2651.      ERESDeleteWndFromList  ERESAddWndToList    ERESShowWndList 
  2652.  
  2653.  
  2654. ΓòÉΓòÉΓòÉ 14. E Toolkit Messages ΓòÉΓòÉΓòÉ
  2655.  
  2656.  
  2657. Purpose The following messages are used to interact with an edit window object. 
  2658. Remarks 
  2659.  
  2660.  Example 
  2661.  
  2662.           EPM_EDIT_OPTION
  2663.           EPM_EDIT_PLAYKEY
  2664.           EPM_EDIT_ACTIVATEFILEID
  2665.           EPM_EDIT_POSTDONE
  2666.           EPM_EDIT_ACTIVEHWND
  2667.           EPM_EDIT_ASKTOCLOSE
  2668.           EPM_EDIT_ASKTODONE
  2669.           EPM_EDIT_ASKTOFAILED
  2670.           EPM_EDIT_QUERYRECORDKEY
  2671.           EPM_EDIT_ASKTOQUIT
  2672.           EPM_EDIT_RECORDKEY
  2673.           EPM_EDIT_CHAR
  2674.           EPM_EDIT_RETCODE
  2675.           EPM_EDIT_CLIPBOARDCOPY
  2676.           EPM_EDIT_SAYERROR
  2677.           EPM_EDIT_CLIPBOARDPASTE
  2678.           EPM_EDIT_COMMAND
  2679.           EPM_EDIT_SHOW
  2680.           EPM_EDIT_COMMAND2
  2681.           EPM_EDIT_TURN_OFF_HIGHLIGHT
  2682.           EPM_EDIT_CONTROLTOGGLE * ( need access to CONTROL constants.)
  2683.           EPM_EDIT_CURSORMOVE
  2684.           EPM_EDIT_VERSION
  2685.           EPM_EDIT_WIN2DOC * (Jason needs to document this one.)
  2686.           EPM_EDIT_DESTROYNOTIFY
  2687.           EPM_EDIT_DESTROYRC
  2688.           EPM_EXTRAWINDOW_REFRESH
  2689.           EPM_EDIT_DOC2WIN * (Jason needs to document this one.)
  2690.           EPM_FRAME_MESSAGELINE
  2691.           EPM_FRAME_STATUSLINE
  2692.           EPM_EDIT_ENDRECORDKEY
  2693.           EPM_EDIT_TASKLIST
  2694.  
  2695.           ------------- TODO ----------------
  2696.           EPM_EDIT_EXEC_DYNALINK * (GAC has to document this one.)
  2697.           EPM_GET_ERROR_MESSAGE
  2698.           EPM_EDIT_EXEC_PROC
  2699.           EPM_IS_HELP_LOADED
  2700.           EPM_EDIT_GETMEM
  2701.           EPM_PRINT_RENDERPAGE
  2702.           EPM_EDIT_GETPROFILE
  2703.           EPM_PRINT_RENDERPAGERC
  2704.           EPM_EDIT_HELPNOTIFY
  2705.           EPM_QHELP_TABLE
  2706.           EPM_EDIT_ID
  2707.           EPM_QUERY_GLOBDATA
  2708.           EPM_EDIT_MINMAXFRAME
  2709.           EPM_SEND_MACROS_ERRORS
  2710.           EPM_EDIT_NEWFILE
  2711.           -----------------------------------
  2712.       Note:  Editor messages are either request messages or notify messages. 
  2713.      Request messages are messages sent or posted to the control to request and 
  2714.      action or to query a value.  In most cases, the application, a seperate 
  2715.      control, or subclassing window procedure is the source of these messages, 
  2716.      but on occasion, the control may send or post such messages to itself so 
  2717.      as to provide an opportunity for a subclassing procedure to intercept 
  2718.      these messages. 
  2719.  
  2720.      Inform messages are messages sent or posted by the control to let the 
  2721.      application or subclassing procedure know that events have occured.  In 
  2722.      order to provide a more object oriented design approach, the control will 
  2723.      usually transmit notify messages to itself rather than to an owner, parent 
  2724.      or sibling. To intercept these messages, one must subclass the control. 
  2725.  
  2726.  
  2727. ΓòÉΓòÉΓòÉ 14.1. EPM_EDIT_VERSION ΓòÉΓòÉΓòÉ
  2728.  
  2729. EPM_EDIT_VERSION 
  2730.  
  2731.       Sent TO an E-MLE window 
  2732.  
  2733.      Return the E-Toolkit version number. 
  2734.  
  2735.  Parameters 
  2736.  
  2737.      param1 
  2738.  
  2739.         NULL (MPARAM) 
  2740.            Not used. 
  2741.  
  2742.      param2 
  2743.  
  2744.         NULL (MPARAM) 
  2745.            Not used. 
  2746.  
  2747.  Returns 
  2748.  
  2749.         Version (LONG) 
  2750.            Version number of the ETKExxx.DLL. 
  2751.  
  2752.  
  2753. ΓòÉΓòÉΓòÉ 14.2. EPM_EDIT_TURN_OFF_HIGHLIGHT ΓòÉΓòÉΓòÉ
  2754.  
  2755. EPM_EDIT_TURN_OFF_HIGHLIGHT 
  2756.  
  2757.       (Turn Off Highlight) - Sent TO an E-MLE window 
  2758.  
  2759.      Clear text circled by the CIRCLEIT macro. 
  2760.  
  2761.  Parameters 
  2762.  
  2763.      param1 
  2764.  
  2765.         NULL (MPARAM) 
  2766.            Not used. 
  2767.  
  2768.      param2 
  2769.  
  2770.         NULL (MPARAM) 
  2771.            Not used. 
  2772.  
  2773.  Returns 
  2774.  
  2775.         NULL (MRESULT) 
  2776.  
  2777.  Remarks 
  2778.  
  2779.  
  2780. ΓòÉΓòÉΓòÉ 14.3. EPM_EDIT_QUERY_HELP_INSTANCE ΓòÉΓòÉΓòÉ
  2781.  
  2782. EPM_EDIT_QUERY_HELP_INSTANCE 
  2783.  
  2784.       (Query Help Instance) - Sent FROM an E-MLE window 
  2785.  
  2786.      The following is a request from the etoolkit for the handle of the help 
  2787.      instance 
  2788.  
  2789.  Parameters 
  2790.  
  2791.      param1 
  2792.  
  2793.         NULL (MPARAM) 
  2794.            Not used. 
  2795.  
  2796.      param2 
  2797.  
  2798.         NULL (MPARAM) 
  2799.            Not used. 
  2800.  
  2801.  Returns 
  2802.  
  2803.         NULL (MRESULT) 
  2804.  
  2805.  Remarks 
  2806.  
  2807.      This is how EPM.EXE handles this messages. 
  2808.  
  2809.  Example 
  2810.  
  2811.               case EPM_EDIT_QUERY_HELP_INSTANCE:
  2812.                  if(!GlobData->hwndHelpInstance) {
  2813.                     GlobData->hwndHelpInstance = WinCreateHelpInstance(GlobData->hAB,&GlobData->hmiHelpData);
  2814.                  }
  2815.                  return(GlobData->hwndHelpInstance);
  2816.                  break;
  2817.  
  2818.  
  2819. ΓòÉΓòÉΓòÉ 14.4. EPM_EDIT_DELETEFILE ΓòÉΓòÉΓòÉ
  2820.  
  2821. EPM_EDIT_DELETEFILE 
  2822.  
  2823.       Delete the file specified in mp1 from disk and free pointer 
  2824.  
  2825.  Parameters 
  2826.  
  2827.      param1 
  2828.  
  2829.         filename (PSZ) 
  2830.            Fully qualified file name. 
  2831.  
  2832.      param2 
  2833.  
  2834.         NULL (MPARAM) 
  2835.            Not used 
  2836.  
  2837.  Returns 
  2838.  
  2839.         NULL (MRESULT) 
  2840.  
  2841.  Remarks 
  2842.  
  2843.  
  2844. ΓòÉΓòÉΓòÉ 14.5. EPM_EDIT_ACTIVATEFILEID ΓòÉΓòÉΓòÉ
  2845.  
  2846. EPM_EDIT_ACTIVATEFILEID 
  2847.  
  2848.       Activate a file corresponding to the specified file identifier. 
  2849.  
  2850.  Parameters 
  2851.  
  2852.      param1 
  2853.  
  2854.         fileid (LONG) 
  2855.            A file identifier that could be obtained using the EtkQueryFileID 
  2856.            function. 
  2857.  
  2858.      param2 
  2859.  
  2860.         NULL (MPARAM) 
  2861.  
  2862.  Returns 
  2863.  
  2864.         NULL (MRESULT) 
  2865.  
  2866.  Remarks 
  2867.  
  2868.  
  2869. ΓòÉΓòÉΓòÉ 14.6. EPM_EDIT_CHAR ΓòÉΓòÉΓòÉ
  2870.  
  2871. EPM_EDIT_CHAR 
  2872.  
  2873.       (Issue a WM_CHAR message)  An alternative to the WM_CHAR message.  It is 
  2874.      handled exactly in the same manner as WM_CHAR. 
  2875.  
  2876.  Parameters 
  2877.  
  2878.      param1 
  2879.  
  2880.         mp1 (MPARAM) 
  2881.            See WM_CHAR in the PM Tech. Ref. 
  2882.  
  2883.      param2 
  2884.  
  2885.         mp2 (MPARAM) 
  2886.            See WM_CHAR in the PM Tech. Ref. 
  2887.  
  2888.  Returns 
  2889.  
  2890.  Remarks 
  2891.  
  2892.  
  2893. ΓòÉΓòÉΓòÉ 14.7. EPM_EDIT_CLIPBOARDCOPY ΓòÉΓòÉΓòÉ
  2894.  
  2895. EPM_EDIT_CLIPBOARDCOPY 
  2896.  
  2897.       Fast path to inserting text into the PM Clipboard. 
  2898.  
  2899.  Parameters 
  2900.  
  2901.      param1 
  2902.  
  2903.         pTextBuf (PVOID) 
  2904.            Pointer to a memory buffer containing text to copy to the clipboard. 
  2905.            The text is in a format described by mp2. 
  2906.  
  2907.      param2 
  2908.  
  2909.         mp2 (ULONG) 
  2910.            Flag that describes what format of the memory buffer, which was 
  2911.            passed in mp1. 
  2912.  
  2913.  Example 
  2914.  
  2915.                 0 = CF_TEXT type buffer, terminated by nul
  2916.                 1 = EPM shared memory buffer (32byte head)
  2917.  
  2918.  Returns 
  2919.  
  2920.  Remarks 
  2921.  
  2922.      When the contents of mp1 is copied to the clipboard an EPM defc event is 
  2923.      called by the name of PROCESSCLIPBOARDCOPY. Arg(1) of this function is the 
  2924.      original buffer passed in as mp1. The caller may choose to free the buffer 
  2925.      during this command. If zero is passed as arg(1), an error was 
  2926.      encountered.  An error message should be displayed at this point. 
  2927.  
  2928.  
  2929. ΓòÉΓòÉΓòÉ 14.8. EPM_EDIT_COMMAND ΓòÉΓòÉΓòÉ
  2930.  
  2931. EPM_EDIT_COMMAND 
  2932.  
  2933.       Issue a command to the E-MLE 
  2934.  
  2935.  Parameters 
  2936.  
  2937.      param1 
  2938.  
  2939.         EditCommand (PSZ) 
  2940.            Any legal editor command. (See EPM Technical Reference for build-in 
  2941.            commands, and EPM Users Guide for commands in the base E Macros) 
  2942.  
  2943.      param2 
  2944.  
  2945.         CommandFlags (ULONG) 
  2946.            The following command flags can be set with the EPM_EDIT_COMMAND 
  2947.            message: 
  2948.  
  2949.            o COMMAND_SYNC   - the command is sent to the edit interpreter 
  2950.              thread and is executed immediately or after the last command. 
  2951.  
  2952.            o COMMAND_FREESEL - free the memory point to by mp1 one when done. 
  2953.  
  2954.            o COMMAND_GETABLE - the pointer in parameter one is getable memory. 
  2955.  
  2956.  Returns   void 
  2957.  
  2958.  Remarks 
  2959.  
  2960.      This message is the main source of communication to editor windows.  To 
  2961.      send a message to a specific file, send any legal editor command (in 
  2962.      string form) to the associated edit window handle.  Legal editor commands 
  2963.      consist of any of the base editor commands or any user defined commands. 
  2964.      User commands can be created within the editor macro language via DEFC's. 
  2965.  
  2966.      For command return codes see the EPM_EDIT_RETCODE message. 
  2967.  
  2968.      See Appendix B for a complete list of commands 
  2969.  
  2970.      By default all commands sent or posted to edit windows are copied and 
  2971.      posted to the editor interpreter thread.  By setting the COMMAND_SYNC flag 
  2972.      the command is sent to the editor interpreter, therefore it will be 
  2973.      executed immediately or after the currently executing command completes. 
  2974.      Note: This creates the possibility of deadlock.  One should avoid the 
  2975.      COMMAND_SYNC flag or anything that cause one thread to wait for the other 
  2976.      thread.  Deedlock can only occur when the EPM_STYLE_ASYNC style is used 
  2977.      when creating the EMLE. When EPM_STYLE_ASYNC is specified the E 
  2978.      Interpreter runs in a separate thread. 
  2979.  
  2980.      When an application other then the one that created an edit window wishes 
  2981.      to send a command to an edit window, that application must allocate a 
  2982.      shared segment for the command string (parameter one). The COMMAND_GETABLE 
  2983.      flag notifies the E Toolkit that the pointer in parameter one is that of a 
  2984.      getable shared segment. 
  2985.  
  2986.      When an application wants the memory pointed to by parameter one to be 
  2987.      freed after it is used by the E Toolkit, the COMMAND_FREESEL flag must be 
  2988.      set. This flag is only valid for memory allocated within the application 
  2989.      that created the edit window.  A pointer to getable shared memory can't be 
  2990.      freed by the E Toolkit with this message. 
  2991.  
  2992.  
  2993. ΓòÉΓòÉΓòÉ 14.9. EPM_EDIT_COMMAND2 ΓòÉΓòÉΓòÉ
  2994.  
  2995. EPM_EDIT_COMMAND2 
  2996.  
  2997.       (Execute Command) - Sent TO an E-MLE window 
  2998.  
  2999.      Same as EPM_EDIT_COMMAND, but if the command does not exist, no error 
  3000.      message is generated. 
  3001.  
  3002.  Parameters 
  3003.  
  3004.      param1 
  3005.  
  3006.          () 
  3007.            See EPM_EDIT_COMMAND 
  3008.  
  3009.      param2 
  3010.  
  3011.          () 
  3012.            See EPM_EDIT_COMMAND 
  3013.  
  3014.  Returns  See EPM_EDIT_COMMAND 
  3015.  
  3016.  Remarks 
  3017.  
  3018.  
  3019. ΓòÉΓòÉΓòÉ 14.10. EPM_EDIT_RETCODE ΓòÉΓòÉΓòÉ
  3020.  
  3021. EPM_EDIT_RETCODE 
  3022.  
  3023.       Message return code from an edit command. 
  3024.  
  3025.  Parameters 
  3026.  
  3027.      param1 
  3028.  
  3029.         ReturnCodeString (PSZ) 
  3030.             Text describing the return code. 
  3031.  
  3032.      param2 
  3033.  
  3034.         ReturnCode (ULONG) 
  3035.             specific editor return code. 
  3036.  
  3037.  Remarks 
  3038.  
  3039.       This message is in response to a internal editor return code or error 
  3040.      code.  See Appendix C for editor return codes. 
  3041.  
  3042.  
  3043. ΓòÉΓòÉΓòÉ 14.11. EPM_EDIT_CURSORMOVE ΓòÉΓòÉΓòÉ
  3044.  
  3045. EPM_EDIT_CURSORMOVE 
  3046.  
  3047.       Cursor move notification. 
  3048.  
  3049.  Parameters 
  3050.  
  3051.      param1 
  3052.  
  3053.         row (ULONG) 
  3054.             row of cursor in file 
  3055.  
  3056.      param2 
  3057.  
  3058.         column (ULONG) 
  3059.             column of cursor in file 
  3060.  
  3061.  Remarks 
  3062.  
  3063.       This message gives the owner the ability to track the editor's cursor. 
  3064.      See sample 1. 
  3065.  
  3066.  
  3067. ΓòÉΓòÉΓòÉ 14.12. EPM_EDIT_ACTIVEHWND ΓòÉΓòÉΓòÉ
  3068.  
  3069. EPM_EDIT_ACTIVEHWND 
  3070.  
  3071.       Notify application that a specific edit window has become active. 
  3072.  
  3073.  Parameters 
  3074.  
  3075.      param1 
  3076.  
  3077.         HwndEMLE (HWND) 
  3078.             Handle of active edit window. 
  3079.  
  3080.      param2 
  3081.  
  3082.         ActiveFileName (PSZ) 
  3083.             Full path of top most file being edited in active edit window. 
  3084.  
  3085.  Remarks 
  3086.  
  3087.       Processing this message is useful if more than one edit window is being 
  3088.      used by a given application.  The application does not need to keep global 
  3089.      information on each edit window because it is returned via this message. 
  3090.  
  3091.  
  3092. ΓòÉΓòÉΓòÉ 14.13. EPM_EDIT_OPTIONS ΓòÉΓòÉΓòÉ
  3093.  
  3094. EPM_EDIT_OPTIONS 
  3095.  
  3096.       (Get Editor Option Information) - Sent TO E-MLE 
  3097.  
  3098.      Get a specified piece of editor information. 
  3099.  
  3100.  Parameters 
  3101.  
  3102.      param1 
  3103.  
  3104.         OptionNumber (ULONG) 
  3105.             OPTIONS_xxxxx constant.  (See Remarks.) 
  3106.  
  3107.      param2 
  3108.  
  3109.         Buffer (PVOID) 
  3110.             Used by some options. 
  3111.  
  3112.  Returns The returned value depends on the option selected. 
  3113.  
  3114.  Parameter 1 can be set to one of the following options: 
  3115.  
  3116.  OPTIONS_MARGINS Returns 4 bytes containing (lo to hi): left marg (CHAR), right 
  3117.            marg (CHAR), paragraph margin (CHAR), 0 (CHAR). 
  3118.  OPTIONS_LINE Returns line of file that contains the cursor. (ULONG) 
  3119.  OPTIONS_COLUMN Returns column of file that contains the cursor. (ULONG) 
  3120.  OPTIONS_INSERT Returns TRUE if cursor is in insert mode. (ULONG) 
  3121.  OPTIONS_AUTOSAVE Returns the number of changes before autosave. (ULONG) 
  3122.  OPTIONS_NTABS Returns the number of tab stops. (ULONG) 
  3123.  OPTIONS_NROWS Returns the total number of rows visible in the E-MLE. (uses the 
  3124.            default font height as a measument.) 
  3125.  OPTIONS_NCOLS Returns the total number of columns visible in the E-MLE. (uses 
  3126.            the default font width as a measument.) (ULONG) 
  3127.  OPTIONS_MODIFY Returns TRUE if the file has been modified. (last save) (ULONG) 
  3128.  OPTIONS_TAB Returns a pointer to a byte-table of tab values. The table is 
  3129.            terminated by a NULL character. (PBYTE) 
  3130.  OPTIONS_SEARCH Returns the last string searched by locate or change. (PSZ) 
  3131.  OPTIONS_GETTEXT Returns the line of text specified by high word of option 
  3132.            parameter. If high word is NULL the the line in which the cursor is 
  3133.            currently on is returned.  Parameter 2 must contain a pointer to a 
  3134.            MAXCOL byte character array.  The specified line will be placed into 
  3135.            this buffer.  (PSZ) 
  3136.  OPTIONS_NAME Returns the name of the visible file. 
  3137.  OPTIONS_TEXTCOLOR Returns the text Foreground (LOUSHORT) and Background 
  3138.            (HIUSHORT). 
  3139.  OPTIONS_RING Returns a buffer filled with the name of the files within the 
  3140.            E-MLE ring.  The buffer has the following format: 
  3141.  
  3142.  Example 
  3143.  
  3144.               USHORT  - length of filenames
  3145.               UCHAR   - delimitor
  3146.               FIDTYPE - fileid
  3147.               CHAR[]  - delimited string
  3148.  
  3149.  OPTIONS_FILEID Returns the File ID of the visible file. 
  3150.  OPTIONS_QSELECTION Returns the type of selection. 
  3151.   This message is send to a edit window to get a specified option.  All options 
  3152.  are returned in the form of a 4 byte return code.  Here is an example of using 
  3153.  the Option message to get the total numbers of visible lines in a edit window. 
  3154.  
  3155.  Example 
  3156.  
  3157.              VisibleLines = (ULONG)WinSendMsg( hwndEditWindow,
  3158.                                                EPM_EDIT_OPTIONS,
  3159.                                                OPTIONS_NROWS,
  3160.                                                0L
  3161.                                              );
  3162.  
  3163.  
  3164. ΓòÉΓòÉΓòÉ 14.14. EPM_EDIT_ID ΓòÉΓòÉΓòÉ
  3165.  
  3166. EPM_EDIT_ID 
  3167.  
  3168.       Query Editor ID number 
  3169.      Purpose Determine if a window handle is your E-MLE window. 
  3170.  
  3171.  Parameters 
  3172.  
  3173.      param1 
  3174.  
  3175.         NULL (MPARAM) 
  3176.            Not used 
  3177.  
  3178.      param2 
  3179.  
  3180.         NULL (MPARAM) 
  3181.            Not used 
  3182.  
  3183.  Remarks 
  3184.  
  3185.       This message is used to determine if a window handle is an EMLE window 
  3186.      handle.  This message returns a 32 bit return code.  To determine if the 
  3187.      specified handle is a edit window  check if the Hi-order word contains the 
  3188.      value of EPM_EDIT_ID and the Lo-order word contains the value specified in 
  3189.      the EMLE create structure field, 'editid'.  If a match is found in the 
  3190.      Hi-order word then the window handle is a edit window. If a match is found 
  3191.      in both the Hi-order word and the Lo-order word, then the window handle is 
  3192.      a edit window created by your application.  An example follows: 
  3193.  
  3194.  Example 
  3195.  
  3196.                 result = WinSendMsg( hwndE, EPM_EDIT_ID, 0L, 0L );
  3197.                 match  = MPFROM2SHORT(epm.editid,EPM_EDIT_ID);
  3198.  
  3199.                 if (result==match) {
  3200.                     /* Edit window found */
  3201.                 }
  3202.  
  3203.  
  3204. ΓòÉΓòÉΓòÉ 14.15. EPM_EDIT_SHOW ΓòÉΓòÉΓòÉ
  3205.  
  3206. EPM_EDIT_SHOW 
  3207.  
  3208.       Refresh and Show/Hide the edit window specified. 
  3209.  
  3210.  Parameters 
  3211.  
  3212.      param1 
  3213.  
  3214.         ShowFlag (BOOL) 
  3215.            TRUE  = Show and Refresh edit window 
  3216.  
  3217.            FALSE = Hide edit window 
  3218.  
  3219.      param2 
  3220.  
  3221.         NULL (MRESULT) 
  3222.            Not used 
  3223.  
  3224.  Remarks 
  3225.  
  3226.       It is recommended that an EPM_EDIT_SHOW message be sent to the edit 
  3227.      window to be displayed or hidden instead of WinShowWindow(...).  The 
  3228.      difference being EPM_EDIT_SHOW forces a window repaint. 
  3229.  
  3230.  
  3231. ΓòÉΓòÉΓòÉ 14.16. EPM_EDIT_DESTROYNOTIFY ΓòÉΓòÉΓòÉ
  3232.  
  3233. EPM_EDIT_DESTROYNOTIFY 
  3234.  
  3235.       Notify owner that an E-MLE window has been closed. 
  3236.  
  3237.  Parameters 
  3238.  
  3239.      param1 
  3240.  
  3241.         HwndEMLE (HWND) 
  3242.            Window handle of the E-MLE window that was just closed. 
  3243.  
  3244.      param2 
  3245.  
  3246.         MsgQueue (HMQ) 
  3247.            Handle to the message queue formally being used by the E-MLE window 
  3248.            that was just closed. 
  3249.  
  3250.  Returns   void 
  3251.  
  3252.  Remarks 
  3253.  
  3254.       This message gives the owner the ability to take some action when a edit 
  3255.      window is closed.  Note that the window handle passed is not valid since 
  3256.      the edit window has been destroyed.  It is to be used for reference only. 
  3257.      This is the only message that is sent to the owner of the edit window. 
  3258.  
  3259.  
  3260. ΓòÉΓòÉΓòÉ 14.17. EPM_EDIT_RECORDKEY ΓòÉΓòÉΓòÉ
  3261.  
  3262. EPM_EDIT_RECORDKEY 
  3263.  
  3264.       Start the recording of keystrokes (WM_CHAR messages) sent to the edit 
  3265.      window. 
  3266.  
  3267.  Parameters 
  3268.  
  3269.      param1 
  3270.  
  3271.         NULL (MPARAM) 
  3272.            Not used 
  3273.  
  3274.      param2 
  3275.  
  3276.         NULL (MPARAM) 
  3277.            Not used 
  3278.  
  3279.  Returns   void 
  3280.  
  3281.  Remarks 
  3282.  
  3283.  
  3284. ΓòÉΓòÉΓòÉ 14.18. EPM_EDIT_ENDRECORDKEY ΓòÉΓòÉΓòÉ
  3285.  
  3286. EPM_EDIT_ENDRECORDKEY 
  3287.  
  3288.       Terminates the storing of keystrokes (WM_CHAR messages) started by the 
  3289.  
  3290.      EPM_EDIT_RECORDKEY message. 
  3291.  
  3292.  Parameters 
  3293.  
  3294.      param1 
  3295.  
  3296.         NULL (MPARAM) 
  3297.            Not used 
  3298.  
  3299.      param2 
  3300.  
  3301.         NULL (MPARAM) 
  3302.            Not used 
  3303.  
  3304.  Returns void 
  3305.  
  3306.  Remarks 
  3307.  
  3308.  
  3309. ΓòÉΓòÉΓòÉ 14.19. EPM_EDIT_PLAYKEY ΓòÉΓòÉΓòÉ
  3310.  
  3311. EPM_EDIT_PLAYKEY 
  3312.  
  3313.       (Execute stored keystrokes) - Sent TO an E-MLE 
  3314.  
  3315.      Generate keystrokes (WM_CHAR messages) saved since the EPM_EDIT_RECORDKEY 
  3316.      message has been sent. 
  3317.  
  3318.  Parameters 
  3319.  
  3320.      param1 
  3321.  
  3322.         NULL (MPARAM) 
  3323.            Not used 
  3324.  
  3325.      param2 
  3326.  
  3327.         NULL (MPARAM) 
  3328.  
  3329.  Returns void 
  3330.  
  3331.  Remarks 
  3332.  
  3333.       It is recommend that a EPM_EDIT_ENDRECORDKEY message be sent before this 
  3334.      message is sent.  If the edit window is still in record mode when the 
  3335.      message is sent an error message is sent to the owner window. 
  3336.  
  3337.  
  3338. ΓòÉΓòÉΓòÉ 14.20. EPM_EDIT_QUERYRECORDKEY ΓòÉΓòÉΓòÉ
  3339.  
  3340. EPM_EDIT_QUERYRECORDKEY 
  3341.  
  3342.       (Determine record key state) 
  3343.  
  3344.      Returns TRUE if edit window is recording keys. 
  3345.  
  3346.      param1 
  3347.  
  3348.         NULL (MPARAM) 
  3349.            Not used 
  3350.  
  3351.      param2 
  3352.  
  3353.         NULL (MPARAM) 
  3354.  
  3355.  Returns TRUE = edit window is recording keys. 
  3356.  
  3357.  Remarks 
  3358.  
  3359.  
  3360. ΓòÉΓòÉΓòÉ 14.21. EPM_EDIT_ASKTOQUIT ΓòÉΓòÉΓòÉ
  3361.  
  3362. EPM_EDIT_ASKTOQUIT 
  3363.  
  3364.       (Request to quit a modified file) 
  3365.  
  3366.      Notify application that a request has been sent to quit a file which has 
  3367.      been modified. 
  3368.  
  3369.  Parameters 
  3370.  
  3371.      param1 
  3372.  
  3373.         filename (PSZ) 
  3374.            Name of file that has been modified. 
  3375.  
  3376.      param2 
  3377.  
  3378.         HwndEMLE (HWND) 
  3379.            The edit window's handle. 
  3380.  
  3381.  Remarks 
  3382.  
  3383.       This message is sent after the E toolkit has received notice to quit a 
  3384.      modified file. The application must respond to this message by sending an 
  3385.      EPM_EDIT_ASKTODONE message. When an application receives this message it 
  3386.      is a good time to pop a dialog to the user asking what action to take. 
  3387.      (See the Quitbox dialog for an example ) 
  3388.  
  3389.  Related Information 
  3390.  
  3391.  Example 
  3392.  
  3393.            EPM_EDIT_ASKTOCLOSE
  3394.            EPM_EDIT_ASKTOFAILED
  3395.            EPM_EDIT_ASKTODONE
  3396.  
  3397.  
  3398. ΓòÉΓòÉΓòÉ 14.22. EPM_EDIT_ASKTOCLOSE ΓòÉΓòÉΓòÉ
  3399.  
  3400. EPM_EDIT_ASKTOCLOSE 
  3401.  
  3402.       (Request to close an edit window) 
  3403.  
  3404.      Notify application that a request has be sent to close an edit window 
  3405.      which contains a file that has been modified. 
  3406.  
  3407.  Parameters 
  3408.  
  3409.      param1 
  3410.  
  3411.         filename (PSZ) 
  3412.            Name of file that has been modified. 
  3413.  
  3414.      param2 
  3415.  
  3416.         HwndEMLE (HWND) 
  3417.            The edit window's handle. 
  3418.  
  3419.  Remarks 
  3420.  
  3421.       This message is sent after the E toolkit has received notice to close an 
  3422.      edit window which contains a modified file. The application must respond 
  3423.      to this message by sending an EPM_EDIT_ASKKTODONE message. 
  3424.  
  3425.  Related Information 
  3426.  
  3427.  Example 
  3428.  
  3429.            EPM_EDIT_ASKTOQUIT
  3430.            EPM_EDIT_ASKTOFAILED
  3431.            EPM_EDIT_ASKTODONE
  3432.  
  3433.  
  3434. ΓòÉΓòÉΓòÉ 14.23. EPM_EDIT_ASKTODONE ΓòÉΓòÉΓòÉ
  3435.  
  3436. EPM_EDIT_ASKTODONE 
  3437.  
  3438.       (Respond to EPM_EDIT_ASKTOxxx message) 
  3439.  
  3440.      Respond to one of the EPM_EDIT_ASKTOxxx messages from the E toolkit. 
  3441.  
  3442.  Parameters 
  3443.  
  3444.      param1 
  3445.  
  3446.         retcode (ULONG) 
  3447.             Response message sent to E toolkit. One of the following messages 
  3448.            can be used: 
  3449.  
  3450.            o ERES_CANCEL  - Cancel the closing of the file or edit window. 
  3451.  
  3452.            o ERES_DISCARD - Discard the modifications and continue closing. 
  3453.  
  3454.            o ERES_SAVE   - Save file as message parameter two and continue 
  3455.              closing. 
  3456.  
  3457.      param2 
  3458.  
  3459.         filename (PSZ) 
  3460.            Name of file to save modifications in if EPM_SAVE is sent. This 
  3461.            pointer must be the same pointer sent to the applications with one 
  3462.            of the EPM_EDIT_ASKTOxxx messages. 
  3463.  
  3464.  Remarks 
  3465.  
  3466.       This message allows the application control the saving or discarding of a 
  3467.      modified file when an edit window is closing, a quit file message has been 
  3468.      sent, or when a previous EPM_EDIT_ASKTODONE message returned 
  3469.      EPM_EDIT_ASKTOFAILED. 
  3470.  
  3471.  Related Information 
  3472.  
  3473.  Example 
  3474.  
  3475.            EPM_EDIT_ASKTQUIT
  3476.            EPM_EDIT_ASKTOCLOSE
  3477.            EPM_EDIT_ASKTODONE
  3478.  
  3479.  
  3480. ΓòÉΓòÉΓòÉ 14.24. EPM_EDIT_ASKTOFAILED ΓòÉΓòÉΓòÉ
  3481.  
  3482. EPM_EDIT_ASKTOFAILED 
  3483.  
  3484.       (Last EPM_EDIT_ASKTODONE failed) 
  3485.  
  3486.      Notify application that the file name sent with the last 
  3487.      EPM_EDIT_ASKTODONE message could not be saved with the name specified. 
  3488.  
  3489.  Parameters 
  3490.  
  3491.      param1 
  3492.  
  3493.         filename (PSZ) 
  3494.            File name used which caused an error in saving. 
  3495.  
  3496.      param2 
  3497.  
  3498.         HwndEMLE (HWND) 
  3499.            The window handle of the EMLE. 
  3500.  
  3501.  Remarks 
  3502.  
  3503.       This message informs the application that the file name sent with the 
  3504.      EPM_EDIT_ASKTODONE message and message parameter EPM_SAVE, was a bad file 
  3505.      name. The application should correct the file name and send another 
  3506.      EPM_EDIT_ASKTODONE message. 
  3507.  
  3508.  Related Information 
  3509.  
  3510.  Example 
  3511.  
  3512.            EPM_EDIT_ASKTQUIT
  3513.            EPM_EDIT_ASKTOCLOSE
  3514.            EPM_EDIT_ASKTOFAILED
  3515.  
  3516.  
  3517. ΓòÉΓòÉΓòÉ 14.25. EFRAMEM_TOGGLECONTROL ΓòÉΓòÉΓòÉ
  3518.  
  3519. EFRAMEM_TOGGLECONTROL 
  3520.  
  3521.       (Toggle controls of an EFrame) 
  3522.  
  3523.      Toggling, or setting on or off the controls of an EFrame. 
  3524.  
  3525.  Parameters 
  3526.  
  3527.      param1 
  3528.  
  3529.         EFrameControl (ULONG) 
  3530.            The lo-ordered short of this parameter contains an id number that 
  3531.            determines the control window. It can be any of the EFRAMEF_* 
  3532.            constants. 
  3533.  
  3534.            The hi-ordered short of this message parameter contains an optional 
  3535.            value.  If the value is 0 then the specified control is toggled. If 
  3536.            the value is set to 1 then the control is not shown. If the value is 
  3537.            set to 2 the control is shown. 
  3538.  
  3539.      param2 
  3540.  
  3541.         QueryControl (ULONG) 
  3542.            contains a Query Flag.  If parameter 2 is non-zero the current 
  3543.            status of the control specified is returned. 
  3544.  
  3545.  Remarks 
  3546.  
  3547.  Related Information 
  3548.  
  3549.  Example 
  3550.  
  3551.  
  3552. ΓòÉΓòÉΓòÉ 14.26. EPM_QUERYHINI ΓòÉΓòÉΓòÉ
  3553.  
  3554. EPM_QUERYHINI 
  3555.  
  3556.      Request from the Base E Macros for the handle to the INI file to use to 
  3557.      store its information in. 
  3558.  
  3559.  Parameters 
  3560.  
  3561.      param1 
  3562.  
  3563.         NULL (MPARAM) 
  3564.  
  3565.      param2 
  3566.  
  3567.         NULL (MPARAM) 
  3568.  
  3569.  Returns 
  3570.  
  3571.         Hini (HINI) 
  3572.            The handle to your applications INI file. 
  3573.  
  3574.  Remarks 
  3575.  
  3576.      The Base E Macros stores various information in the HINI file such as the 
  3577.      default font and color. In addition all information set when using the 
  3578.      Settings Dialog is stored in this INI file. 
  3579.  
  3580.  
  3581. ΓòÉΓòÉΓòÉ 15. Etk Types ΓòÉΓòÉΓòÉ
  3582.  
  3583.  
  3584. ΓòÉΓòÉΓòÉ 15.1. ATTRIBRECTYPE ΓòÉΓòÉΓòÉ
  3585.  
  3586.  
  3587.  ATTRIBRECTYPE - Attribute Record Type 
  3588.  
  3589.  
  3590.           typedef struct {
  3591.             USHORT          Col;    //Column of the attribute record
  3592.             ATTRIBCLASSTYPE Class;  //Attribute Class
  3593.             UCHAR           IsPush; //1=Push Attribute, 2=POP Attribute
  3594.             ATTRIBVALUETYPE Value;  //Value of the Attribute.
  3595.                                     //The meaning of the value field depends on the
  3596.                                     //attribute class being used.
  3597.           } ATTRIBRECTYPE;
  3598.  
  3599.  Remarks 
  3600.  
  3601.      See the section "Attribute Pairs" in "The EPM Technical Reference" for a 
  3602.      description of Attribute support. 
  3603.  
  3604.      The only Classes currently supplied by the Tool-Kit are COLORCLASS and 
  3605.      FONTCLASS. In order for Color and Font Attributes to be rendered the 
  3606.      .levelofattributesupport file variable must be set to the correct value. 
  3607.      See "The EPM Technical Reference" for more information about 
  3608.      .levelofattributesupport. 
  3609.  
  3610.      The COLORCLASS currently supports only 16 colors. The Value field for the 
  3611.      COLORCLASS is a byte with the high nibble being the background color and 
  3612.      the low nibble being the foreground color. Use the CLR_* color constants 
  3613.      defined in the OS/2 Programming Tool-Kit. 
  3614.  
  3615.      When using the FONTCLASS the Value field is set to a Font ID gotten with 
  3616.      either EtkRegisterFont() or EtkRegisterFont2(). 
  3617.  
  3618.      See sample 4 for an example of using the Font and Color Class. 
  3619.  
  3620.      Users can also add their own Attribute Classes. 
  3621.  
  3622.  
  3623. ΓòÉΓòÉΓòÉ 15.2. ATTRSTRING ΓòÉΓòÉΓòÉ
  3624.  
  3625.  
  3626.  ATTRSTRING - Attribute String type 
  3627.  
  3628.           typedef struct _ATTRSTRING {
  3629.              PATTRIBRECTYPE ALAttr;  //Pointer to the attribute record one element
  3630.                                      //beyond the last attribute record.
  3631.              PATTRIBRECTYPE Attrs;   //Pointer to the array of attribute records
  3632.                                      //for the line.
  3633.              PCHAR          SelfPtr; //Pointer to this structure.
  3634.              SHORT          TextLen; //Length of the Text string.
  3635.              CHAR           Text[1]; //Text buffer.
  3636.           } ATTRSTRING;
  3637.  
  3638.  Remarks 
  3639.  
  3640.      This structure should be dynamically allocated by your application. The 
  3641.      size allocated for the structure should be the size of ATTRSTRING plus the 
  3642.      length of the string to be copied to the Text field. See the example in 
  3643.      the section on EtkInsertText(). Since the ALAttr field is required, the 
  3644.      Attribute Record array must be allocated with at least 2 elements. The 
  3645.      Attrs field and ALAttr field can't be set to the same value. 
  3646.  
  3647.  
  3648. ΓòÉΓòÉΓòÉ 15.3. LSTRING ΓòÉΓòÉΓòÉ
  3649.  
  3650.  
  3651.  LSTRING - Length String 
  3652.  
  3653.  
  3654.                typedef struct {
  3655.                   LSTRINGLENTYPE lsLength;     //length of the string
  3656.                   unsigned char  Data[MAXCOL]; //string
  3657.                } LSTRING;
  3658.  
  3659.  Remarks 
  3660.  
  3661.      LSTRING types are used by some of the Etk functions. 
  3662.  
  3663.  
  3664. ΓòÉΓòÉΓòÉ 15.4. Sample 1 ΓòÉΓòÉΓòÉ
  3665.  
  3666.  
  3667. ΓòÉΓòÉΓòÉ 15.5. Sample 2 ΓòÉΓòÉΓòÉ
  3668.  
  3669.  
  3670. ΓòÉΓòÉΓòÉ 15.6. Sample 3 ΓòÉΓòÉΓòÉ
  3671.  
  3672.  
  3673. ΓòÉΓòÉΓòÉ 15.7. Sample 4 ΓòÉΓòÉΓòÉ
  3674.  
  3675.  
  3676. ΓòÉΓòÉΓòÉ 16. Appendix ΓòÉΓòÉΓòÉ
  3677.  
  3678.  
  3679. ΓòÉΓòÉΓòÉ 16.1. Appendix A - Static Subclassing ΓòÉΓòÉΓòÉ
  3680.  
  3681.  
  3682. ΓòÉΓòÉΓòÉ 16.1.1. Static subclassing of an E-MLE ΓòÉΓòÉΓòÉ
  3683.  
  3684. When an application needs to process all message sent to an E-MLE including 
  3685. initial messages such as WM_CREATE, then static subclassing of the E-MLE 
  3686. control is required. Your application must take the following steps to 
  3687. statically subclass an E-MLE: 
  3688.  
  3689.       1. Call EtkRegisterEMLEClass(), to register the E-MLE window class. 
  3690.  
  3691.  Example 
  3692.  
  3693.              PSZ EMLEClassName;
  3694.  
  3695.              EMLEClassName = EtkRegisterEMLEClass(hab);
  3696.  
  3697.       2. Query the E-MLE class information.  Class information required 
  3698.          includes a pointer to the E-MLEs window procedure.  The pointer to the 
  3699.          E-MLEs window procedure should be stored and used in your new window 
  3700.          procedure for any messages you will not be processing.  In addition if 
  3701.          you want to reserve additional window word storage you can query the 
  3702.          amount used by the E-MLE and add the amount that your application 
  3703.          requires. 
  3704.  
  3705.  Example 
  3706.  
  3707.  
  3708.               CLASSINFO EMLEClassInfo, NewClassInfo;
  3709.               PFNWP     DefaultEMLEWndProc;
  3710.               USHORT    WindowWords;
  3711.               PSZ       MY_MLECLASS="MyMLE";
  3712.               ULONG     WindowClassStyle;
  3713.  
  3714.               //Query E-MLE class information
  3715.               WinQueryClassInfo(hab, EMLEClassName, &EMLEClassInfo);
  3716.  
  3717.               //Store the E-MLEs window procedure
  3718.               DefaultEMLEWndProc = EMLEClass.pfnWindowProc;
  3719.  
  3720.               //Add four more bytes to the window word storage
  3721.               WindowWords      = EMLEClassInfo.cbWindowData + 4;
  3722.  
  3723.               //Retain the same class style as the E-MLE
  3724.               WindowClassStyle = EMLEClassInfo.flClassStyle;
  3725.  
  3726.       3. Register your new window class. 
  3727.  
  3728.  Example 
  3729.  
  3730.               //Register the new window class.
  3731.               //When the window is created your window procedure will be called.
  3732.               //It is your applications responsibility to call the E-MLEs window
  3733.               //procedure for messages you will not process.
  3734.               WinRegisterClass(hab, MY_MLECLASS, MY_MLEWndProc, flStyle, WindowWords);
  3735.  
  3736.       4. Call WinCreateWindow() using the window class you have registered. 
  3737.  
  3738.  Example 
  3739.  
  3740.  
  3741.               HwndEMLE = WinCreateWindow(HwndParent,
  3742.                                          MY_MLECLASS,
  3743.                                          NULL,
  3744.                                          0L,
  3745.                                          10, 10, 200, 400,
  3746.                                          HwndOwner,
  3747.                                          HWND_TOP,
  3748.                                          My_EMLE_ID,
  3749.                                          NULL);
  3750.  
  3751.  
  3752. ΓòÉΓòÉΓòÉ 16.2. Appendix A1 - Field Constants ΓòÉΓòÉΓòÉ
  3753.  
  3754.  
  3755. ΓòÉΓòÉΓòÉ 16.2.1. Field Constants ΓòÉΓòÉΓòÉ
  3756.  
  3757. See EPM Technical Reference for a description of the field variables. All field 
  3758. variable constants are defined in edll.h. 
  3759.  
  3760.  
  3761. ΓòÉΓòÉΓòÉ 16.3. Appendix B - Editor Commands ΓòÉΓòÉΓòÉ
  3762.  
  3763.  
  3764. ΓòÉΓòÉΓòÉ 16.3.1. Editor Commands. ΓòÉΓòÉΓòÉ
  3765.  
  3766. See EPM Users Guide for a list of editor Commands. Note some commands are 
  3767. built-in commands while others are part of the base E Macros. 
  3768.  
  3769.  
  3770. ΓòÉΓòÉΓòÉ 16.4. Appendix C - Editor Return codes ΓòÉΓòÉΓòÉ
  3771.  
  3772.  
  3773. ΓòÉΓòÉΓòÉ 16.4.1. Editor Return codes ΓòÉΓòÉΓòÉ
  3774.  
  3775.  Example 
  3776.  
  3777.             .----------------------------------------------------------.
  3778.             | Descriptor Constant                 | Return Code Value  |
  3779.             |----------------------------------------------------------|
  3780.             | SEE_MESSAGE                         |  0                 |
  3781.             |----------------------------------------------------------|
  3782.             | FILE_NOT_FOUND_RC                   | -2                 |
  3783.             |----------------------------------------------------------|
  3784.             | PATH_NOT_FOUND_RC                   | -3                 |
  3785.             |----------------------------------------------------------|
  3786.             | TOO_MANY_OPEN_FILES_RC              | -4                 |
  3787.             |----------------------------------------------------------|
  3788.             | ACCESS_DENIED_RC                    | -5                 |
  3789.             |----------------------------------------------------------|
  3790.             | MEMORY_CONTROL_BLOCKS_RC            | -7                 |
  3791.             |----------------------------------------------------------|
  3792.             | INSUFFICIENT_MEMORY_RC              | -8                 |
  3793.             |----------------------------------------------------------|
  3794.             | INVALID_DRIVE_RC                    | -15                |
  3795.             |----------------------------------------------------------|
  3796.             | NO_MORE_FILES_RC                    | -18                |
  3797.             |----------------------------------------------------------|
  3798.             | NUMERIC_OVERFLOW_RC                 | -254               |
  3799.             |----------------------------------------------------------|
  3800.             | INVALID_NUMBER_ARGUMENT_RC          | -255               |
  3801.             |----------------------------------------------------------|
  3802.             | RECURSION_TOO_DEEP_RC               | -256               |
  3803.             |----------------------------------------------------------|
  3804.             | INVALID_NUMBER_OF_PARAMETERS_RC     | -257               |
  3805.             |----------------------------------------------------------|
  3806.             | OUT_OF_STRING_SPACE_RC              | -258               |
  3807.             |----------------------------------------------------------|
  3808.             | EXPRESSION_STACK_OVERFLOW_RC        | -259               |
  3809.             |----------------------------------------------------------|
  3810.             | INVALID_FILEID_RC                   | -260               |
  3811.             |----------------------------------------------------------|
  3812.             | ILLEGAL_OPCODE_RC                   | -261               |
  3813.             |----------------------------------------------------------|
  3814.             | TOO_MANY_WINDOWS_RC                 | -262               |
  3815.             |----------------------------------------------------------|
  3816.             | INVALID_ARGUMENT_RC                 | -263               |
  3817.             |----------------------------------------------------------|
  3818.             | LOOP_STACK_OVERFLOW_RC              | -264               |
  3819.             |----------------------------------------------------------|
  3820.             | DIVIDE_BY_ZERO_RC                   | -265               |
  3821.             |----------------------------------------------------------|
  3822.             | UNABLE_TO_SHRINK_RC                 | -266               |
  3823.             |----------------------------------------------------------|
  3824.             | INVALID_CALL_BY_REFERENCE_RC        | -267               |
  3825.             |----------------------------------------------------------|
  3826.             | PROCEDURE_NEEDS_MORE_ARGUMENTS_     | -268               |
  3827.             |----------------------------------------------------------|
  3828.             | BREAK_KEY_PRESSED_RC                | -269               |
  3829.             |----------------------------------------------------------|
  3830.             | NOT_ENOUGH_MEMORY_RC                | -270               |
  3831.             +.---------------------------------------------------------+
  3832.  
  3833.  Example 
  3834.  
  3835.  
  3836.             +----------------------------------------------------------+
  3837.             | ERROR_IN_MARGIN_SETTINGS_RC         | -271               |
  3838.             |----------------------------------------------------------|
  3839.             | ERROR_IN_TAB_SETTINGS_RC            | -272               |
  3840.             |----------------------------------------------------------|
  3841.             | STRING_NOT_FOUND_RC                 | -273               |
  3842.             |----------------------------------------------------------|
  3843.             | UNKNOWN_COMMAND_RC                  | -274               |
  3844.             |----------------------------------------------------------|
  3845.             | MISSING_FILENAME_RC                 | -275               |
  3846.             |----------------------------------------------------------|
  3847.             | LINE_TOO_LONG_TO_JOIN_RC            | -276               |
  3848.             |----------------------------------------------------------|
  3849.             | TOO_MANY_FILES_RC                   | -277               |
  3850.             |----------------------------------------------------------|
  3851.             | LINES_TRUNCATED_RC                  | -278               |
  3852.             |----------------------------------------------------------|
  3853.             | TEXT_ALREADY_MARKED_RC              | -279               |
  3854.             |----------------------------------------------------------|
  3855.             | TEXT_NOT_MARKED_RC                  | -280               |
  3856.             |----------------------------------------------------------|
  3857.             | SOURCE_DEST_CONFLICT_RC             | -281               |
  3858.             |----------------------------------------------------------|
  3859.             | NEW_FILE_RC                         | -282               |
  3860.             |----------------------------------------------------------|
  3861.             | LINE_MARK_REQUIRED_RC               | -283               |
  3862.             |----------------------------------------------------------|
  3863.             | ERROR_OPENING_FILE_RC               | -284               |
  3864.             |----------------------------------------------------------|
  3865.             | ERROR_WRITING_FILE_RC               | -285               |
  3866.             |----------------------------------------------------------|
  3867.             | ERROR_READING_FILE_RC               | -286               |
  3868.             |----------------------------------------------------------|
  3869.             | INSUFFICIENT_DISK_SPACE_RC          | -287               |
  3870.             |----------------------------------------------------------|
  3871.             | BLOCK_MARK_REQUIRED_RC              | -288               |
  3872.             |----------------------------------------------------------|
  3873.             | TOO_MANY_RINGS_RC                   | -289               |
  3874.             |----------------------------------------------------------|
  3875.             | INCORRECT_VERSION_RC                | -290               |
  3876.             |----------------------------------------------------------|
  3877.             | NO_MAIN_ENTRY_POINT_RC              | -291               |
  3878.             |----------------------------------------------------------|
  3879.             | ERROR_CLOSING_FILE_RC               | -292               |
  3880.             |----------------------------------------------------------|
  3881.             | CMDLINE_TOO_LONG_RC                 | -300               |
  3882.             |----------------------------------------------------------|
  3883.             | CANT_UNLINK_MOD_IN_USE_RC           | -301               |
  3884.             |----------------------------------------------------------|
  3885.             | CANT_UNLINK_KEY_MOD_RC              | -302               |
  3886.             |----------------------------------------------------------|
  3887.             | INTERNAL_INVALID_MOD_NBR_RC         | -303               |
  3888.             |----------------------------------------------------------|
  3889.             | LINK_MODULE_ERROR_RC                | -304               |
  3890.             +----------------------------------------------------------+
  3891.  
  3892.  Example 
  3893.  
  3894.             +----------------------------------------------------------+
  3895.             | MAIN_NOT_FOUND_RC                   | -305               |
  3896.             |----------------------------------------------------------|
  3897.             | INIT_NOT_FOUND_RC                   | -306               |
  3898.             |----------------------------------------------------------|
  3899.             | LOADFILE_FINDFILE_RC                | -307               |
  3900.             |----------------------------------------------------------|
  3901.             | LOADFILE_MAKEFILE_RC                | -308               |
  3902.             |----------------------------------------------------------|
  3903.             | LOADFILE_ALREADYLINKED_RC           | -309               |
  3904.             |----------------------------------------------------------|
  3905.             | UNLINK_UNKNOWN_MODULE_RC            | -310               |
  3906.             |----------------------------------------------------------|
  3907.             | UNLINK_BAD_MODULE_FN_RC             | -311               |
  3908.             |----------------------------------------------------------|
  3909.             | CALL_DUPLICATED_PROC_RC             | -312               |
  3910.             |----------------------------------------------------------|
  3911.             | CALL_UNKNOWN_PROC_RC                | -313               |
  3912.             |----------------------------------------------------------|
  3913.             | GREP_MEMORY_ERROR                   | -314               |
  3914.             |----------------------------------------------------------|
  3915.             | GREP_MISSING_BRACKET                | -315               |
  3916.             |----------------------------------------------------------|
  3917.             | GREP_BAD_RANGE                      | -316               |
  3918.             |----------------------------------------------------------|
  3919.             | GREP_EMPTY_RANGE                    | -317               |
  3920.             |----------------------------------------------------------|
  3921.             | GREP_REGULAR_EXPRESSION_LONG        | -318               |
  3922.             |----------------------------------------------------------|
  3923.             | DYNALINK_INCORRECT_PARAMETERS       | -319               |
  3924.             |----------------------------------------------------------|
  3925.             | CANNOT_FIND_KEYSET                  | -321               |
  3926.             |----------------------------------------------------------|
  3927.             | BAD_LIBRARY_OR_PROC                 | -322               |
  3928.             |----------------------------------------------------------|
  3929.             | INVALID_LINE_NUMBER                 | -323               |
  3930.             |----------------------------------------------------------|
  3931.             | KBDSETSTATUS_FAILED                 | -324               |
  3932.             |----------------------------------------------------------|
  3933.             | BUFFER_CREATE_SIZE                  | -325               |
  3934.             |----------------------------------------------------------|
  3935.             | BAD_PROCEDURE                       | -326               |
  3936.             `----------------------------------------------------------'
  3937.