═══ 1. Introduction. ═══ The E-Toolkit assists a software developer in building applications that edit multiple lines of text. The E-Toolkit gives developers access to OS/2 functions and PM messages that enable the creation and manipulation of an advanced multi-line edit control window. This multi-line edit window contains an advanced text editor engine based on the "E" text editor technology. This multi-line edit window is referred to as the E-MLE. The E-MLE is a versatile control window that supports many primitive operations which allow easy access to powerful text editing capabilities. For example, The E-MLE supports the editing of large files (limited only by system memory). Each E-MLE can store multiple files, each of which can be viewed one at a time. (The feature is known as a "file RING") The E-MLE supports text with associated attribute information. Using the attribute feature your application can display text in Multiple Fonts, Multiple colors, and even associate commands with regions of text. (Associating commands with regions of text can be a way of implementing HyperText.) An advanced feature is available which allows other window classes to be overlayed with in a E-MLE. Using this "Overlay Window" feature, a E-MLE can incorporate images along with text. The behavior of an E-MLE can be enhanced by adding new methods of behavior in any of the following ways. The E-MLE can be sub-classed using traditional PM functions written in C. (i.e WinSubclassWindow(...)). New methods can also be added to an E-MLE by simply extending event definitions by writing E or REXX macros. This document describes the Application Program Interface (API) of the E-Toolkit. Examples are provided that demonstrate some of the more popular way in which an E-MLE can be used. As mentioned above, The E-MLE can also be extended by writing Macros. The E Technical Reference manual describes how macros can be written. ═══ 2. Overview ═══ ═══ 2.1. E Tool-Kit Programming ═══ The E Tool-Kit was designed to supply a highly configurable edit control to application programmers. The three major components of the E Tool-Kit are: 1. ETKExxx.DLL - Creation of E-MLE, Etk Functions 2. E Macros - Customizing editing function 3. ETKRxxx.DLL - E Toolkit Resource DLL, ERES Functions ETKExxx.DLL is the dynamic link library that contains the functions that will allow you to create your own custom E-MLE windows. Both messages and functions are available for a user to subclass the behavior of an E-MLE. Functions include: EtkInsertText, EtkProcessEditKey, and EtkSetFileField, and EtkQueryText. Messages include the EPM_EDIT_COMMAND message which allows any defined editor commands to be issued to an E-MLE. The API to this library is described in detail in this document. All functions from this library include names prefixed with Etk. ETKExxx.DLL contains all of the primitives required for an edit control. E Macros are used to build function into the edit control. Therefore, without any macros the edit control can't supply any editing function. The E Macros are used to map function to keys, and create new edit commands. For example, you can build new commands using the E macros "defc" construct. The E Macro language is described in "The EPM Technical Reference" documentation. An application can either supply its own macros when using the E-MLE or use the E Tool-Kit's base macros. It is recommended that applications use the base E Macros and extend them where function is needed. See the "EPM Technical Reference" for more information about the base E Macros and macro programming. ETKRxxx.dll includes dialogs and function that are needed in most applications. Dialog include search, undo, print, settings, and open. It requires that an application is using the base E Macros. The dialogs and functions in ETKRxx.dll issue edit commands that are defined in the base E Macros. All functions in ETKRxxx.dll have names prefixed with ERES. Sample program 2 uses the functions in this DLL. ═══ 2.2. Special Notes!!! ═══ 1. PM Queue size. The E-MLE requires a large queue for message passing, therefore when your application creates its message queue it should be at least 0x100. For examples, hmq = WinCreateMsgQueue(hab, 0x100); // Create Queue ═══ 3. The E-MLE Control ═══ ═══ 3.1. Description ═══ A simple E-MLE is just an edit window with no other types of windows like a frame or vertical and horizontal scroll bars. A simple E-MLE is typically imbeded in other windows like the client area of a standard window, or a dialog. Since the simple E-MLE has no other windows associated with it it's easy to integrate and customize it with your applications user interface. ═══ 3.2. Creating a Simple E-MLE ═══ To Create an E-MLE your application must do the following: 1. Register the E-MLE window class. By calling the EtkRegisterEMLEClass() function of the E Toolkit your application will register the E-MLE and receive the E-MLE window class name. Example PSZ E_MLE_ClassName; E_MLE_ClassName = EtkRegisterEMLEClass(hab); 2. Allocate storage for a variable of type EDITWNDCTRLDATA, and initialize all fields appropriate for your application. Insure that all fields not used are set to NULL. EDITWNDCTRLDATA has the following fields: FileName The name of the file to be edited. This string can include multiple file names or wildcards ("ESIMPLE.C ESIMPLE.E" or "*.C"), in which case multiple files will be added to the E-MLE ring of files. EditorStyle Editor Style flags. The following flags can be set. EDIT_STYLE_BROWSE causes read-only access to file. EDIT_STYLE_CURSORON enables the edit window cursor. ExFile The name of the pre-compiled macro code file. ("ESIMPLE.EX"). TopMkr Top of file marker. BotMkr Bottom of file marker. ExSearchPath The name an environment variable with the path to use for macro file searches. The E Macro Language has the ability to link in additional *.EX files. See the E Technical Reference manual for further information on linking additional macros. ExePath A string containing directory where the application started. This field is also used for macro file searches. Example EDITWNDCTRLDATA EditWndCtrlData; EditWndCtrlData.FileName = "ESIMPLE.C"; EditWndCtrlData.EditorStyle = EDIT_STYLE_CURSORON; EditWndCtrlData.ExFile = "ESIMPLE.EX"; EditWndCtrlData.TopMkr = "---Top of File---" EditWndCtrlData.BotMkr = "---Bottom of File---" EditWndCtrlData.ExePath = "."; 3. Create an E-MLE window using WinCreateWindow(). Typically the class name returned by EtkRegisterEMLEClass() is used with WinCreateWindow() to create a standard E-MLE window. Example HWND HwndEMLE; USHORT My_EMLE_ID = 1001; HwndEMLE = WinCreateWindow(HwndParent, E_MLE_ClassName, NULL, 0L, 10, 10, 200, 400, HwndOwner, HWND_TOP, My_EMLE_ID, NULL); 4. Subclass the E-MLE window procedure to process any desired messages. The E-MLE doesn't send any messages to its owner, except for EPM_EDIT_DESTROYNOTIFY. E-MLE messages are sent to itself, therefore the owner of the E-MLE is required to subclass the E-MLE to process any of its messages. To dynamically subclass the edit window after it has been created use WinSubclassWindow(). If you application needs to process all initial messages including WM_CREATE, or wants to add more window words then static subclassing of the E-MLE class is required before creating the window. See appendix A for a description of the steps required to statically subclass an E-MLE. Example //************************************************************* //Dynamically subclass the E-MLE after it has been created. PFNWP DefaultEMLEWindowProc; DefaultEMLEWindowProc = WinSubclassWindow(HwndEMLE, EMLESubclassWndProc); //EMLESubcassWndProc is the window procedure your application will //supply to subclass all E-MLE messages. All messages that your //application doesn't use should be sent to the E-MLE window procedure. //In this example it would be DefaultEMLEWindowProc. ═══ 4. The EFrame Control ═══ ═══ 4.1. Description ═══ An EFrame is a similiar to a PM standard window with the client area being an E-MLE. In addition to the controls supplied with a standard window like a frame, scroll bars, and min-max buttons, an EFrame control adds the following: Status line Can be customized to display various status information relate to the file currently being edited in the E-MLE ring. By default it displays, line, column, modified status, insert/replace status, and the number of files in the E-MLE ring. Message line A text field which displays internal editor messages, or messages generated by the SAYERROR, E macro statement. Your application can use this control to send messages to users, by writing a command macro which executes a SAYERROR. (See the E Technical Reference for more information on writing E macro commands and SAYERROR) Direct manipulation title bar Allows a user to double click with the right mouse button on the title bar to change the name of the file. Drag-Drop support Allows the current file or all the files in the E-MLE ring to be drag and drop to and from another application or window. In addition marked text can be drag and droped to another application or another place in the file being edited. Ring buttons Switches the current file being edited to the next file in the E-MLE ring. Task list entry support Handles task list entry related functions. Displays the name of the current file in the E-MLE ring, and optionally an application name prefix in the task list. An EFrame is typically used as a desktop window or the child of a standard window. It is used when standard editing function is required, like editing multiple files, or draging and droping to and from other applications and windows. The EPM application uses the EFrame control to display edit windows. ═══ 4.2. Creating an EFrame Control ═══ To create an EFrame control your application must do the following: 1. Call the EtkRegisterEFrameClass() function of the E Toolkit to register the EFrame window class. Example PSZ EFrameClassName; EFrameClassName = EtkRegisterEFrameClass(hab); 2. Allocate storage for a variable of type EFRAMEEDITWNDCTRLDATA, and initialize all fields appropriate for your application. Insure that all fields not used are set to NULL. EFRAMEEDITWNDCTRLDATA is composed of the struct of type EDITWNDCTRLDATA described in the section "Creating a Simple E-MLE", an optional string with the name of the statically subclassed E-MLE control, and a struct of type EFRAMECTRLDATA. EFRAMECTRLDATA has the following fields: PMFlags Standard PM Frame flags. Use the PM FCF_* Frame control flags to set any controls PM supplies with its frame control. Flags EFrame flags. Can be set with the following flag constants: EFRAMEF_STATUSWND Status line window EFRAMEF_MESSAGEWND Message line window EFRAMEF_RINGBUTTONS Ring buttons EFRAMEF_INFOONTOP Moves Status and Message windows above the E-MLE window EFRAMEF_FILEWND File Icon window place on the EFrame title bar used for drag and drop EFRAMEF_DMTBWND Direct Manipulation title bar EFRAMEF_TASKLISTENTRY Task list entry support HIcon Handle to the icon the EFrame should use when its minimized. If set to NULL the default EFrame icon is used. The EditWndClassName field of the EFRAMEEDITWNDCTRLDATA structure is used if the class of the E-MLE is different from the default E-MLE window class. If your application statically subclasses the E-MLE window class before the EFrame is created this field can be set to the new class you have created. Example EFRAMEEDITWNDCTRLDATA EFrameEditWndCtrlData; //Initialize E-MLE related fields EFrameEditWndCtrlData.EditWndCtrlData.FileName = "ESIMPLE.C"; EFrameEditWndCtrlData.EditWndCtrlData.EditorStyle = EDIT_STYLE_CURSORON; EFrameEditWndCtrlData.EditWndCtrlData.ExFile = "ESIMPLE.EX"; EFrameEditWndCtrlData.EditWndCtrlData.TopMkr = "---Top of File---" EFrameEditWndCtrlData.EditWndCtrlData.BotMkr = "---Bottom of File---" EFrameEditWndCtrlData.EditWndCtrlData.ExePath = "."; //Initialize EFrame related fields EFrameEditWndCtrlData.EFrameCtrlData.PMFlags = FCF_TITLEBAR | FCF_SIZEBORDER | FCF_VERTSCROLL | FCF_HORZSCROLL | FCF_NOMOVEWITHOWNER | FCF_SYSMENU | FCF_MINMAX; EFrameEditWndCtrlData.EFrameCtrlData.Flags = EFRAMEF_STATUSWND | EFRAMEF_MESSAGEWND | EFRAMEF_FILEWND | EFRAMEF_DMTBWND | EFRAMEF_RINGBUTTONS | EFRAMEF_TASKLISTENTRY; EFrameEditWndCtrlData.EFrameCtrlData.HIcon = NULL; EFrameEditWndCtrlData.EditWndClassName = NULL; 3. Create an EFrame window using WinCreateWindow(). Example HWND HwndEFrame; EFrame = WinCreateWindow( HwndParent, EFrameClassName, NULL, 0L, 10, 40, 200, 200, HwndOwner, HWND_TOP, 1001, &EFrameEditWndCtrlData, (PVOID)NULL); 4. Subclass the E-MLE window of the EFrame to process any desired messages. When creating an EFrame the window ID of the E-MLE is set to FID_CLIENT. This window ID is used to query the window handle of the E-MLE with the PM function WinWindowFromID(). Example HWND HwndEMLE; PFNWP DefaultEMLEWndProc; HwndEMLE = WinWindowFromID(EFrame, FID_CLIENT); DefaultEMLEWndProc = WinSubclassWindow(HwndEMLE, EMLESubclassedWndProc); ═══ 5. E Toolkit functions at a glance. ═══ The following functions are used to manipulate various aspects of an E-MLE. ═══ 5.1. Class Registration, and Version Query Functions ═══ EtkVersion Query E Toolkit version EtkRegisterEMLEClass Register the EMLE class EtkRegisterEFrameClass Register the EFrame class EtkRegisterEMLEClientClass Register the EMLEClient class ═══ 5.2. Event Execution. ═══ EtkExecuteCommand Execute an command EtkProcessEditKey Execute a "built-in" key action ═══ 5.3. Text Manipulation ═══ EtkDeleteText Delete a line of text. EtkReplaceText Replace a line of text with a new line. EtkInsertText Insert a new line of text. EtkQueryText Retreive a line of text. EtkQueryTextBuffer Retreive a range of lines. EtkInsertTextBuffer Insert a stream of text. EtkFindAttribute Search for an attribute associated with a line. EtkInvalidateText Invalidate a region of text ═══ 5.4. Text Selection ═══ EtkSetSelection Select text EtkQuerySelection Query selection region. EtkQuerySelectionType Query Selection Type. ═══ 5.5. File Information ═══ EtkQueryFileID Query the active files id. EtkSetFileField Set file related information EtkQueryFileField Query file related information EtkQueryFileFieldString Query file related information ═══ 5.6. Fonts ═══ EtkRegisterFont Register a new font EtkRegisterFont2 Register a new fixed pitch font. ═══ 6. Class Registration, Version Query functions ═══ ═══ 6.1. EtkVersion ═══ EtkVersion - (Dynalink Version) ────────────────────────────────────────────────────────────────────────────── Get the version of the Editor dynalink library(ETKExxx.DLL) ┌───────────────────────────────────────────────────────────────── │ EtkVersion (version_str, ) └───────────────────────────────────────────────────────────────── Parameters version_str ( PSZ ) - output Pointer to a buffer of memory. This will be filled with the current dynalink version. The return string is in the following format: Example byte [1] - length of string to follow. byte [2 - length] - Null terminated version string. Returns VOID Remarks A constant, 'EVERSION', is provided in the EDLL.H file. This constant is to be compared to the results of the EtkVersion procedure. An example follows: Example CHAR EDLLVersion[20]; EtkVersion( EDLLVersion ); // Get Version from .DLL vercmp=strcmp( EDLLVersion, EVERSION ); // compare version numbers if (vercmp) { WinMessageBox ((HWND)HWND_DESKTOP, // Display editor return code (HWND)hwndAppFrame, (PSZ)"Version Mismatch", (PSZ)"Check ETKExxx.DLL version", NULL, MB_ICONEXCLAMATION ); return(1); } ═══ 6.2. EtkRegisterEMLEClass ═══ EtkRegisterEMLEClass - (Register an E-Multi-line Edit Window) ────────────────────────────────────────────────────────────────────────────── Register the E-Multi-Line Edit Window Class for this process. ┌───────────────────────────────────────────────────────────────── │ EtkRegisterEMLEClass ( hab , Window_Class_Name ) └───────────────────────────────────────────────────────────────── Parameters hab ( HAB ) - input Application anchor block Returns Window_Class_Name (PSZ ) - Pointer to window-class-name string in which the editor window was registered under. Remarks This call only needs to be called once per application. It returns the window class which you will use in creating an E-MLE with WinCreateWindow(). ═══ 6.3. EtkRegisterEFrameClass ═══ EtkRegisterEFrameClass - (Register an EFrame class) ────────────────────────────────────────────────────────────────────────────── Register the EFrame class. ┌───────────────────────────────────────────────────────────────── │ EtkRegisterEFrameClass ( hab , Window_Class_Name ) └───────────────────────────────────────────────────────────────── Parameters hab ( HAB ) - input Application anchor block Returns Window_Class_Name (PSZ ) - Pointer to window-class-name string in which the editor window was registered under. Remarks This call only needs to be called once per application. It returns the window class which you will use in creating an EFrame with WinCreateWindow(). ═══ 6.4. EtkRegisterEMLEClientClass ═══ EtkRegisterEMLEClientClass - (Register an EMLEClient class) ────────────────────────────────────────────────────────────────────────────── Register the EMLEClient class. ┌───────────────────────────────────────────────────────────────── │ EtkRegisterEMLEClientClass ( hab , Window_Class_Name ) └───────────────────────────────────────────────────────────────── Parameters hab ( HAB ) - input Application anchor block Returns Window_Class_Name (PSZ ) - Pointer to window-class-name string in which the editor window was registered under. Remarks This call only needs to be called once per application. It returns the window class used in creating an EMLEClient. An EMLEClient is the window class of the EMLE used in an EFrame control. This function is only needed if your application needs to statically subclass the EMLE of an EFrame control. An EMLEClient class has additional logic for communicating with the EFrame and its controls. ═══ 7. Event Execution. ═══ ═══ 7.1. EtkExecuteCommand ═══ EtkExecuteCommand - (Execute an E -Command) ────────────────────────────────────────────────────────────────────────────── This function will execute any predefined command. ┌───────────────────────────────────────────────────────────────── │ EtkExecuteCommand ( hwndEdit, command , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input Window handle to the E-MLE in which the specified command will execute. command ( PSZ ) - input An asciiz command string that is defined as either an internal command, an E macro, or a REXX macro. Returns rc ( ULONG ) - TRUE if action failed. Remarks This is one of the more versatile commands available in the E Toolkit. Three classes of commands can be executed: o Internal Commands. (examples - SAVE, L[ocate], and C[hange]). o Predefined E macros. (examples - ADD, DRAW, and GET) o REXX macros commands. (examples - RX SORT.ERX, RX ADDMENU.ERX, RX NEW.ERX) An example of how to use this function follows. Example { HWND hwndEdit=QueryEditHandle( ); // issue a "save" command to an E-MLE. The data is saved in // a file called temp.tmp. EtkExecuteCommand( hwndEdit, "SAVE temp.tmp") ; } ═══ 7.2. EtkProcessEditKey ═══ EtkProcessEditKey - (Execute a editor action) ────────────────────────────────────────────────────────────────────────────── Execute a primitive editor action. ┌───────────────────────────────────────────────────────────────── │ EtkProcessEditKey ( hwndEdit, key, repcount , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input Window handle of the E-MLE. key ( USHORT ) - input Built in key primitives: ETK_ADJUST_BLOCK ETK_BACKTAB Tab to the left. ETK_BACKTAB_WORD Tab to the left one word. ETK_BEGIN_LINE Move the cursor to the beginning of the line. ETK_BOTTOM Move the cursor to the last line in the file. ETK_COPY_MARK Copy the current selection to the cursor location. ETK_DELETE_CHAR Delete the character in which the cursor is located. ETK_DELETE_LINE Delete the line in which the cursor is located. ETK_DELETE_MARK Delete the current selection. ETK_DOWN Scroll down one line. ETK_END_LINE Move the cursor to the end of the current line. ETK_ERASE_END_LINE Erase from the cursor to the end of the line. ETK_INSERT_LINE Insert a new line after the cursor. ETK_INSERT_TOGGLE Toggle between insert and replace cursor. ETK_JOIN Join next line with the line in which the cursor is located. ETK_LEFT Scroll one character to the left. ETK_MOVE_MARK Move the current selection to the cursor location. ETK_NEXT_FILE Go to the next file in the Ring. ETK_OVERLAY_BLOCK Overlay the current block selection to the cursor location. ETK_PAGE_DOWN Scroll one page down. ETK_PAGE_UP Scroll one page up. ETK_PREVFILE_OP Go to the previous file in the Ring. ETK_REFLOW Reflow the text according to the margins settings. ETK_REPEAT_FIND Repeat the last find. ETK_RIGHT Scroll right one character. ETK_RUBOUT Move cursor to the left and delete character. ETK_SHIFT_LEFT Shift the selected text one character to the left. ETK_SHIFT_RIGHT Shift the selected text one character to the right. ETK_SPLIT Split the current line at the cursor. ETK_TAB Move cursor to the next tab position. ETK_TAB_WORD Tab to the right one word. ETK_TOP Move the cursor to the first line in the file. ETK_UNDO_LINE Return the current line to its original state. ETK_UNMARK Clear the current selection. ETK_UP Scroll up one line. repcount ( USHORT ) - input Specifies how many times this primitive action should be performed. Only some primitives support this parameter. Returns rc ( SHORT ) - TRUE if action failed. Remarks EtkProcessEditKey() is used to execute a primitive edit action on an EMLE. Example { HWND HwndEMLE; EtkProcessEditKey(HwndEMLE, ETK_INSERT_LINE, 1); } ═══ 8. Text Manipulation ═══ ═══ 8.1. EtkQueryText ═══ EtkQueryText - (Retrieve a line) ────────────────────────────────────────────────────────────────────────────── Retrieve a line of text and its associated attributes. ┌───────────────────────────────────────────────────────────────── │ EtkQueryText ( hwndEdit, fileid, linenum, Text, AttrArray, LastAttr , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. fileid ( FIDTYPE ) - input the fileid of the file containing the specified line. If 0 is specified, the line will be retrieved from the visible file. linenum ( LINE_INDEX ) - input line number of interest. Text ( PSZ * ) - output returns an indirect pointer to the text found on the specified line. AttrArray ( PPATTRIBRECTYPE) - output returns a pointer to the array of attribute structures for the specified line. LastAttr ( PPATRIBRECTYPE) - output returns a pointer to the attribute structure which is one beyond the last attribute structure in the attribute array returned. Subtracting LastAttr from AttrArray gives the number of attribute records for the line. Returns rc ( ULONG ) - TRUE if action failed. Remarks See the section "Attribute Pairs" in "The EPM Technical Reference" for a description of Attribute support. Example { PATTRIBRECTYPE AttrArray; //Pointer to first element in Attr. Array PATTRIBRECTYPE LastAttr; //Pointer to array element one beyond last ULONG NumberOfAttrs; //Number of Attrs. on line HWND HwndEMLE; //Window handle of the EMLE PSZ Text; //Text on the line specfied. EtkQueryText(HwndEMLE, 0, 1, &Text, &AttrArray, &LastAttr); NumberOfAttrs = LastAttr - AttrArray; } ═══ 8.2. EtkDeleteText ═══ EtkDeleteText - (Delete text) ────────────────────────────────────────────────────────────────────────────── Delete an area of text. ┌───────────────────────────────────────────────────────────────── │ ( hwndEdit, fileid, startline, number_oflines , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. fileid ( FIDTYPE) - input the fileid of the file containing the specified line. If fileid of 0 is specified, the line will be retrieved from the visible file. startline ( ULONG ) - input starting line number. num_of_lines ( ULONG ) - input number of lines to delete. If (-1L) is specified then lines are deleted from the start line through the last line in the file. Returns rc ( ULONG ) - TRUE if action failed. Remarks Example { //The following call will delete the first 40 lines of the current file EtkDeleteText(HwndEMLE, 0, 1, 40); } ═══ 8.3. EtkReplaceText ═══ EtkReplaceText - (Replace a line) ────────────────────────────────────────────────────────────────────────────── Replace a line with a new single attributed string ┌───────────────────────────────────────────────────────────────── │ EtkReplaceText ( hwndEdit, fileid, linenum, AttrString, rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit (HWND ) - input window handle of the E-MLE. fileid ( FIDTYPE ) - input the fileid of the file containing the specified line. If 0 is specified, the line will be retrieved from the visible file. linenum ( LINE_INDEX ) - input line number AttrString ( PPATTRSTRING ) - input an indirect pointer to an ATTRSTRING type. Returns rc ( ULONG ) - TRUE if action failed. Remarks See the section "Attribute Pairs" in "The EPM Technical Reference" for a description of Attribute support. The ATTRSTRING type only allocates one byte for the Text Field. Your application should allocate memory equal to the size ATTRSTRING plus the length of the text you are replacing and assign it to a PATTRSTRING variable. See the sample below. Example { HWND HwndEMLE; //Window handle of the EMLE UCHAR String[]="hello"; //String to be inserted. ATTRIBRECTYPE Attr[3]; //Attributes for the string PATTRSTRING AttrString; //Attributed string variable AttrString = (PATTRSTRING) malloc(sizeof(ATTRSTRING)+sizeof(String)+1); Attr[0].Col = 1; Attr[0].Class = COLORCLASS; Attr[0].IsPush = 1; Attr[1].Col = 10; Attr[1].Class = COLORCLASS; Attr[1].IsPush = 0; AttrString->ALAttr = &Attr[2]; AttrString->Attrs = &Attr[0]; AttrString->SelfPtr = AttrString; AttrString->TextLen = sizeof(String)+1; strcpy(AttrString->Text, String); EtkReplaceText(HwndEMLE, 0, 10, &AttrString); } ═══ 8.4. EtkInsertText ═══ EtkInsertText - (Add a line) ────────────────────────────────────────────────────────────────────────────── Insert a single attributed string ┌───────────────────────────────────────────────────────────────── │ EtkInsertText ( hwndEdit, fileid, linenum, text, terminatortype , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. fileid ( FIDTYPE ) - input the fileid of the file containing the specified line. If 0 is specified, the line will be retrieved from the visible file. linenum ( LINE_INDEX ) - input line number text ( PPATTRSTRING ) - input an indirect pointer to an ATTRSTRING type. terminatortype ( TERMTYPE ) - input How the inserted line is to be terminated. This parameter could specify that the inserted line be treated as if it is terminated by an invisible character or sequence of characters. For example, CR, CRLF, EOF, NULL, UNTERMINATED. The significance of these specifications is determined in the way that it might change the behavior of various other editor functions. For example, the value might control what is appended to the line when saved disk or perhaps control how paragraph reflow occurs. The only terminator currently supported is CRLF_TERMINATED. At this point the significance of these values to the internal toolkit functions has not been defined. The definition will probably evolve for a while. Returns rc ( ULONG ) - TRUE if action failed. Remarks See the section "Attribute Pairs" in "The EPM Technical Reference" for a description of Attribute support. The ATTRSTRING type only allocates one byte for the Text Field. Your application should allocate memory equal to the size ATTRSTRING plus the length of the text you are replacing and assign it to a PATTRSTRING variable. See the sample below. Example { HWND HwndEMLE; //Window handle of the EMLE UCHAR String[]="hello"; //String to be inserted. ATTRIBRECTYPE Attr[3]; //Attributes for the string PATTRSTRING AttrString; //Attributed string variable AttrString = (PATTRSTRING) malloc(sizeof(ATTRSTRING)+sizeof(String)+1); Attr[0].Col = 1; Attr[0].Class = COLORCLASS; Attr[0].IsPush = 1; Attr[1].Col = 10; Attr[1].Class = COLORCLASS; Attr[1].IsPush = 0; AttrString->ALAttr = &Attr[2]; AttrString->Attrs = &Attr[0]; AttrString->SelfPtr = AttrString; AttrString->TextLen = sizeof(String)+1; strcpy(AttrString->Text, String); EtkInsertText(HwndEMLE, 0, 10, &AttrString, CRLF_TERMINATED); } ═══ 8.5. EtkQueryTextBuffer ═══ EtkQueryTextBuffer - (Query Text Buffer) ────────────────────────────────────────────────────────────────────────────── Retrieve a stream of text within a specified line range. ┌───────────────────────────────────────────────────────────────── │ EtkQueryTextBuffer ( hwndEdit, startline, lastline, TotalLen, buffer , characters ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. startline ( ULONG ) - input First line in text range. lastline ( ULONG ) - input Last Line in text range. TotalLen ( ULONG ) - input size of buffer. buffer ( PSZ ) - output buffer where text stream will be returned. Returns characters (ULONG) - The number of characters in the buffer is returned. If 0 is returned, it is likely that a problem occured. (Most likely an invalid line number) Remarks If startline and lastline are zero (0), the entire file will be returned. The Buffer contains a stream of characters where each line ends in CR-LF. Example { UCHAR Buffer[10000]; EtkQueryTextBuffer(HwndEMLE, 10, 20, sizeof(Buffer), Buffer); } ═══ 8.6. EtkInsertTextBuffer ═══ EtkInsertTextBuffer - (Insert Text Buffer) ────────────────────────────────────────────────────────────────────────────── Enter a stream of text starting at a specified point. ┌───────────────────────────────────────────────────────────────── │ EtkInsertTextBuffer ( hwndEdit, startline, TotalLen, Text, format , lines ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. startline ( ULONG ) - input insert starting at this line. TotalLen ( ULONG ) - input size of buffer. Text ( PSZ ) - input text stream to insert. format ( USHORT ) - input the way the provided text should processed. Any combination of _LDFLAG parameters can be used. The _TERMINATOR_LDFLAG values specify where what characters and character sequences are recognized as line terminators. TABEXP_LDFLAG specifies that each tab character in the input stream should be converted to one or more space characters so as to cause the following character to be aligned on the next 1,9,17,... standard tab stop. If this parameter is not set to zero then NOHEADER_LDFLAG should be used in combination with any other flags used. Returns lines ( ULONG ) - The number of lines inserted in to the E-MLE. If 0 is returned, it is likely that a problem occured. (Most likely an invalid line number) Remarks If startline is zero (0), the Text is inserted at the current cursor position. The Text buffer should contain a stream of characters where each line ends in CR-LF. Example { UCHAR string[512], strcpy(string, "1: This is a test\r\n2: This is line 2\r\n"); EtkInsertTextBuffer( hwndEdit, 1, strlen(string), string, 0); } ═══ 8.7. EtkFindAttribute. ═══ EtkFindAttribute. - (Retrieve a line attribute) ────────────────────────────────────────────────────────────────────────────── Search for an attribute associated with a line. ┌───────────────────────────────────────────────────────────────── │ EtkFindAttribute ( hwndEdit, fileid, linenum, Column, ColumnAttrIndex, Attribute, pFound , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. fileid ( FIDTYPE ) - input the fileid of the file containing the specified line. If 0 is specified, the line will be retrieved from the visible file. linenum ( LINE_INDEX ) - input starting line number Column ( USHORT ) - input starting column ColumnAttrIndex ( USHORT ) - input the index of the attribute record for the specified column. Attrs ( PPATTRIBRECTYPE ) - input A pointer to an attribute record that was found. pFound ( BOOL *) - output found flag. Returns rc ( ULONG ) - TRUE if action failed. Remarks See the section "Attribute Pairs" in "The EPM Technical Reference" for a description of Attribute support. Example { // The following code searches for the attribute in the current file, // for the character on line one , column 10, at the attribute index -1. PATTRIBRECTYPE Attr; BOOL Found; EtkFindAttribute(HwndEMLE, 0, 1, 10, -1, &Attr, &Found); } ═══ 8.8. EtkInvalidateText ═══ EtkInvalidateText - (Invalidate Text) ────────────────────────────────────────────────────────────────────────────── Invalidate text which forces a refresh. ┌───────────────────────────────────────────────────────────────── │ EtkInvalidateText ( hwndEdit, firstline, lastline, rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit (HWND) - input window handle of the E-MLE. firstline (LINE_INDEX) - input first line to be invalidated. lastline (LINE_INDEX) - input last line to be invalidated. Returns rc (USHORT) - Remarks Example { HWND HwndEMLE; FontID = EtkInvaliateText(HwndEMLE, 1, 10); } ═══ 9. Text Selection. ═══ ═══ 9.1. EtkQuerySelectionType ═══ EtkQuerySelectionType - (Query Current Selection Type) ────────────────────────────────────────────────────────────────────────────── Query the current selection type. ┌───────────────────────────────────────────────────────────────── │ EtkQuerySelectionType ( hwndEdit, marktype, rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. marktype ( PUSHORT) - output the E Toolkit will fill this value with a constant that represents the type of mark contained in the visible file. 1. EMT_LINEMARK - line mark 2. EMT_CHARMARK - character mark 3. EMT_BLOCKMARK - block mark 4. EMT_CHARMARKG - 5. EMT_BLOCKMARKG - 6. EMT_NOMARK - no mark Returns rc ( USHORT) - TRUE if action failed. Remarks Example { HWND hwndEdit=QueryEditHandle( ); USHORT marktype; UCHAR outmsg[MAXSTR]; strcpy( outmsg, "Your file contains "); EtkQuerySelectionType( hwndEdit, &marktype); switch (marktype) { case EMT_LINEMARK: strcat( outmsg, "a Line Mark"); break; case EMT_CHARMARK: strcat( outmsg, "a Character Mark"); break; case EMT_CHARMARKG: strcat( outmsg, "a Special Character Mark");break; case EMT_BLOCKMARK: strcat( outmsg, "a Block Mark"); break; case EMT_BLOCKMARKG: strcat( outmsg, "a Special Block Mark"); break; default: strcat( outmsg, "no mark."); break; } } ═══ 9.2. EtkQuerySelection ═══ EtkQuerySelection - (Selection Location) ────────────────────────────────────────────────────────────────────────────── Returns the coordinates of the selected text area. ┌───────────────────────────────────────────────────────────────── │ EtkQuerySelection ( hwndEdit, firstline, lastline, firstcol, lastcol, markfileid, respectattributes, relative2file , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. firstline, lastline ( LINE_INDEX ) - output returns the first and last lines in the selected area. firstcol, lastcol ( PUSHORT ) - output returns the first and last columns in the selected area. markfileid ( PFIDTYPE ) - output returns the fileid of the file containing the selected text. respectattributes ( PUSHORT ) - output If TRUE, Font and color attribute information will be taken into consideration. relative2file ( PUSHORT ) - output Should always be set to TRUE. Returns rc (USHORT) - TRUE if action failed. Remarks Example { LINE_INDEX firstline, lastline; USHORT firstcol, lastcol; LONG markfileid; SHORT marktype; USHORT respectattributes=FALSE, relative2file=TRUE; EtkQuerySelectionType( hwndEdit, &marktype); if (marktype!=NOMARK) { EtkQuerySelection(QueryActiveEdit(), &firstline, &lastline, &firstcol, &lastcol, &markfileid, respectattributes, relative2file); } } ═══ 9.3. EtkSetSelection ═══ EtkSetSelection - (Select Text) ────────────────────────────────────────────────────────────────────────────── Specifiy the type of selection along with the area of text to be selected. ┌───────────────────────────────────────────────────────────────── │ EtkSetSelection ( hwndEdit, firstline, lastline, firstcol, lastcol, firstoff, lastoff, marktype, fileid , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. firstline, lastline ( LINE_INDEX ) - input The first and last lines in the selected area. firstcol, lastcol ( USHORT ) - input The first and last columns in the selected area. firstoff, lastoff ( USHORT ) - input The attribute offset associated with the first and last column. (If color or font attributes are not being used, set to 0) marktype ( USHORT ) - input 1. EMT_LINEMARK - line mark 2. EMT_CHARMARK - character mark 3. EMT_BLOCKMARK - block mark 4. EMT_CHARMARKG - 5. EMT_BLOCKMARKG - 6. EMT_NOMARK - no mark fileid ( FIDTYPE ) - input the fileid of the file containing the selected text. If 0 is specified, the text will be selected in the visible file. Returns rc (USHORT) - TRUE if action failed. Remarks Example { LINE_INDEX firstline, lastline; USHORT firstcol, lastcol; FIDTYPE markfileid; SHORT marktype; USHORT respectattributes=FALSE, relative2file=TRUE; EtkQuerySelectionType( hwndEdit, &marktype); if (marktype!=NOMARK) { HWND hwndEdit=QueryActiveEdit(); EtkQuerySelection(hwndEdit, &firstline, &lastline, &firstcol, &lastcol, &markfileid, respectattributes, relative2file); // extend the mark one line. EtkSetSelection(hwndEdit, firstline, lastline+1, firstcol, lastcol, 0, 0, marktype, markfileid); } } ═══ 10. File Information ═══ ═══ 10.1. EtkQueryFileID ═══ EtkQueryFileID - (Query a files identifier) ────────────────────────────────────────────────────────────────────────────── Retrieve the visible files file identifier. ┌───────────────────────────────────────────────────────────────── │ EtkQueryFileID ( hwndEdit, fileid , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. fileid ( PFIDTYPE ) - output returns the fileid of the visible file. Returns rc (USHORT) - TRUE if action failed. Remarks The file identifier is an constant that is used by certian functions to identify a particular file in an E-MLE window Ring. Example { FIDTYPE FileID; EtkQueryFileID(HwndEMLE, &FileID); } ═══ 10.2. EtkSetFileField ═══ EtkSetFileField - Set some file characteristic ────────────────────────────────────────────────────────────────────────────── Set information pertaining to some aspect of a file. (i.e. Margin, Name, etc) ┌───────────────────────────────────────────────────────────────── │ EtkSetFileField (hwndEdit, field, fileid, indata , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit ( HWND ) - input window handle of the E-MLE. field. ( ULONG) - input See Appendix A-1 for field constants and values expected by each field. fileid (FIDTYPE) - input the fileid indata (PVOID) - input the input data varies depending on the field being set. See Appendix A-1 for field constants and values expected by each field. Returns rc (USHORT) - TRUE if action failed. Remarks Example { UCHAR s[MAXSTR]; ULONG Browse; Browse = 0L; // turn OFF browse mode - the file can now be modified. EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse); // Insert a stream of text... strcpy( s,"Hello World\r\nAnother Line\r\nAnd another..."); EtkInsertTextBuffer( hwndMLE, 1, strlen(s), s); Browse = 1L; // turn ON browse mode - the file is now read only! EtkSetFileField(hwndMLE,(ULONG)READONLY_FIELD,(ULONG)0,(PVOID)Browse); } ═══ 10.3. EtkQueryFileField ═══ EtkQueryFileField - (Query some file characteristic) ────────────────────────────────────────────────────────────────────────────── Query information pertaining to some aspect of a file. (i.e. Margin, Name, etc) ┌───────────────────────────────────────────────────────────────── │ EtkQueryFileField ( hwndEdit, field, fileid, returndata , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit (HWND) - input window handle of the E-MLE. field. (ULONG) - input See Appendix A-1 for field constants and values expected by each field. fileid (FILEID) - input the fileid returndata (PVOID) - output data returned. This data varies depending on the field being queried. See Appendix A-1 for field constants and values expected by each field. Returns rc (USHORT) - TRUE if action failed. Remarks Example { ULONG numlines; // query the number of lines in a given file. EtkQueryFileField(hwndMLE,(ULONG)LAST_FIELD,(ULONG)0,(PVOID)&numlines); } ═══ 11. Fonts ═══ ═══ 11.1. EtkRegisterFont ═══ EtkRegisterFont - (Register a Font) ────────────────────────────────────────────────────────────────────────────── Register a font for use in font attribute support ┌───────────────────────────────────────────────────────────────── │ EtkRegisterFont ( hwndEdit, fontname, size, fontattr , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit (HWND) - input window handle of the E-MLE. fontname (PLSTRING) - input name of the font to be registered. size (SHORT) - input point size of the font fontattr (SHORT) - output font attribute bit field. Values that can be used include: o FATTR_SEL_ITALIC o FATTR_SEL_UNDERSCORE o FATTR_SEL_OUTLINE o FATTR_SEL_STRIKEOUT o FATTR_SEL_BOLD These values are defined in the OS/2 Programmers Tool-Kit. Returns fontid (USHORT) - returns a font ID. If 0 then the font was not found. Remarks Example { HWND HwndEMLE; SHORT FontID; FontID = EtkRegisterFont(HwndEMLE, "Helvetica", 12, FATTR_SEL_BOLD); } ═══ 11.2. EtkRegisterFont2 ═══ EtkRegisterFont2 - (Register a Font) ────────────────────────────────────────────────────────────────────────────── Register a bitmap font for use in font attribute support ┌───────────────────────────────────────────────────────────────── │ EtkRegisterFont ( hwndEdit, fontname, size, fontheight, fontwidth fontattr , rc ) └───────────────────────────────────────────────────────────────── Parameters hwndEdit (HWND) - input window handle of the E-MLE. fontname (PLSTRING) - input name of the font to be registered. size (SHORT) - input point size of the font fontheight (SHORT) - input height of the bitmap font fontwidth (SHORT) - input width of the bitmap font fontattr (SHORT) - output font attribute bit field. Values that can be used include: o FATTR_SEL_ITALIC o FATTR_SEL_UNDERSCORE o FATTR_SEL_OUTLINE o FATTR_SEL_STRIKEOUT o FATTR_SEL_BOLD These values are defined in the OS/2 Programmers Tool-Kit. Returns fontid (USHORT) - returns a font ID. If 0 then the font was not found. Remarks Example { HWND HwndEMLE; SHORT FontID; FontID = EtkRegisterFont2(HwndEMLE, "System Monospaced", 0, 12, 9, FATTR_SEL_BOLD); } ═══ 12. ERES Dialog Box Procedures ═══ The following dialog box procedures are exported by ETKRxxx.DLL. These dialogs are used in conjunction which the base E macros. Each dialog issues Edit Commands which are contained in the base E macros. o ERESOpenDlgProc Open dialog procedure. Contains a list of previously entered file names, and an entry field. It also includes a button which opens the system's standard Open Dialog. o ERESCommandDlgProc Edit window command dialog box. Includes support for listing previously entered commands. o ERESFindChangeDlgProc Allows find/change commands to be enter from dialog box. o ERESSettingsDlgProc Configures EMLE. Contains a notebook with pages for configuring margins, paths, autosave, fonts, keys, tabs, and colors. o ERESQuitBoxDlgProc Quit box dialog. o ERESUndoDlgProc Undo dialog. Allows users to go to previous undo states. o ERESRingDlgProc Ring Dialog. Lists the current files in the ring, and allows users to switch to one. o ERESPringDlgProc Pring Dialog. Lists available print queues and has a previewer. o ERESStyleDlgProc Style Dialog. Allows for registering and applying different styles. Styles consist of Font Faces, point size, and color. o ERESMsgDlgProc Message Dialog. Lists messages previously received messages. ═══ 12.1. ERESOpenDlgProc ═══ ═══ 12.1.1. Description (Open dialog procedure) ═══ ThisdialogallowsuserstoaddanewfileorfilestotheEMLE ' sring ,importafileintothecurrentfile ,orselectafiletobeopenedinanewEMLE . ═══ 12.1.2. OPENBOXINFO Structure ═══ Size The size of the OPENBOXINFO structure. Mode Determines the mode of the Open Dialog. This field is set to one of the following constants. o OPEN_MODE - Open a edit window. This mode cause either an EPM_EDIT_NEWFILE or EPM_EDIT_NEWFILE message to be sent. o GET_MODE - Imports a file into the current file. o EDIT_MODE - Adds a file to the EMLE's ring. List Pointer to a Dialog List. Displays the Dialog List in the Open dialogs list box. If this is set to NULL then the dialog automatically retrieves and stores its lists in the applications ini file under the Application name and Key name given. Hini Handle to the applications ini file. Used to store previous dialog postion and Dialog List information, when the list field is set to null. Files Upon return contains the name of the file selected by the user. MultipleFilesArray If Multiple files were selected this field contains a pointer to an array of pointers to strings with all the files selected. HwndEdit Window handle to the EMLE. HwndApp Window handle of the application. Style Determines what action to take when the user selects a file. When set to 0, the dialog takes no action an simply returns the file selected in either the files field or MultipleFilesArray field. When set to OPENF_ISSUE_OPEN the dialog is either add the file selected to the EMLE's ring, import the selected file in the EMLE's current file, or send an EPM_EDIT_NEWFILE or EPM_EDIT_NEWFILES message request that the application open a new EMLE. AppName Application name to use when storing and retrieving information in the INI file. If this is set to NULL the dialog will store and retrieve its list information in the Dialog List specified in the list field. KeyName Key to use when storing and retrieving information in the INI file. If this is set to NULL the dialog will store and retrieve its list information in the Dialog List specified in the list field. Calling the Open Dialog To call the Open dialog use the PM function WinDlgBox(). Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESOpenDlgProc) o Resource - Set to handle of the ETKRxxx.dll module. o Dlgid- Dialog id (DLG_OPEN) o CreateParam - Dialog creation parameter. Must be set to(&OpenBoxInfo). Example OPENBOXINFO OpenBoxInfo; memset(&OpenBoxInfo, 0, sizeof(OPENBOXINFO)); OpenBoxInfo.Size = sizeof(OPENBOXINFO); OpenBoxInfo.Mode = EDIT_MODE; OpenBoxInfo.List = 0; OpenBoxInfo.Hini = Hini; OpenBoxInfo.HwndApp = HwndApplication; OpenBoxInfo.Style = OPENF_ISSUE_OPEN; OpenBoxInfo.HwndEdit = HwndEMLE; OpenBoxInfo.AppName = "EMLE_SAMP"; OpenBoxInfo.KeyName = "OpenBox"; WinDlgBox(HWND_DESKTOP, HwndApplication, (PFNWP)ERESOpenDlgProc, HModuleERES, DLG_OPEN, (PVOID)&OpenBoxInfo); ═══ 12.1.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_OPENFILE when Mode is OPEN_MODE, HELP_ADDFILE when Mode is EDIT_MODE, and HELP_GETFILE when Mode is GET_MODE. ═══ 12.2. ERESCommandDlgProc ═══ ═══ 12.2.1. Description(Command dialog procedure) ═══ This is an edit window command line dialog box, which includes an entry field and a scrollable list of previous commands. ═══ 12.2.2. COMMANDBOXINFO Structure ═══ Size The size of the COMMANDBOXINFO structure. Hini Handle to the applications INI file. CmdText Command to display in the entry field of the dialog. If set to NULL the entry field is blank. List Pointer to a Dialog List. Displays the Dialog List in the dialogs list box. If this is set to NULL then the dialog automatically retrieves and stores its lists in the applications ini file under the Application name and Key name given. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. Command Upon return contains the command entered by the user. Style If set to NULL the dialog issues the command to the give EMLE. If set to CB_RETURN_COMMAND the command entered is returned in the command field and no action is taken by the dialog. AppName Application name to use when storing and retrieving information in the INI file. If this is set to NULL the dialog will store and retrieve its list information in the Dialog List specified in the list field. KeyName Key to use when storing and retrieving information in the INI file. If this is set to NULL the dialog will store and retrieve its list information in the Dialog List specified in the list field. This is an edit window command line dialog box, which includes an entry field and a scrollable list of previous commands. Calling the Command Dialog This dialog can be called using the WinDlgBox() function. For example Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESCommandDlgProc) o Resource - Set to handle of the ETKRxxx.dll module. o Dlgid - Dialog id (DLG_COMMAND) o CreateParam - Dialog creation parameter. Must be set to(&CommandBoxInfo). Example COMMANDBOXINFO CommandBoxInfo; CommandBoxInfo.Size = sizeof(COMMANDBOXINFO); CommandBoxInfo.Hini = Hini; CommandBoxInfo.CmdText = ""; CommandBoxInfo.HwndApp = HwndApplication; CommandBoxInfo.HwndEdit= HwndEMLE; CommandBoxInfo.List = 0; CommandBoxInfo.Style = CB_ISSUE_COMMAND; CommandBoxInfo.AppName = "EMLE_SAMP"; CommandBoxInfo.KeyName = "CommandBox"; WinDlgBox(HWND_DESKTOP, hwnd, (PFNWP)ERESCommandDlgProc, HModuleERES, DLG_COMMAND, (PVOID)&CommandBoxInfo); ═══ 12.2.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_COMMAND. ═══ 12.3. ERESFindChangeDlgProc : ═══ ═══ 12.3.1. Description(Find/Change dialog procedure) ═══ This dialog allows find/change commands to be entered directly from it. ═══ 12.3.2. FINDBOXINFO Structure ═══ Size The size of the FINDBOXINFO structure. Hini The handle to the applications INI file. FindText Text to fill the find entry field with. HwndEdit Window handle of the EMLE. This dialog can be called using the WinDlgBox() function. For example: Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESFindChangeDlgProc) o Resource - Where the dialog resource is located (ERES) o Dlgid - Dialog id (DLG_CHANGE). o CreateParam - Dialog creation parameter. Must be set to(&FindBoxInfo). Example FINDBOXINFO FindBoxInfo; FindBoxInfo.Size = sizeof(FINDBOXINFO); FindBoxInfo.Hini = Hini; FindBoxInfo.FindText = ""; FindBoxInfo.HwndApp = HwndApplication; FindBoxInfo.HwndEdit = HwndEMLE; WinDlgBox(HWND_DESKTOP, hwnd, ERESFindChangeDlgProc, HModuleERES, DLG_CHANGE, &FindBoxInfo); ═══ 12.3.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_CHANGE. ═══ 12.4. ERESSettingsDlgProc ═══ ═══ 12.4.1. Description(Settings dialog procedure) ═══ Allow edit window options to be configured from dialog box. This dialog allows configuration of edit window options. These options include setting margins, autosave level, tabs, colors, paths, fonts, and enter keys. ═══ 12.4.2. SETBOXINFO Structure ═══ Size The size of the SETBOXINFO structure. Hini The handle to the applications INI file. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. Pages Specifies what pages of the Settings dialog to display. Bits 0-6 each correspond to seven pages of the dialog. If a page bit is 0 the page is displayed, if 1 then it is omitted. Therefore setting this field to 0 will insure that all pages are displayed. Options Options bit field. Bit 0 is set if you have the spell checking package. All other fields are currently reserved. This dialog can be called using the WinDlgBox() function. For example: Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESSettingsDlgProc) o Resource - Where the dialog resource is located (ERES) o Dlgid - Dialog id (DLG_SETTINGS) o CreateParam - Dialog creation parameter. Must be set to(&SetBoxInfo). Example SETBOXINFO SetBoxInfo; SetBoxInfo.Size = sizeof(SETBOXINFO); SetBoxInfo.Hini = Hini; SetBoxInfo.HwndApp = HwndApplication; SetBoxInfo.HwndEdit = HwndEMLE; SetBoxInfo.Pages = 0; SetBoxInfo.Options = 1; WinDlgBox(HWND_DESKTOP, HwndEMLE, (PFNWP)ERESSettingsDlgProc, HModuleERES, DLG_SETTINGS, (PVOID)&SetBoxInfo); ═══ 12.4.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_STYLEDLG. ═══ 12.5. ERESQuitBoxDlgProc ═══ ═══ 12.5.1. Description(Quit box dialog procedure) ═══ Sample Quit box dialog which handles EPM_EDIT_ASKTOxxx messages. This dialog informs the user that a file has been modified. It includes an entry field to specify what name the modifications should be saved as, and the pushbuttons: Save , Discard, Cancel, and Help. This dialog can be called using the WinDlgBox() function. ═══ 12.5.2. QUITBOXINFO Structure ═══ Size The size of the QUITBOXINFO strucuture. Filename The filename to display in the dialogs entry field. DlgTitle The title of the dialog. DlgMessage The message to display in the dialog. HwndApp The Window handle of the application. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESQuitBoxDlgProc) o Resource - Where the dialog resource is located (ERES) o Dlgid - Dialog id (DLG_QUITBOX) o CreateParam - Dialog creation parameter. Must be set to(PQUITBOXINFO). This dialog returns one of the following codes. o ERES_SAVE - Save was selected. File name is stored in QUITBOXINFO.filename o ERES_CANCEL - Cancel was selected. o ERES_DISCARD - Discard was selected. Example QUITBOXINFO QuitBoxInfo; QuitBoxInfo.Size = sizeof(QUITBOXINFO); QuitBoxInfo.Filename = "myfile"; QuitBoxInfo.DlgTitle = "Quit Dialog" QuitBoxInfo.DlgMessage = "Would you like to save this file"; QuitBoxInfo.HwndApp = HwndApplication; WinDlgBox(HWND_DESKTOP, (HWND)HwndApplication, (PFNWP)ERESQuitDlgProc, HModuleERES, DLG_QUITBOX, (PVOID) &QuitBoxInfo); ═══ 12.5.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_QUIT. ═══ 12.6. ERESUndoDlgProc ═══ ═══ 12.6.1. Description(Undo dialog procedure) ═══ Allows users to go to a previous undo state of the current file. ═══ 12.6.2. UNDOBOXINFO Structure ═══ Size The size of the UNDOBOXINFO Structure. Hini The handle to the applications INI file. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESUndoDlgProc) o Resource - Set to the handle of the EKTRxxx.dll module. o Dlgid - Dialog id (DLG_UNDO) o CreateParam - Dialog creation parameter. Must be set to(PUNDOBOXINFO). Example UNDOBOXINFO UndoBoxInfo; UndoBoxInfo.Size = sizeof(UNDOBOXINFO); UndoBoxInfo.Hini = Hini; UndoBoxInfo.HwndApp = HwndApplication; UndoBoxInfo.HwndEdit = HwndEMLE; WinDlgBox(HWND_DESKTOP, HwndEMLE, (PFNWP)ERESUndoDlgProc, HModuleERES, DLG_UNDO, (PVOID)&UndoBoxInfo); ═══ 12.6.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_UNDO. ═══ 12.7. ERESPrintDlgProc ═══ ═══ 12.7.1. Description(Print dialog procedure) ═══ Print Dialog which allows users to select the print queue to send the file to and also preview the file. ═══ 12.7.2. PRINTBOXINFO Structure ═══ Size The size of the PRINTBOXINFO strucuture. Hini The handle to the applications INI file. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESPrintDlgProc) o Resource - Set to the handle of the EKTRxxx.dll module. o Dlgid - Dialog id (DLG_UNDO) o CreateParam - Dialog creation parameter. Must be set to(PPRINTBOXINFO). Example PRINTBOXINFO PrintBoxInfo; PrintBoxInfo.Size = sizeof(PRINTBOXINFO); PrintBoxInfo.Hini = Hini; PrintBoxInfo.HwndApp = HwndApplication; PrintBoxInfo.HwndEdit = HwndEMLE; WinDlgBox(HWND_DESKTOP, HwndEMLE, (PFNWP)ERESPrintDlgProc, HModuleERES, DLG_PRINT, (PVOID)&PrintBoxInfo); ═══ 12.7.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to DPR_HELP. ═══ 12.8. ERESProofDlgProc ═══ ═══ 12.8.1. Description(Proof dialog procedure) ═══ Proof Dialog which allows users to proof read a file. ═══ 12.8.2. PROOFBOXINFO Structure ═══ Size The size of the PROOFBOXINFO strucuture. Hini The handle to the applications INI file. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. AutoSuggest This field initializes the Auto Suggest check box in the dialog. This field is ignored if Hini and AppName are initializated, in which case the Auto Suggest check box is initialized with the current setting in the ini file. AppName Application name to use when accessing the INI file. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESProofDlgProc) o Resource - Set to the handle of the EKTRxxx.dll module. o Dlgid - Dialog id (DLG_PROOF) o CreateParam - Dialog creation parameter. Must be set to(PPROOFBOXINFO). Example PROOFBOXINFO ProofBoxInfo; ProofBoxInfo.size = sizeof(PROOFBOXINFO); ProofBoxInfo.Hini = Hini; ProofBoxInfo.HwndApp = HwndAppClient; ProofBoxInfo.HwndEdit = HwndActiveEdit; ProofBoxInfo.IniAppName = "EMLE_SAMP"; ProofBoxInfo.ListFilled = 0; WinDlgBox(HWND_DESKTOP, HwndAppClient, (PFNWP)ERESProofDlgProc, HModuleERES, DLG_PROOF, (PVOID)&ProofBoxInfo); ═══ 12.8.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_PROOFDLG. ═══ 12.9. ERESRingDlgProc ═══ ═══ 12.9.1. Description(Ring dialog procedure) ═══ Displays the files in the EMLE ring. ═══ 12.9.2. RINGBOXINFO Structure ═══ Size The size of the RINGBOXINFO structure. Hini The handle to the applications INI file. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESRingBoxDlgProc) o Resource - Set to the handle of the EKTRxxx.dll module. o Dlgid - Dialog id (DLG_RING) o CreateParam - Dialog creation parameter. Must be set to(PRINGBOXINFO). Example RINGBOXINFO RingBoxInfo; RingBoxInfo.Size = sizeof(RINGBOXINFO); RingBoxInfo.Hini = Hini; RingBoxInfo.HwndApp = HwndApplication; RingBoxInfo.HwndEdit= HwndEMLE; WinDlgBox(HWND_DESKTOP, HwndEMLE, (PFNWP)ERESRingDlgProc, HModuleERES, DLG_RING, (PVOID)&RingBoxInfo); ═══ 12.9.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_RING. ═══ 12.10. ERESMsgDlgProc ═══ ═══ 12.10.1. Description(Message dialog procedure) ═══ Displays a list of messages. ═══ 12.10.2. MSGBOXINFO Structure ═══ Size The size of the MSGBOXINFO structure. HwndApp Window handle of the application. MsgText Message text to display in the entry field of the dialog. List Pointer to a Dialog List. Displays the Dialog List in the dialogs list box. If this is set to NULL then the dialog automatically retrieves and stores its lists in the applications ini file under the Application name and Key name given. AppName Application name to use when storing and retrieving information in the INI file. If this is set to NULL the dialog will store and retrieve its list information in the Dialog List specified in the list field. KeyName Key to use when storing and retrieving information in the INI file. If this is set to NULL the dialog will store and retrieve its list information in the Dialog List specified in the list field. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESMsgBoxDlgProc) o Resource - Set to the handle of the EKTRxxx.dll module. o Dlgid - Dialog id (DLG_MSGBOX) o CreateParam - Dialog creation parameter. Must be set to(PMSGBOXINFO). Example MSGBOXINFO MsgBoxInfo; MsgBoxInfo.Size = sizeof(MSGBOXINFO); MsgBoxInfo.HwndApp = HwndAppClient; MsgBoxInfo.MsgText = mp2; MsgBoxInfo.List = &MsgDlgList; MsgBoxInfo.Hini = Hini; MsgBoxInfo.AppName = (PSZ)0; MsgBoxInfo.KeyName = (PSZ)0; WinDlgBox(HWND_DESKTOP, HwndActiveEdit, (PFNWP)ERESMsgBoxDlgProc, HModuleERES, DLG_MSGBOX, (PVOID)&MsgBoxInfo); ═══ 12.10.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_MSGBOX. ═══ 12.11. ERESStyleDlgProc ═══ ═══ 12.11.1. Description(Style dialog procedure) ═══ Allows users to register and apply styles to active file in the EMLE. ═══ 12.11.2. STYLEBOXINFO Structure ═══ Size The size of the STYLEBOXINFO structure. Hini The handle to the applications INI file. HwndApp Window handle of the application. HwndEdit Window handle of the EMLE. Type This field must be set to STYLEDLG_DIALOG. All other values are reserved. Owner This field is a reserved field and must be set to 0. This dialog can be called using the WinDlgBox() function. Example WinDlgBox(Parent, Owner, DlgProc, Resource, Dlgid, CreatParam); o Parent - Window handle of the parent of the dialog o Owner - Window handle of the owner of the dialog o DlgProc - Window procedure of the dialog (ERESStyleDlgProc) o Resource - Set to the handle of the EKTRxxx.dll module. o Dlgid - Dialog id (DLG_STYLE) o CreateParam - Dialog creation parameter. Must be set to(PSTYLEBOXINFO). Example STYLEBOXINFO StyleBoxInfo; StyleBoxInfo.Size = sizeof(STYLEBOXINFO); StyleBoxInfo.Hini = Hini; StyleBoxInfo.HwndApp = HwndApplication; StyleBoxInfo.HwndEdit = HwndEMLE; StyleBoxInfo.Type = STYLEDLG_DIALOG; StyleBoxInfo.Owner = 0; WinDlgBox(HWND_DESKTOP, HwndEMLE, (PFNWP)ERESStyleDlgProc, HModuleERES, DLG_STYLE, (PVOID)&StyleBoxInfo); ═══ 12.11.3. Processing Help ═══ When the help button of this dialog is pressed an EPM_POPHELPMGRPANEL message is sent to HwndEdit with mp1 set to HELP_STYLEDLG. ═══ 13. ERES Functions ═══ ═══ 13.1. ERESSaveDlgList ═══ ERESSaveDlgList - (Save a dialog list) ────────────────────────────────────────────────────────────────────────────── Save an applications list to an INI file. ┌───────────────────────────────────────────────────────────────── │ ERESSaveList ( Hini, List, AppName, KeyName, , ) └───────────────────────────────────────────────────────────────── Parameters Hini ( HWND ) - input Handle to the INI file to place the dialog list in. List ( PLISTDLG ) - input Pointer to a dialog list to be saved. AppName ( PSZ ) - input Application name to use when saving to the INI file. KeyName ( PSZ ) - input Key name to use when saving to the INI file. Returns rc ( VOID ) - Remarks This function is used to save an applications dialog list to an INI file. Dialog list are used by the Command, Open, and Message dialog. Example DLGLIST MsgDlgList; ERESSaveList(Hini, &MsgDlgList, "EMLE_SAMP", "MsgList"); Related Functions ERESRetrieveDlgList ═══ 13.2. ERESRetrieveDlgList ═══ ERESRetrieveDlgList - (Retrieve a dialog list) ────────────────────────────────────────────────────────────────────────────── Retrieves a dialog list from an INI file. ┌───────────────────────────────────────────────────────────────── │ ERESRetrieveList ( Hini, List, AppName, KeyName, , ) └───────────────────────────────────────────────────────────────── Parameters Hini ( HWND ) - input Handle to the INI file to place the dialog list in. List ( PLISTDLG ) - input Pointer to a dialog list to be retrieved. AppName ( PSZ ) - input Application name to use when accessing the INI file. KeyName ( PSZ ) - input Key name to use when accessing the INI file. Returns rc ( VOID ) - Remarks This function is used to retrieve an applications dialog list from an INI file. Dialog list are used by the Command, Open, and Message dialog. Example DLGLIST MsgDlgList; ERESRetrieveDlgList(Hini, &MsgDlgList, "EMLE_SAMP", "MsgList"); Related Functions ERESSaveDlgList ═══ 13.3. ERESAddToWndList ═══ ERESAddToWndList - (Add window to list) ────────────────────────────────────────────────────────────────────────────── Adds a window to a window list. ┌───────────────────────────────────────────────────────────────── │ ERESAddToWndList ( HwndList, Hwnd, , ) └───────────────────────────────────────────────────────────────── Parameters HwndList ( PHWNDLIST ) - input Pointer to a handle to window list. Hwnd ( HWND ) - input Window handle to add to the list. Returns rc ( VOID ) - Remarks ERESAddToWndList is used to add a window to a window list. Example HWNDLIST HwndList; ERESAddToWndList(&HwndList, HwndEdit); Related Functions ERESDeleteFromWndList ERESShowWndList ═══ 13.4. ERESDeleteFromWndList ═══ ERESDeleteFromWndList - (Deletes a window from a list) ────────────────────────────────────────────────────────────────────────────── Adds a window to a window list. ┌───────────────────────────────────────────────────────────────── │ ERESDeleteFromWndList ( HwndList, Hwnd, , ) └───────────────────────────────────────────────────────────────── Parameters HwndList ( PHWNDLIST ) - input Pointer to a handle to window list. Hwnd ( HWND ) - input Window handle to add to the list. Returns rc ( VOID ) - Remarks ERESDeleteFromWndList is used to delete a window to a window list. Example HWNDLIST HwndList; ERESDeleteFromWndList(&HwndList, HwndEdit); Related Functions ERESAddToWndList ERESShowWndList ERESCountWndList ═══ 13.5. ERESShowWndList ═══ ERESShowWndList - (Display a window list) ────────────────────────────────────────────────────────────────────────────── Displays window list dialog. ┌───────────────────────────────────────────────────────────────── │ ERESShowList ( HwndParent, HwndList, , ) └───────────────────────────────────────────────────────────────── Parameters HwndParent ( HWND ) - input Window which will be the parent of the window list dialog. HWndList ( PHWNDLIST ) - input Pointer to a handle to window list. Returns rc ( VOID ) - Remarks ERESShowWndList displays a dialog with a list of all EMLEs in the list. The user can activate any EMLE in the list. Example HWNDLIST HwndList; HWND HwndApplication; ERESShowList(HwndApplication, &HwndList); Related Functions ERESDeleteWndFromList ERESAddWndToList ERESCountWndList ═══ 13.6. ERESCountWndList ═══ ERESCountWndList - (Counts window list) ────────────────────────────────────────────────────────────────────────────── Returns the number of windows in the window list. ┌───────────────────────────────────────────────────────────────── │ ERESCountWndList ( HwndList , ) └───────────────────────────────────────────────────────────────── Parameters HWndList ( HWNDLIST ) - input Handle to the window list. Returns rc ( VOID ) - Remarks ERESCountWndList returns the number of windows in the list. Example HWNDLIST HwndList; ERESCountWndList(HwndList); Related Functions ERESDeleteWndFromList ERESAddWndToList ERESShowWndList ═══ 14. E Toolkit Messages ═══ Purpose The following messages are used to interact with an edit window object. Remarks Example EPM_EDIT_OPTION EPM_EDIT_PLAYKEY EPM_EDIT_ACTIVATEFILEID EPM_EDIT_POSTDONE EPM_EDIT_ACTIVEHWND EPM_EDIT_ASKTOCLOSE EPM_EDIT_ASKTODONE EPM_EDIT_ASKTOFAILED EPM_EDIT_QUERYRECORDKEY EPM_EDIT_ASKTOQUIT EPM_EDIT_RECORDKEY EPM_EDIT_CHAR EPM_EDIT_RETCODE EPM_EDIT_CLIPBOARDCOPY EPM_EDIT_SAYERROR EPM_EDIT_CLIPBOARDPASTE EPM_EDIT_COMMAND EPM_EDIT_SHOW EPM_EDIT_COMMAND2 EPM_EDIT_TURN_OFF_HIGHLIGHT EPM_EDIT_CONTROLTOGGLE * ( need access to CONTROL constants.) EPM_EDIT_CURSORMOVE EPM_EDIT_VERSION EPM_EDIT_WIN2DOC * (Jason needs to document this one.) EPM_EDIT_DESTROYNOTIFY EPM_EDIT_DESTROYRC EPM_EXTRAWINDOW_REFRESH EPM_EDIT_DOC2WIN * (Jason needs to document this one.) EPM_FRAME_MESSAGELINE EPM_FRAME_STATUSLINE EPM_EDIT_ENDRECORDKEY EPM_EDIT_TASKLIST ------------- TODO ---------------- EPM_EDIT_EXEC_DYNALINK * (GAC has to document this one.) EPM_GET_ERROR_MESSAGE EPM_EDIT_EXEC_PROC EPM_IS_HELP_LOADED EPM_EDIT_GETMEM EPM_PRINT_RENDERPAGE EPM_EDIT_GETPROFILE EPM_PRINT_RENDERPAGERC EPM_EDIT_HELPNOTIFY EPM_QHELP_TABLE EPM_EDIT_ID EPM_QUERY_GLOBDATA EPM_EDIT_MINMAXFRAME EPM_SEND_MACROS_ERRORS EPM_EDIT_NEWFILE ----------------------------------- Note: Editor messages are either request messages or notify messages. Request messages are messages sent or posted to the control to request and action or to query a value. In most cases, the application, a seperate control, or subclassing window procedure is the source of these messages, but on occasion, the control may send or post such messages to itself so as to provide an opportunity for a subclassing procedure to intercept these messages. Inform messages are messages sent or posted by the control to let the application or subclassing procedure know that events have occured. In order to provide a more object oriented design approach, the control will usually transmit notify messages to itself rather than to an owner, parent or sibling. To intercept these messages, one must subclass the control. ═══ 14.1. EPM_EDIT_VERSION ═══ EPM_EDIT_VERSION Sent TO an E-MLE window Return the E-Toolkit version number. Parameters param1 NULL (MPARAM) Not used. param2 NULL (MPARAM) Not used. Returns Version (LONG) Version number of the ETKExxx.DLL. ═══ 14.2. EPM_EDIT_TURN_OFF_HIGHLIGHT ═══ EPM_EDIT_TURN_OFF_HIGHLIGHT (Turn Off Highlight) - Sent TO an E-MLE window Clear text circled by the CIRCLEIT macro. Parameters param1 NULL (MPARAM) Not used. param2 NULL (MPARAM) Not used. Returns NULL (MRESULT) Remarks ═══ 14.3. EPM_EDIT_QUERY_HELP_INSTANCE ═══ EPM_EDIT_QUERY_HELP_INSTANCE (Query Help Instance) - Sent FROM an E-MLE window The following is a request from the etoolkit for the handle of the help instance Parameters param1 NULL (MPARAM) Not used. param2 NULL (MPARAM) Not used. Returns NULL (MRESULT) Remarks This is how EPM.EXE handles this messages. Example case EPM_EDIT_QUERY_HELP_INSTANCE: if(!GlobData->hwndHelpInstance) { GlobData->hwndHelpInstance = WinCreateHelpInstance(GlobData->hAB,&GlobData->hmiHelpData); } return(GlobData->hwndHelpInstance); break; ═══ 14.4. EPM_EDIT_DELETEFILE ═══ EPM_EDIT_DELETEFILE Delete the file specified in mp1 from disk and free pointer Parameters param1 filename (PSZ) Fully qualified file name. param2 NULL (MPARAM) Not used Returns NULL (MRESULT) Remarks ═══ 14.5. EPM_EDIT_ACTIVATEFILEID ═══ EPM_EDIT_ACTIVATEFILEID Activate a file corresponding to the specified file identifier. Parameters param1 fileid (LONG) A file identifier that could be obtained using the EtkQueryFileID function. param2 NULL (MPARAM) Returns NULL (MRESULT) Remarks ═══ 14.6. EPM_EDIT_CHAR ═══ EPM_EDIT_CHAR (Issue a WM_CHAR message) An alternative to the WM_CHAR message. It is handled exactly in the same manner as WM_CHAR. Parameters param1 mp1 (MPARAM) See WM_CHAR in the PM Tech. Ref. param2 mp2 (MPARAM) See WM_CHAR in the PM Tech. Ref. Returns Remarks ═══ 14.7. EPM_EDIT_CLIPBOARDCOPY ═══ EPM_EDIT_CLIPBOARDCOPY Fast path to inserting text into the PM Clipboard. Parameters param1 pTextBuf (PVOID) Pointer to a memory buffer containing text to copy to the clipboard. The text is in a format described by mp2. param2 mp2 (ULONG) Flag that describes what format of the memory buffer, which was passed in mp1. Example 0 = CF_TEXT type buffer, terminated by nul 1 = EPM shared memory buffer (32byte head) Returns Remarks When the contents of mp1 is copied to the clipboard an EPM defc event is called by the name of PROCESSCLIPBOARDCOPY. Arg(1) of this function is the original buffer passed in as mp1. The caller may choose to free the buffer during this command. If zero is passed as arg(1), an error was encountered. An error message should be displayed at this point. ═══ 14.8. EPM_EDIT_COMMAND ═══ EPM_EDIT_COMMAND Issue a command to the E-MLE Parameters param1 EditCommand (PSZ) Any legal editor command. (See EPM Technical Reference for build-in commands, and EPM Users Guide for commands in the base E Macros) param2 CommandFlags (ULONG) The following command flags can be set with the EPM_EDIT_COMMAND message: o COMMAND_SYNC - the command is sent to the edit interpreter thread and is executed immediately or after the last command. o COMMAND_FREESEL - free the memory point to by mp1 one when done. o COMMAND_GETABLE - the pointer in parameter one is getable memory. Returns void Remarks This message is the main source of communication to editor windows. To send a message to a specific file, send any legal editor command (in string form) to the associated edit window handle. Legal editor commands consist of any of the base editor commands or any user defined commands. User commands can be created within the editor macro language via DEFC's. For command return codes see the EPM_EDIT_RETCODE message. See Appendix B for a complete list of commands By default all commands sent or posted to edit windows are copied and posted to the editor interpreter thread. By setting the COMMAND_SYNC flag the command is sent to the editor interpreter, therefore it will be executed immediately or after the currently executing command completes. Note: This creates the possibility of deadlock. One should avoid the COMMAND_SYNC flag or anything that cause one thread to wait for the other thread. Deedlock can only occur when the EPM_STYLE_ASYNC style is used when creating the EMLE. When EPM_STYLE_ASYNC is specified the E Interpreter runs in a separate thread. When an application other then the one that created an edit window wishes to send a command to an edit window, that application must allocate a shared segment for the command string (parameter one). The COMMAND_GETABLE flag notifies the E Toolkit that the pointer in parameter one is that of a getable shared segment. When an application wants the memory pointed to by parameter one to be freed after it is used by the E Toolkit, the COMMAND_FREESEL flag must be set. This flag is only valid for memory allocated within the application that created the edit window. A pointer to getable shared memory can't be freed by the E Toolkit with this message. ═══ 14.9. EPM_EDIT_COMMAND2 ═══ EPM_EDIT_COMMAND2 (Execute Command) - Sent TO an E-MLE window Same as EPM_EDIT_COMMAND, but if the command does not exist, no error message is generated. Parameters param1 () See EPM_EDIT_COMMAND param2 () See EPM_EDIT_COMMAND Returns See EPM_EDIT_COMMAND Remarks ═══ 14.10. EPM_EDIT_RETCODE ═══ EPM_EDIT_RETCODE Message return code from an edit command. Parameters param1 ReturnCodeString (PSZ) Text describing the return code. param2 ReturnCode (ULONG) specific editor return code. Remarks This message is in response to a internal editor return code or error code. See Appendix C for editor return codes. ═══ 14.11. EPM_EDIT_CURSORMOVE ═══ EPM_EDIT_CURSORMOVE Cursor move notification. Parameters param1 row (ULONG) row of cursor in file param2 column (ULONG) column of cursor in file Remarks This message gives the owner the ability to track the editor's cursor. See sample 1. ═══ 14.12. EPM_EDIT_ACTIVEHWND ═══ EPM_EDIT_ACTIVEHWND Notify application that a specific edit window has become active. Parameters param1 HwndEMLE (HWND) Handle of active edit window. param2 ActiveFileName (PSZ) Full path of top most file being edited in active edit window. Remarks Processing this message is useful if more than one edit window is being used by a given application. The application does not need to keep global information on each edit window because it is returned via this message. ═══ 14.13. EPM_EDIT_OPTIONS ═══ EPM_EDIT_OPTIONS (Get Editor Option Information) - Sent TO E-MLE Get a specified piece of editor information. Parameters param1 OptionNumber (ULONG) OPTIONS_xxxxx constant. (See Remarks.) param2 Buffer (PVOID) Used by some options. Returns The returned value depends on the option selected. Parameter 1 can be set to one of the following options: OPTIONS_MARGINS Returns 4 bytes containing (lo to hi): left marg (CHAR), right marg (CHAR), paragraph margin (CHAR), 0 (CHAR). OPTIONS_LINE Returns line of file that contains the cursor. (ULONG) OPTIONS_COLUMN Returns column of file that contains the cursor. (ULONG) OPTIONS_INSERT Returns TRUE if cursor is in insert mode. (ULONG) OPTIONS_AUTOSAVE Returns the number of changes before autosave. (ULONG) OPTIONS_NTABS Returns the number of tab stops. (ULONG) OPTIONS_NROWS Returns the total number of rows visible in the E-MLE. (uses the default font height as a measument.) OPTIONS_NCOLS Returns the total number of columns visible in the E-MLE. (uses the default font width as a measument.) (ULONG) OPTIONS_MODIFY Returns TRUE if the file has been modified. (last save) (ULONG) OPTIONS_TAB Returns a pointer to a byte-table of tab values. The table is terminated by a NULL character. (PBYTE) OPTIONS_SEARCH Returns the last string searched by locate or change. (PSZ) OPTIONS_GETTEXT Returns the line of text specified by high word of option parameter. If high word is NULL the the line in which the cursor is currently on is returned. Parameter 2 must contain a pointer to a MAXCOL byte character array. The specified line will be placed into this buffer. (PSZ) OPTIONS_NAME Returns the name of the visible file. OPTIONS_TEXTCOLOR Returns the text Foreground (LOUSHORT) and Background (HIUSHORT). OPTIONS_RING Returns a buffer filled with the name of the files within the E-MLE ring. The buffer has the following format: Example USHORT - length of filenames UCHAR - delimitor FIDTYPE - fileid CHAR[] - delimited string OPTIONS_FILEID Returns the File ID of the visible file. OPTIONS_QSELECTION Returns the type of selection. This message is send to a edit window to get a specified option. All options are returned in the form of a 4 byte return code. Here is an example of using the Option message to get the total numbers of visible lines in a edit window. Example VisibleLines = (ULONG)WinSendMsg( hwndEditWindow, EPM_EDIT_OPTIONS, OPTIONS_NROWS, 0L ); ═══ 14.14. EPM_EDIT_ID ═══ EPM_EDIT_ID Query Editor ID number Purpose Determine if a window handle is your E-MLE window. Parameters param1 NULL (MPARAM) Not used param2 NULL (MPARAM) Not used Remarks This message is used to determine if a window handle is an EMLE window handle. This message returns a 32 bit return code. To determine if the specified handle is a edit window check if the Hi-order word contains the value of EPM_EDIT_ID and the Lo-order word contains the value specified in the EMLE create structure field, 'editid'. If a match is found in the Hi-order word then the window handle is a edit window. If a match is found in both the Hi-order word and the Lo-order word, then the window handle is a edit window created by your application. An example follows: Example result = WinSendMsg( hwndE, EPM_EDIT_ID, 0L, 0L ); match = MPFROM2SHORT(epm.editid,EPM_EDIT_ID); if (result==match) { /* Edit window found */ } ═══ 14.15. EPM_EDIT_SHOW ═══ EPM_EDIT_SHOW Refresh and Show/Hide the edit window specified. Parameters param1 ShowFlag (BOOL) TRUE = Show and Refresh edit window FALSE = Hide edit window param2 NULL (MRESULT) Not used Remarks It is recommended that an EPM_EDIT_SHOW message be sent to the edit window to be displayed or hidden instead of WinShowWindow(...). The difference being EPM_EDIT_SHOW forces a window repaint. ═══ 14.16. EPM_EDIT_DESTROYNOTIFY ═══ EPM_EDIT_DESTROYNOTIFY Notify owner that an E-MLE window has been closed. Parameters param1 HwndEMLE (HWND) Window handle of the E-MLE window that was just closed. param2 MsgQueue (HMQ) Handle to the message queue formally being used by the E-MLE window that was just closed. Returns void Remarks This message gives the owner the ability to take some action when a edit window is closed. Note that the window handle passed is not valid since the edit window has been destroyed. It is to be used for reference only. This is the only message that is sent to the owner of the edit window. ═══ 14.17. EPM_EDIT_RECORDKEY ═══ EPM_EDIT_RECORDKEY Start the recording of keystrokes (WM_CHAR messages) sent to the edit window. Parameters param1 NULL (MPARAM) Not used param2 NULL (MPARAM) Not used Returns void Remarks ═══ 14.18. EPM_EDIT_ENDRECORDKEY ═══ EPM_EDIT_ENDRECORDKEY Terminates the storing of keystrokes (WM_CHAR messages) started by the EPM_EDIT_RECORDKEY message. Parameters param1 NULL (MPARAM) Not used param2 NULL (MPARAM) Not used Returns void Remarks ═══ 14.19. EPM_EDIT_PLAYKEY ═══ EPM_EDIT_PLAYKEY (Execute stored keystrokes) - Sent TO an E-MLE Generate keystrokes (WM_CHAR messages) saved since the EPM_EDIT_RECORDKEY message has been sent. Parameters param1 NULL (MPARAM) Not used param2 NULL (MPARAM) Returns void Remarks It is recommend that a EPM_EDIT_ENDRECORDKEY message be sent before this message is sent. If the edit window is still in record mode when the message is sent an error message is sent to the owner window. ═══ 14.20. EPM_EDIT_QUERYRECORDKEY ═══ EPM_EDIT_QUERYRECORDKEY (Determine record key state) Returns TRUE if edit window is recording keys. param1 NULL (MPARAM) Not used param2 NULL (MPARAM) Returns TRUE = edit window is recording keys. Remarks ═══ 14.21. EPM_EDIT_ASKTOQUIT ═══ EPM_EDIT_ASKTOQUIT (Request to quit a modified file) Notify application that a request has been sent to quit a file which has been modified. Parameters param1 filename (PSZ) Name of file that has been modified. param2 HwndEMLE (HWND) The edit window's handle. Remarks This message is sent after the E toolkit has received notice to quit a modified file. The application must respond to this message by sending an EPM_EDIT_ASKTODONE message. When an application receives this message it is a good time to pop a dialog to the user asking what action to take. (See the Quitbox dialog for an example ) Related Information Example EPM_EDIT_ASKTOCLOSE EPM_EDIT_ASKTOFAILED EPM_EDIT_ASKTODONE ═══ 14.22. EPM_EDIT_ASKTOCLOSE ═══ EPM_EDIT_ASKTOCLOSE (Request to close an edit window) Notify application that a request has be sent to close an edit window which contains a file that has been modified. Parameters param1 filename (PSZ) Name of file that has been modified. param2 HwndEMLE (HWND) The edit window's handle. Remarks This message is sent after the E toolkit has received notice to close an edit window which contains a modified file. The application must respond to this message by sending an EPM_EDIT_ASKKTODONE message. Related Information Example EPM_EDIT_ASKTOQUIT EPM_EDIT_ASKTOFAILED EPM_EDIT_ASKTODONE ═══ 14.23. EPM_EDIT_ASKTODONE ═══ EPM_EDIT_ASKTODONE (Respond to EPM_EDIT_ASKTOxxx message) Respond to one of the EPM_EDIT_ASKTOxxx messages from the E toolkit. Parameters param1 retcode (ULONG) Response message sent to E toolkit. One of the following messages can be used: o ERES_CANCEL - Cancel the closing of the file or edit window. o ERES_DISCARD - Discard the modifications and continue closing. o ERES_SAVE - Save file as message parameter two and continue closing. param2 filename (PSZ) Name of file to save modifications in if EPM_SAVE is sent. This pointer must be the same pointer sent to the applications with one of the EPM_EDIT_ASKTOxxx messages. Remarks This message allows the application control the saving or discarding of a modified file when an edit window is closing, a quit file message has been sent, or when a previous EPM_EDIT_ASKTODONE message returned EPM_EDIT_ASKTOFAILED. Related Information Example EPM_EDIT_ASKTQUIT EPM_EDIT_ASKTOCLOSE EPM_EDIT_ASKTODONE ═══ 14.24. EPM_EDIT_ASKTOFAILED ═══ EPM_EDIT_ASKTOFAILED (Last EPM_EDIT_ASKTODONE failed) Notify application that the file name sent with the last EPM_EDIT_ASKTODONE message could not be saved with the name specified. Parameters param1 filename (PSZ) File name used which caused an error in saving. param2 HwndEMLE (HWND) The window handle of the EMLE. Remarks This message informs the application that the file name sent with the EPM_EDIT_ASKTODONE message and message parameter EPM_SAVE, was a bad file name. The application should correct the file name and send another EPM_EDIT_ASKTODONE message. Related Information Example EPM_EDIT_ASKTQUIT EPM_EDIT_ASKTOCLOSE EPM_EDIT_ASKTOFAILED ═══ 14.25. EFRAMEM_TOGGLECONTROL ═══ EFRAMEM_TOGGLECONTROL (Toggle controls of an EFrame) Toggling, or setting on or off the controls of an EFrame. Parameters param1 EFrameControl (ULONG) The lo-ordered short of this parameter contains an id number that determines the control window. It can be any of the EFRAMEF_* constants. The hi-ordered short of this message parameter contains an optional value. If the value is 0 then the specified control is toggled. If the value is set to 1 then the control is not shown. If the value is set to 2 the control is shown. param2 QueryControl (ULONG) contains a Query Flag. If parameter 2 is non-zero the current status of the control specified is returned. Remarks Related Information Example ═══ 14.26. EPM_QUERYHINI ═══ EPM_QUERYHINI Request from the Base E Macros for the handle to the INI file to use to store its information in. Parameters param1 NULL (MPARAM) param2 NULL (MPARAM) Returns Hini (HINI) The handle to your applications INI file. Remarks The Base E Macros stores various information in the HINI file such as the default font and color. In addition all information set when using the Settings Dialog is stored in this INI file. ═══ 15. Etk Types ═══ ═══ 15.1. ATTRIBRECTYPE ═══ ATTRIBRECTYPE - Attribute Record Type typedef struct { USHORT Col; //Column of the attribute record ATTRIBCLASSTYPE Class; //Attribute Class UCHAR IsPush; //1=Push Attribute, 2=POP Attribute ATTRIBVALUETYPE Value; //Value of the Attribute. //The meaning of the value field depends on the //attribute class being used. } ATTRIBRECTYPE; Remarks See the section "Attribute Pairs" in "The EPM Technical Reference" for a description of Attribute support. The only Classes currently supplied by the Tool-Kit are COLORCLASS and FONTCLASS. In order for Color and Font Attributes to be rendered the .levelofattributesupport file variable must be set to the correct value. See "The EPM Technical Reference" for more information about .levelofattributesupport. The COLORCLASS currently supports only 16 colors. The Value field for the COLORCLASS is a byte with the high nibble being the background color and the low nibble being the foreground color. Use the CLR_* color constants defined in the OS/2 Programming Tool-Kit. When using the FONTCLASS the Value field is set to a Font ID gotten with either EtkRegisterFont() or EtkRegisterFont2(). See sample 4 for an example of using the Font and Color Class. Users can also add their own Attribute Classes. ═══ 15.2. ATTRSTRING ═══ ATTRSTRING - Attribute String type typedef struct _ATTRSTRING { PATTRIBRECTYPE ALAttr; //Pointer to the attribute record one element //beyond the last attribute record. PATTRIBRECTYPE Attrs; //Pointer to the array of attribute records //for the line. PCHAR SelfPtr; //Pointer to this structure. SHORT TextLen; //Length of the Text string. CHAR Text[1]; //Text buffer. } ATTRSTRING; Remarks This structure should be dynamically allocated by your application. The size allocated for the structure should be the size of ATTRSTRING plus the length of the string to be copied to the Text field. See the example in the section on EtkInsertText(). Since the ALAttr field is required, the Attribute Record array must be allocated with at least 2 elements. The Attrs field and ALAttr field can't be set to the same value. ═══ 15.3. LSTRING ═══ LSTRING - Length String typedef struct { LSTRINGLENTYPE lsLength; //length of the string unsigned char Data[MAXCOL]; //string } LSTRING; Remarks LSTRING types are used by some of the Etk functions. ═══ 15.4. Sample 1 ═══ ═══ 15.5. Sample 2 ═══ ═══ 15.6. Sample 3 ═══ ═══ 15.7. Sample 4 ═══ ═══ 16. Appendix ═══ ═══ 16.1. Appendix A - Static Subclassing ═══ ═══ 16.1.1. Static subclassing of an E-MLE ═══ When an application needs to process all message sent to an E-MLE including initial messages such as WM_CREATE, then static subclassing of the E-MLE control is required. Your application must take the following steps to statically subclass an E-MLE: 1. Call EtkRegisterEMLEClass(), to register the E-MLE window class. Example PSZ EMLEClassName; EMLEClassName = EtkRegisterEMLEClass(hab); 2. Query the E-MLE class information. Class information required includes a pointer to the E-MLEs window procedure. The pointer to the E-MLEs window procedure should be stored and used in your new window procedure for any messages you will not be processing. In addition if you want to reserve additional window word storage you can query the amount used by the E-MLE and add the amount that your application requires. Example CLASSINFO EMLEClassInfo, NewClassInfo; PFNWP DefaultEMLEWndProc; USHORT WindowWords; PSZ MY_MLECLASS="MyMLE"; ULONG WindowClassStyle; //Query E-MLE class information WinQueryClassInfo(hab, EMLEClassName, &EMLEClassInfo); //Store the E-MLEs window procedure DefaultEMLEWndProc = EMLEClass.pfnWindowProc; //Add four more bytes to the window word storage WindowWords = EMLEClassInfo.cbWindowData + 4; //Retain the same class style as the E-MLE WindowClassStyle = EMLEClassInfo.flClassStyle; 3. Register your new window class. Example //Register the new window class. //When the window is created your window procedure will be called. //It is your applications responsibility to call the E-MLEs window //procedure for messages you will not process. WinRegisterClass(hab, MY_MLECLASS, MY_MLEWndProc, flStyle, WindowWords); 4. Call WinCreateWindow() using the window class you have registered. Example HwndEMLE = WinCreateWindow(HwndParent, MY_MLECLASS, NULL, 0L, 10, 10, 200, 400, HwndOwner, HWND_TOP, My_EMLE_ID, NULL); ═══ 16.2. Appendix A1 - Field Constants ═══ ═══ 16.2.1. Field Constants ═══ See EPM Technical Reference for a description of the field variables. All field variable constants are defined in edll.h. ═══ 16.3. Appendix B - Editor Commands ═══ ═══ 16.3.1. Editor Commands. ═══ See EPM Users Guide for a list of editor Commands. Note some commands are built-in commands while others are part of the base E Macros. ═══ 16.4. Appendix C - Editor Return codes ═══ ═══ 16.4.1. Editor Return codes ═══ Example .----------------------------------------------------------. | Descriptor Constant | Return Code Value | |----------------------------------------------------------| | SEE_MESSAGE | 0 | |----------------------------------------------------------| | FILE_NOT_FOUND_RC | -2 | |----------------------------------------------------------| | PATH_NOT_FOUND_RC | -3 | |----------------------------------------------------------| | TOO_MANY_OPEN_FILES_RC | -4 | |----------------------------------------------------------| | ACCESS_DENIED_RC | -5 | |----------------------------------------------------------| | MEMORY_CONTROL_BLOCKS_RC | -7 | |----------------------------------------------------------| | INSUFFICIENT_MEMORY_RC | -8 | |----------------------------------------------------------| | INVALID_DRIVE_RC | -15 | |----------------------------------------------------------| | NO_MORE_FILES_RC | -18 | |----------------------------------------------------------| | NUMERIC_OVERFLOW_RC | -254 | |----------------------------------------------------------| | INVALID_NUMBER_ARGUMENT_RC | -255 | |----------------------------------------------------------| | RECURSION_TOO_DEEP_RC | -256 | |----------------------------------------------------------| | INVALID_NUMBER_OF_PARAMETERS_RC | -257 | |----------------------------------------------------------| | OUT_OF_STRING_SPACE_RC | -258 | |----------------------------------------------------------| | EXPRESSION_STACK_OVERFLOW_RC | -259 | |----------------------------------------------------------| | INVALID_FILEID_RC | -260 | |----------------------------------------------------------| | ILLEGAL_OPCODE_RC | -261 | |----------------------------------------------------------| | TOO_MANY_WINDOWS_RC | -262 | |----------------------------------------------------------| | INVALID_ARGUMENT_RC | -263 | |----------------------------------------------------------| | LOOP_STACK_OVERFLOW_RC | -264 | |----------------------------------------------------------| | DIVIDE_BY_ZERO_RC | -265 | |----------------------------------------------------------| | UNABLE_TO_SHRINK_RC | -266 | |----------------------------------------------------------| | INVALID_CALL_BY_REFERENCE_RC | -267 | |----------------------------------------------------------| | PROCEDURE_NEEDS_MORE_ARGUMENTS_ | -268 | |----------------------------------------------------------| | BREAK_KEY_PRESSED_RC | -269 | |----------------------------------------------------------| | NOT_ENOUGH_MEMORY_RC | -270 | +.---------------------------------------------------------+ Example +----------------------------------------------------------+ | ERROR_IN_MARGIN_SETTINGS_RC | -271 | |----------------------------------------------------------| | ERROR_IN_TAB_SETTINGS_RC | -272 | |----------------------------------------------------------| | STRING_NOT_FOUND_RC | -273 | |----------------------------------------------------------| | UNKNOWN_COMMAND_RC | -274 | |----------------------------------------------------------| | MISSING_FILENAME_RC | -275 | |----------------------------------------------------------| | LINE_TOO_LONG_TO_JOIN_RC | -276 | |----------------------------------------------------------| | TOO_MANY_FILES_RC | -277 | |----------------------------------------------------------| | LINES_TRUNCATED_RC | -278 | |----------------------------------------------------------| | TEXT_ALREADY_MARKED_RC | -279 | |----------------------------------------------------------| | TEXT_NOT_MARKED_RC | -280 | |----------------------------------------------------------| | SOURCE_DEST_CONFLICT_RC | -281 | |----------------------------------------------------------| | NEW_FILE_RC | -282 | |----------------------------------------------------------| | LINE_MARK_REQUIRED_RC | -283 | |----------------------------------------------------------| | ERROR_OPENING_FILE_RC | -284 | |----------------------------------------------------------| | ERROR_WRITING_FILE_RC | -285 | |----------------------------------------------------------| | ERROR_READING_FILE_RC | -286 | |----------------------------------------------------------| | INSUFFICIENT_DISK_SPACE_RC | -287 | |----------------------------------------------------------| | BLOCK_MARK_REQUIRED_RC | -288 | |----------------------------------------------------------| | TOO_MANY_RINGS_RC | -289 | |----------------------------------------------------------| | INCORRECT_VERSION_RC | -290 | |----------------------------------------------------------| | NO_MAIN_ENTRY_POINT_RC | -291 | |----------------------------------------------------------| | ERROR_CLOSING_FILE_RC | -292 | |----------------------------------------------------------| | CMDLINE_TOO_LONG_RC | -300 | |----------------------------------------------------------| | CANT_UNLINK_MOD_IN_USE_RC | -301 | |----------------------------------------------------------| | CANT_UNLINK_KEY_MOD_RC | -302 | |----------------------------------------------------------| | INTERNAL_INVALID_MOD_NBR_RC | -303 | |----------------------------------------------------------| | LINK_MODULE_ERROR_RC | -304 | +----------------------------------------------------------+ Example +----------------------------------------------------------+ | MAIN_NOT_FOUND_RC | -305 | |----------------------------------------------------------| | INIT_NOT_FOUND_RC | -306 | |----------------------------------------------------------| | LOADFILE_FINDFILE_RC | -307 | |----------------------------------------------------------| | LOADFILE_MAKEFILE_RC | -308 | |----------------------------------------------------------| | LOADFILE_ALREADYLINKED_RC | -309 | |----------------------------------------------------------| | UNLINK_UNKNOWN_MODULE_RC | -310 | |----------------------------------------------------------| | UNLINK_BAD_MODULE_FN_RC | -311 | |----------------------------------------------------------| | CALL_DUPLICATED_PROC_RC | -312 | |----------------------------------------------------------| | CALL_UNKNOWN_PROC_RC | -313 | |----------------------------------------------------------| | GREP_MEMORY_ERROR | -314 | |----------------------------------------------------------| | GREP_MISSING_BRACKET | -315 | |----------------------------------------------------------| | GREP_BAD_RANGE | -316 | |----------------------------------------------------------| | GREP_EMPTY_RANGE | -317 | |----------------------------------------------------------| | GREP_REGULAR_EXPRESSION_LONG | -318 | |----------------------------------------------------------| | DYNALINK_INCORRECT_PARAMETERS | -319 | |----------------------------------------------------------| | CANNOT_FIND_KEYSET | -321 | |----------------------------------------------------------| | BAD_LIBRARY_OR_PROC | -322 | |----------------------------------------------------------| | INVALID_LINE_NUMBER | -323 | |----------------------------------------------------------| | KBDSETSTATUS_FAILED | -324 | |----------------------------------------------------------| | BUFFER_CREATE_SIZE | -325 | |----------------------------------------------------------| | BAD_PROCEDURE | -326 | `----------------------------------------------------------'