.head 0 + Application Description: Centura SQLWindows/32 Standard Application Template .head 1 - Outline Version - 4.0.27 .head 1 + Design-time Settings .data VIEWINFO 0000: 6F00000001000000 FFFF01000D004347 5458566965775374 6174650400010000 0020: 0000000000AB0000 002C000000020000 0003000000FFFFFF FFFFFFFFFFFCFFFF 0040: FFE9FFFFFFFFFFFF FF000000007C0200 004D010000010000 0001000000010000 0060: 000F4170706C6963 6174696F6E497465 6D00000000 .enddata .head 2 - Outline Window State: Normal .head 2 + Outline Window Location and Size .data VIEWINFO 0000: 6600040003002D00 0000000000000000 0000B71E5D0E0500 1D00FFFF4D61696E 0020: 0000000000000000 0000000000000000 0000003B00010000 00000000000000E9 0040: 1E800A00008600FF FF496E7465726E61 6C2046756E637469 6F6E730000000000 0060: 0000000000000000 0000000000003200 0100000000000000 0000E91E800A0000 0080: DF00FFFF56617269 61626C6573000000 0000000000000000 0000000000000000 00A0: 3000010000000000 00000000F51E100D 0000F400FFFF436C 6173736573000000 00C0: 0000000000000000 0000000000000000 .enddata .data VIEWSIZE 0000: D000 .enddata .head 3 - Left: -0.013" .head 3 - Top: 0.0" .head 3 - Width: 8.013" .head 3 - Height: 4.969" .head 2 + Options Box Location .data VIEWINFO 0000: D4180909B80B1A00 .enddata .data VIEWSIZE 0000: 0800 .enddata .head 3 - Visible? No .head 3 - Left: 4.15" .head 3 - Top: 1.885" .head 3 - Width: 3.8" .head 3 - Height: 2.073" .head 2 + Class Editor Location .head 3 - Visible? No .head 3 - Left: 0.575" .head 3 - Top: 0.094" .head 3 - Width: 5.063" .head 3 - Height: 2.719" .head 2 + Tool Palette Location .head 3 - Visible? No .head 3 - Left: 6.388" .head 3 - Top: 0.729" .head 2 - Fully Qualified External References? Yes .head 2 - Reject Multiple Window Instances? No .head 2 - Enable Runtime Checks Of External References? Yes .head 2 - Use Release 4.0 Scope Rules? No .head 1 - Libraries .head 1 + Global Declarations .head 2 + Window Defaults .head 3 + Tool Bar .head 4 - Display Style? Etched .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Form Window .head 4 - Display Style? Etched .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Dialog Box .head 4 - Display Style? Etched .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Top Level Table Window .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Data Field .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Multiline Field .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Spin Field .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Background Text .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Pushbutton .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 3 + Radio Button .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Check Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Option Button .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 3 + Group Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Child Table Window .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + List Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Combo Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Line .head 4 - Line Color: Use Parent .head 3 + Frame .head 4 - Border Color: Use Parent .head 4 - Background Color: 3D Face Color .head 3 + Picture .head 4 - Border Color: Use Parent .head 4 - Background Color: Use Parent .head 2 + Formats .head 3 - Number: 0'%' .head 3 - Number: #0 .head 3 - Number: ###000 .head 3 - Number: ###000;'($'###000')' .head 3 - Date/Time: hh:mm:ss AMPM .head 3 - Date/Time: M/d/yy .head 3 - Date/Time: MM-dd-yy .head 3 - Date/Time: dd-MMM-yyyy .head 3 - Date/Time: MMM d, yyyy .head 3 - Date/Time: MMM d, yyyy hh:mm AMPM .head 3 - Date/Time: MMMM d, yyyy hh:mm AMPM .head 2 - External Functions .head 2 + Constants .data CCDATA 0000: 3000000000000000 0000000000000000 00000000 .enddata .data CCSIZE 0000: 1400 .enddata .head 3 + System .head 4 - Number: msgRichGet = 0x400 + 1000 .head 4 - Number: msgRichPut = 0x400 + 1001 .head 4 - ! ! .head 4 - Number: CW_USEDEFAULT = 0x80000000 .head 4 - ! ! ! ! .head 4 - Number: CFM_BOLD = 0x00000001 .head 4 - Number: CFM_ITALIC = 0x00000002 .head 4 - Number: CFM_UNDERLINE = 0x00000004 .head 4 - Number: CFM_STRIKEOUT = 0x00000008 .head 4 - Number: CFM_PROTECTED = 0x00000010 .head 4 - Number: CFM_SIZE = 0x80000000 .head 4 - Number: CFM_COLOR = 0x40000000 .head 4 - Number: CFM_FACE = 0x20000000 .head 4 - Number: CFM_OFFSET = 0x10000000 .head 4 - Number: CFM_CHARSET = 0x08000000 .head 4 - ! ! ! ! .head 4 - Number: EM_CANPASTE = 0x400 + 50 .head 4 - Number: EM_DISPLAYBAND = 0x400 + 51 .head 4 - Number: EM_EXGETSEL = 0x400 + 52 .head 4 - Number: EM_EXLIMITTEXT = 0x400 + 53 .head 4 - Number: EM_EXLINEFROMCHAR = 0x400 + 54 .head 4 - Number: EM_EXSETSEL = 0x400 + 55 .head 4 - Number: EM_FINDTEXT = 0x400 + 56 .head 4 - Number: EM_FORMATRANGE = 0x400 + 57 .head 4 - Number: EM_GETCHARFORMAT = 0x400 + 58 .head 4 - Number: EM_GETEVENTMASK = 0x400 + 59 .head 4 - Number: EM_GETOLEINTERFACE = 0x400 + 60 .head 4 - Number: EM_GETPARAFORMAT = 0x400 + 61 .head 4 - Number: EM_GETSELTEXT = 0x400 + 62 .head 4 - Number: EM_HIDESELECTION = 0x400 + 63 .head 4 - Number: EM_PASTESPECIAL = 0x400 + 64 .head 4 - Number: EM_REQUESTRESIZE = 0x400 + 65 .head 4 - Number: EM_SELECTIONTYPE = 0x400 + 66 .head 4 - Number: EM_SETBKGNDCOLOR = 0x400 + 67 .head 4 - Number: EM_SETCHARFORMAT = 0x400 + 68 .head 4 - Number: EM_SETEVENTMASK = 0x400 + 69 .head 4 - Number: EM_SETOLECALLBACK = 0x400 + 70 .head 4 - Number: EM_SETPARAFORMAT = 0x400 + 71 .head 4 - Number: EM_SETTARGETDEVICE = 0x400 + 72 .head 4 - Number: EM_STREAMIN = 0x400 + 73 .head 4 - Number: EM_STREAMOUT = 0x400 + 74 .head 4 - Number: EM_GETTEXTRANGE = 0x400 + 75 .head 4 - Number: EM_FINDWORDBREAK = 0x400 + 76 .head 4 - Number: EM_SETOPTIONS = 0x400 + 77 .head 4 - Number: EM_GETOPTIONS = 0x400 + 78 .head 4 - Number: EM_FINDTEXTEX = 0x400 + 79 .head 4 - Number: EM_GETWORDBREAKPROCEX = 0x400 + 80 .head 4 - Number: EM_SETWORDBREAKPROCEX = 0x400 + 81 .head 4 - Number: EM_AUTOURLDETECT = 0x400 + 91 .head 4 - Number: EM_GETTEXTLENGTHEX = 0x400 + 95 .head 4 - Number: EM_SETZOOM = 0x400 + 225 .head 4 - Number: EM_GETZOOM = 0x400 + 224 .head 4 - ! ! ! .head 4 - Number: EN_LINK = 0x070b .head 4 - Number: ENM_LINK = 0x04000000 .head 4 - ! ! ! .head 4 - Number: SCF_DEFAULT = 0x0000 .head 4 - Number: SCF_SELECTION = 0x0001 .head 4 - Number: SCF_WORD = 0x0002 .head 4 - Number: SCF_ALL = 0x0004 .head 4 - ! ! ! .head 4 - Number: CFE_BOLD = 0x0001 .head 4 - Number: CFE_ITALIC = 0x0002 .head 4 - Number: CFE_UNDERLINE = 0x0004 .head 4 - Number: CFE_LINK = 0x0020 .head 4 - ! ! ! .head 4 - Number: CFM_LINK = 0x00000020 .head 4 - ! ! ! ! .head 4 - Number: ECO_AUTOWORDSELECTION = 0x00000001 .head 4 - Number: ECO_AUTOVSCROLL = 0x00000040 .head 4 - Number: ECO_AUTOHSCROLL = 0x00000080 .head 4 - Number: ECO_NOHIDESEL = 0x00000100 .head 4 - Number: ECO_READONLY = 0x00000800 .head 4 - Number: ECO_WANTRETURN = 0x00001000 .head 4 - Number: ECO_SAVESEL = 0x00008000 .head 4 - Number: ECO_SELECTIONBAR = 0x01000000 .head 4 - Number: ECO_VERTICAL = 0x00400000 .head 4 - Number: ECOOP_SET = 0x0001 .head 4 - Number: FR_WHOLEWORD = 0x00000002 .head 4 - Number: FR_MATCHCASE = 0x00000004 .head 4 - Number: PFA_LEFT = 0x0001 .head 4 - Number: PFA_RIGHT = 0x0002 .head 4 - Number: PFA_CENTER = 0x0003 .head 4 - Number: SF_TEXT = 0x0001 .head 4 - Number: SF_RTF = 0x0002 .head 4 - Number: SF_RTFNOOBJS = 0x0003 .head 4 - Number: SF_TEXTIZED = 0x0004 .head 4 - Number: SF_SELECTION = 0x8000 .head 4 - Number: SF_PLAINRTF = 0x4000 .head 4 - ! ! ! .head 4 - Number: ES_SAVESEL = 0x8000 .head 4 - Number: EM_REDO = 0x0400 + 84 .head 4 - Number: EM_CANREDO = 0x0400 + 85 .head 3 - User .head 2 - Resources .head 2 - Variables .head 2 - Internal Functions .head 2 - Named Menus .head 2 + Class Definitions .head 3 + Custom Control Class: cRichEdit .head 4 - DLL Name: Riched32.dll .head 4 - Display Settings .head 5 - DLL Name: Riched32.dll .head 5 - MS Windows Class Name: RichEdit .head 5 - Style: 0x00000004 .head 5 - ExStyle: Class Default .head 5 - Title: .head 5 - Window Location and Size .head 6 - Left: .head 6 - Top: .head 6 - Width: 5.017" .head 6 - Width Editable? Class Default .head 6 - Height: 2.226" .head 6 - Height Editable? Class Default .head 5 - Visible? Class Default .head 5 - Border? Yes .head 5 - Etched Border? Class Default .head 5 - Hollow? Class Default .head 5 - Vertical Scroll? Class Default .head 5 - Horizontal Scroll? Class Default .head 5 - Tab Stop? Class Default .head 5 - Tile To Parent? Class Default .head 5 - Font Name: Class Default .head 5 - Font Size: Class Default .head 5 - Font Enhancement: Class Default .head 5 - Text Color: Class Default .head 5 - Background Color: Class Default .head 5 - DLL Settings .head 4 - List in Tool Palette? Yes .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Description: Bases on original code of Andrew K. Modified by Thomas Lauzi 28.07.04 - tl - bugfixing in SetFont/GetFont method .head 4 - Derived From .head 4 - Class Variables .head 4 + Instance Variables .head 5 - Boolean: i_bBold .head 5 - Boolean: i_bItalic .head 5 - Boolean: i_bUnderline .head 5 - Number: i_nAlign .head 5 - Number: i_nColor .head 5 - Long String: i_lsText .head 5 - Long String: i_lsRTF .head 5 - Boolean: i_bText .head 5 - ! .head 5 - Number: nEventMask .data INHERITPROPS 0000: 0100 .enddata .head 4 + Functions .head 5 + Function: __BoolRemove .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 + Parameters .head 7 - Number: p_nBool .head 7 - Number: p_nRemove .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 + If p_nBool&p_nRemove .head 8 - Return p_nBool&((p_nRemove+1)* -1)|(((p_nBool+1)* -1)&p_nRemove) .head 7 - Return p_nBool .head 5 - ! .head 5 + Function: SetSelAll .head 6 - Description: Selects all the text in the RTF control. .head 6 - Returns .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call SetSel(0,-1) .head 5 + Function: SetSel .head 6 - Description: Sets a selection. NOTE: the selection is not visible, when you have called HideSel (TRUE ) .head 6 - Returns .head 6 + Parameters .head 7 - Number: nStart .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nEnd .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call SalStrSetBufferLength( sBuf, 9 ) .head 7 - Set hMem = CStructAllocFarMem( 9 ) .head 7 - Call CStructPutLong( sBuf, 0, nStart ) .head 7 - Call CStructPutLong( sBuf, 4, nEnd ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 9 ) .head 7 - Call SalSendMsg( hWndItem, EM_EXSETSEL, 0, hMem ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - ! .head 5 + Function: GetSel .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Receive Number: nStart .data INHERITPROPS 0000: 0100 .enddata .head 7 - Receive Number: nEnd .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nMin .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nLength .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Set hMem = CStructAllocFarMem( 9 ) .head 7 - Call SalStrSetBufferLength( sBuf, 9 ) .head 7 - Call CStructPutLong( sBuf, 0, 0 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 9 ) .head 7 - Call SalSendMsg( hWndItem, EM_EXGETSEL, 0, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 9 ) .head 7 - Set nStart = CStructGetLong( sBuf, 0 ) .head 7 - Set nEnd = CStructGetLong( sBuf, 4 ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - Set nLength = nEnd - nStart .head 7 - Return nLength .head 5 + Function: HideSel .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Boolean: pbHide .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Call SalSendMsg(hWndItem, EM_HIDESELECTION, pbHide, 0) .head 5 + Function: Find .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 + Parameters .head 7 - String: sSearchText .data INHERITPROPS 0000: 0100 .enddata .head 7 - Boolean: bWholeWord .data INHERITPROPS 0000: 0100 .enddata .head 7 - Boolean: bMatchCase .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hFind .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nMin .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nMax .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nPos .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nMatch .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - ! Set search flags .head 7 - Set nMatch = 0 .head 7 + If bWholeWord .head 8 - Set nMatch = nMatch | FR_WHOLEWORD .head 7 + If bMatchCase .head 8 - Set nMatch = nMatch | FR_MATCHCASE .head 7 - ! .head 7 - Set hFind = CStructAllocFarMem( SalStrLength( sSearchText ) + 1 ) .head 7 - Call SalStrSetBufferLength( sBuf, SalStrLength( sSearchText ) + 1 ) .head 7 - Call CStructPutString( sBuf, 0, SalStrLength( sSearchText ), sSearchText ) .head 7 - Call CStructCopyToFarMem( hFind, sBuf, SalStrLength( sSearchText ) + 1 ) .head 7 - ! .head 7 - Call GetSel(nMin,nMax ) .head 7 - Set nMin = nMin + 1 .head 7 - Set nMax = -1 .head 7 - ! .head 7 - Set hMem = CStructAllocFarMem( 21 ) .head 7 - Call SalStrSetBufferLength( sBuf, 21 ) .head 7 - Call CStructPutLong( sBuf, 0, nMin ) .head 7 - Call CStructPutLong( sBuf, 4, nMax ) .head 7 - Call CStructPutLong( sBuf, 8, hFind ) .head 7 - Call CStructPutLong( sBuf, 12, 0 ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 21 ) .head 7 - Set nPos = SalSendMsg( hWndItem, EM_FINDTEXTEX, nMatch, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 21 ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - ! .head 7 + If nPos > -1 .head 8 - ! found .head 8 - Set nMin = CStructGetLong( sBuf, 12 ) .head 8 - Set nMax = CStructGetLong( sBuf, 16 ) .head 8 - Call SetSel(nMin,nMax) .head 7 + Else .head 8 - ! not found .head 8 - Set nMin = -1 .head 7 - Call CStructFreeFarMem( hFind ) .head 7 - Return nMin .head 5 + Function: SetFont .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - String: sFont .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nSize .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nEnh .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nColor .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nFormat .data INHERITPROPS 0000: 0100 .enddata .head 7 - Boolean: bOK .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nMask .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: lnEnh .head 6 + Actions .head 7 - ! .head 7 - ! Fontenh Mappings .head 7 + If nEnh & FONT_EnhBold = FONT_EnhBold .head 8 - Set lnEnh = lnEnh | CFM_BOLD .head 7 + If nEnh & FONT_EnhItalic = FONT_EnhItalic .head 8 - Set lnEnh = lnEnh | CFM_ITALIC .head 7 + If nEnh & FONT_EnhUnderline = FONT_EnhUnderline .head 8 - Set lnEnh = lnEnh | CFM_UNDERLINE .head 7 + If nEnh & FONT_EnhStrikeOut = FONT_EnhStrikeOut .head 8 - Set lnEnh = lnEnh | CFM_STRIKEOUT .head 7 - ! .head 7 - Call SalStrSetBufferLength( sBuf, 61 ) .head 7 - Set hMem = CStructAllocFarMem( 61) .head 7 - Call CStructPutLong( sBuf, 0, 60 ) .head 7 - Set nMask = CFM_BOLD | CFM_FACE | CFM_ITALIC | CFM_OFFSET | CFM_SIZE | CFM_STRIKEOUT | CFM_UNDERLINE .head 7 + If nColor != NUMBER_Null .head 8 - Set nMask = nMask | CFM_COLOR .head 7 - Call CStructPutLong( sBuf, 4, nMask ) .head 7 - Call CStructPutLong( sBuf, 8, lnEnh ) .head 7 - Call CStructPutLong( sBuf, 12, 20*nSize ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 + If nColor != NUMBER_Null .head 8 - Call CStructPutLong( sBuf, 20, nColor ) .head 7 - Call CStructPutByte( sBuf, 24, 0 ) .head 7 - Call CStructPutByte( sBuf, 25, 0 ) .head 7 - Call CStructPutString( sBuf, 26, 32, sFont ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Set bOK = SalSendMsg( hWndItem, EM_SETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - Return bOK .head 5 + Function: GetFont .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Receive String: sFont .data INHERITPROPS 0000: 0100 .enddata .head 7 - Receive Number: nSize .data INHERITPROPS 0000: 0100 .enddata .head 7 - Receive Number: nEnh .data INHERITPROPS 0000: 0100 .enddata .head 7 - Receive Number: nColor .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Boolean: bOK .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nMask .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: lnEnh .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - ! .head 7 - Call SalStrSetBufferLength( sBuf, 61 ) .head 7 - Set hMem = CStructAllocFarMem( 61) .head 7 - Call CStructPutLong( sBuf, 0, 60 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutLong( sBuf, 8, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 0 ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 - Call CStructPutLong( sBuf, 20, 0 ) .head 7 - Call CStructPutByte( sBuf, 24, 0 ) .head 7 - Call CStructPutByte( sBuf, 25, 0 ) .head 7 - Call CStructPutString( sBuf, 26, 32, ' ' ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Set bOK =SalSendMsg( hWndItem, EM_GETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 61 ) .head 7 - Set nColor = CStructGetLong( sBuf, 20 ) .head 7 - Set lnEnh = CStructGetLong( sBuf, 8 ) .head 7 - Set nSize = CStructGetLong( sBuf, 12 ) / 20 .head 7 - Call CStructGetString(sBuf,26,32,sFont ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - ! .head 7 - ! Fontenh Mappings .head 7 + If lnEnh & CFM_BOLD = CFM_BOLD .head 8 - Set nEnh = nEnh | FONT_EnhBold .head 7 + If lnEnh & CFM_ITALIC = CFM_ITALIC .head 8 - Set nEnh = nEnh | FONT_EnhItalic .head 7 + If lnEnh & CFM_UNDERLINE = CFM_UNDERLINE .head 8 - Set nEnh = nEnh | FONT_EnhUnderline .head 7 + If lnEnh & CFM_STRIKEOUT = CFM_STRIKEOUT .head 8 - Set nEnh = nEnh | FONT_EnhUnderline .head 7 - ! .head 7 - Return bOK .head 5 + Function: GetText .head 6 - Description: .head 6 + Returns .head 7 - Long String: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .head 7 - Number: hMem .head 7 - Number: nProc .head 7 - Number: nLib .head 7 - Number: nLength .data INHERITPROPS 0000: 0100 .enddata .head 7 - Long String: sRet .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - ! .head 7 - Set nLength = GetTextLength() .head 7 - Call SalStrSetBufferLength( sBuf, nLength + 1 ) .head 7 - Set hMem = CStructAllocFarMem( nLength + 1 ) .head 7 - Call SalSendMsg( hWndItem, WM_GETTEXT, nLength, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, nLength + 1 ) .head 7 - Call SalStrSetBufferLength( sRet, nLength + 1 ) .head 7 - Call CStructGetString( sBuf, 0, nLength, sRet ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - Set i_lsText = sRet .head 7 - Return sRet .head 7 - ! .head 5 + Function: SetText .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Long String: psText .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .head 7 - Number: hMem .head 7 - Number: nProc .head 7 - Number: nLib .head 6 + Actions .head 7 - ! .head 7 - Call SalStrSetBufferLength( sBuf, SalStrLength( psText ) + 1 ) .head 7 - Call CStructPutString( sBuf, 0, SalStrLength( psText ) , psText ) .head 7 - Set hMem = CStructAllocFarMem( SalStrLength( psText ) + 1 ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, SalStrLength( psText ) + 1 ) .head 7 - Call SalSendMsg( hWndItem, WM_SETTEXT, 0, hMem ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - ! .head 7 - ! If p_nFormat = SF_TEXT .head 7 + ! Else .head 8 - Call SalStrSetBufferLength( sBuf, 13 ) .head 8 - Set hMem = CStructAllocFarMem( 13) .head 8 + If hMem != 0 .head 9 - Call CStructPutLong( sBuf, 0, SalWindowHandleToNumber( hWndItem ) ) .head 9 - Call CStructPutLong( sBuf, 4, 0 ) .head 9 - Set nLib = LoadLibraryA( 'richedt.dll' ) .head 9 + If nLib != 0 .head 10 - Set nProc = GetProcAddress( nLib, 'RichPut' ) .head 10 + If nProc != 0 .head 11 - Call CStructPutLong( sBuf, 8, nProc ) .head 11 - Call CStructCopyToFarMem( hMem, sBuf, 13 ) .head 11 - Call SalSendMsg( hWndItem, EM_STREAMIN, p_nFormat, hMem ) .head 10 - Call FreeLibrary( nLib ) .head 9 - Call CStructFreeFarMem( hMem ) .head 5 + Function: GetFormat .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nFormat .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - ! Enhancement .head 7 - Call SalStrSetBufferLength( sBuf, 61 ) .head 7 - Set hMem = CStructAllocFarMem( 61) .head 7 - Call CStructPutLong( sBuf, 0, 60 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutLong( sBuf, 8, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 0 ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 - Call CStructPutLong( sBuf, 20, 0 ) .head 7 - Call CStructPutByte( sBuf, 24, 0 ) .head 7 - Call CStructPutByte( sBuf, 25, 0 ) .head 7 - Call CStructPutString( sBuf, 26, 32, ' ' ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Call SalSendMsg( hWndItem, EM_GETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 61 ) .head 7 - ! Set i_nColor = CStructGetLong( sBuf, 20 ) .head 7 - Set nFormat = CStructGetLong( sBuf, 8 ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - Return nFormat .head 5 + Function: SetFormat .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 + Number: p_nFormat .data INHERITPROPS 0000: 0100 .enddata .head 8 - ! CFM_BOLD CFM_ITALIC CFM_UNDERLINE .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nFormat .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call SalStrSetBufferLength( sBuf, 61 ) .head 7 - Set hMem = CStructAllocFarMem( 61) .head 7 - Call CStructPutLong( sBuf, 0, 60 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutLong( sBuf, 8, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 0 ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 - Call CStructPutLong( sBuf, 20, 0 ) .head 7 - Call CStructPutByte( sBuf, 24, 0 ) .head 7 - Call CStructPutByte( sBuf, 25, 0 ) .head 7 - Call CStructPutString( sBuf, 26, 32, ' ' ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Call SalSendMsg( hWndItem, EM_GETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 61 ) .head 7 - Call CStructPutLong( sBuf, 4, p_nFormat ) .head 7 - Set nFormat = CStructGetLong( sBuf, 8 ) .head 7 + If nFormat & p_nFormat = p_nFormat .head 8 - Set nFormat = __BoolRemove( nFormat, p_nFormat ) .head 7 + Else .head 8 - Set nFormat = nFormat | p_nFormat .head 7 - Call CStructPutLong( sBuf, 8, nFormat ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Call SalSendMsg( hWndItem, EM_SETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructFreeFarMem( hMem ) .head 5 + Function: GetZoom .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nNumerator .head 7 - Number: nDenominator .head 6 + Actions .head 7 - Call SalSendMsg( hWndItem, EM_GETZOOM, nNumerator, nDenominator ) .head 7 - Return (nNumerator / nDenominator) .head 5 + Function: SetZoom .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Number: pnZoom .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nNumerator .head 7 - Number: nDenominator .head 6 + Actions .head 7 + If pnZoom > 1 .head 8 - Set nNumerator = 0x7FFF .head 8 - Set nDenominator = ( nNumerator / pnZoom ) .head 7 + Else .head 8 - Set nDenominator = 0x7FFF .head 8 - Set nNumerator = ( nDenominator * pnZoom ) .head 7 - Call SalSendMsg( hWndItem, EM_SETZOOM, nNumerator, nDenominator ) .head 5 + Function: GetColor .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nColor .data INHERITPROPS 0000: 0100 .enddata .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call SalStrSetBufferLength( sBuf, 61 ) .head 7 - Set hMem = CStructAllocFarMem( 61) .head 7 - Call CStructPutLong( sBuf, 0, 60 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutLong( sBuf, 8, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 0 ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 - Call CStructPutLong( sBuf, 20, 0 ) .head 7 - Call CStructPutByte( sBuf, 24, 0 ) .head 7 - Call CStructPutByte( sBuf, 25, 0 ) .head 7 - Call CStructPutString( sBuf, 26, 32, ' ' ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Call SalSendMsg( hWndItem, EM_GETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 61 ) .head 7 - Set nColor = CStructGetLong( sBuf, 20 ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - Return nColor .head 5 + Function: SetColor .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Number: p_nColor .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call SalStrSetBufferLength( sBuf, 61 ) .head 7 - Set hMem = CStructAllocFarMem( 61) .head 7 - Call CStructPutLong( sBuf, 0, 60 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutLong( sBuf, 8, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 0 ) .head 7 - Call CStructPutLong( sBuf, 16, 0 ) .head 7 - Call CStructPutLong( sBuf, 20, 0 ) .head 7 - Call CStructPutByte( sBuf, 24, 0 ) .head 7 - Call CStructPutByte( sBuf, 25, 0 ) .head 7 - Call CStructPutString( sBuf, 26, 32, '' ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Call SalSendMsg( hWndItem, EM_GETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 61 ) .head 7 - Call CStructPutLong( sBuf, 4, CFM_FACE|CFM_OFFSET|CFM_SIZE|CFM_COLOR ) .head 7 - Call CStructPutLong( sBuf, 20, p_nColor ) .head 7 - Call CStructPutLong( sBuf, 8, 0 ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 61 ) .head 7 - Call SalSendMsg( hWndItem, EM_SETCHARFORMAT, SCF_SELECTION, hMem ) .head 7 - Call CStructFreeFarMem( hMem ) .head 5 + Function: GetAlign .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nAlign .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - ! Alignment .head 7 - Call SalStrSetBufferLength( sBuf, 157 ) .head 7 - Set hMem = CStructAllocFarMem( 157 ) .head 7 - Call CStructPutLong( sBuf, 0, 156 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutWord( sBuf, 8, 0 ) .head 7 - Call CStructPutWord( sBuf, 10, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 1244668 ) .head 7 - Call CStructPutLong( sBuf, 16, 2012767215 ) .head 7 - Call CStructPutLong( sBuf, 20, 1244580 ) .head 7 - Call CStructPutWord( sBuf, 24, 24 ) .head 7 - Call CStructPutWord( sBuf, 26, 0 ) .head 7 - ! .head 7 - Call CStructPutLong( sBuf, 28, 0 ) .head 7 - Call CStructPutLong( sBuf, 32, 0 ) .head 7 - Call CStructPutLong( sBuf, 36, 0 ) .head 7 - Call CStructPutLong( sBuf, 40, 0 ) .head 7 - Call CStructPutLong( sBuf, 44, 0 ) .head 7 - Call CStructPutLong( sBuf, 48, 0 ) .head 7 - Call CStructPutLong( sBuf, 52, 0 ) .head 7 - Call CStructPutLong( sBuf, 56, 0 ) .head 7 - Call CStructPutLong( sBuf, 60, 0 ) .head 7 - Call CStructPutLong( sBuf, 64, 0 ) .head 7 - Call CStructPutLong( sBuf, 68, 0 ) .head 7 - Call CStructPutLong( sBuf, 72, 0 ) .head 7 - Call CStructPutLong( sBuf, 76, 0 ) .head 7 - Call CStructPutLong( sBuf, 80, 0 ) .head 7 - Call CStructPutLong( sBuf, 84, 0 ) .head 7 - Call CStructPutLong( sBuf, 88, 0 ) .head 7 - Call CStructPutLong( sBuf, 92, 0 ) .head 7 - Call CStructPutLong( sBuf, 96, 0 ) .head 7 - Call CStructPutLong( sBuf, 100, 0 ) .head 7 - Call CStructPutLong( sBuf, 104, 0 ) .head 7 - Call CStructPutLong( sBuf, 108, 0 ) .head 7 - Call CStructPutLong( sBuf, 112, 0 ) .head 7 - Call CStructPutLong( sBuf, 116, 0 ) .head 7 - Call CStructPutLong( sBuf, 120, 0 ) .head 7 - Call CStructPutLong( sBuf, 124, 0 ) .head 7 - Call CStructPutLong( sBuf, 128, 0 ) .head 7 - Call CStructPutLong( sBuf, 132, 0 ) .head 7 - Call CStructPutLong( sBuf, 136, 0 ) .head 7 - Call CStructPutLong( sBuf, 140, 0 ) .head 7 - Call CStructPutLong( sBuf, 144, 0 ) .head 7 - Call CStructPutLong( sBuf, 148, 0 ) .head 7 - Call CStructPutLong( sBuf, 152, 0 ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 157 ) .head 7 - Call SalSendMsg( hWndItem, EM_GETPARAFORMAT, 0, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, 157 ) .head 7 - Set nAlign = CStructGetWord( sBuf, 24 ) .head 7 - Return nAlign .head 5 + Function: SetAlign .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 + Number: p_nAlign .data INHERITPROPS 0000: 0100 .enddata .head 8 - ! PFA_LEFT PFA_CENTER PFA_RIGHT .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: hMem .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call SalStrSetBufferLength( sBuf, 157 ) .head 7 - Set hMem = CStructAllocFarMem( 157 ) .head 7 - Call CStructPutLong( sBuf, 0, 156 ) .head 7 - Call CStructPutLong( sBuf, 4, 0 ) .head 7 - Call CStructPutWord( sBuf, 8, 0 ) .head 7 - Call CStructPutWord( sBuf, 10, 0 ) .head 7 - Call CStructPutLong( sBuf, 12, 1244668 ) .head 7 - Call CStructPutLong( sBuf, 16, 2012767215 ) .head 7 - Call CStructPutLong( sBuf, 20, 1244580 ) .head 7 - Call CStructPutWord( sBuf, 24, 24 ) .head 7 - Call CStructPutWord( sBuf, 26, 0 ) .head 7 - ! .head 7 - Call CStructPutLong( sBuf, 28, 0 ) .head 7 - Call CStructPutLong( sBuf, 32, 0 ) .head 7 - Call CStructPutLong( sBuf, 36, 0 ) .head 7 - Call CStructPutLong( sBuf, 40, 0 ) .head 7 - Call CStructPutLong( sBuf, 44, 0 ) .head 7 - Call CStructPutLong( sBuf, 48, 0 ) .head 7 - Call CStructPutLong( sBuf, 52, 0 ) .head 7 - Call CStructPutLong( sBuf, 56, 0 ) .head 7 - Call CStructPutLong( sBuf, 60, 0 ) .head 7 - Call CStructPutLong( sBuf, 64, 0 ) .head 7 - Call CStructPutLong( sBuf, 68, 0 ) .head 7 - Call CStructPutLong( sBuf, 72, 0 ) .head 7 - Call CStructPutLong( sBuf, 76, 0 ) .head 7 - Call CStructPutLong( sBuf, 80, 0 ) .head 7 - Call CStructPutLong( sBuf, 84, 0 ) .head 7 - Call CStructPutLong( sBuf, 88, 0 ) .head 7 - Call CStructPutLong( sBuf, 92, 0 ) .head 7 - Call CStructPutLong( sBuf, 96, 0 ) .head 7 - Call CStructPutLong( sBuf, 100, 0 ) .head 7 - Call CStructPutLong( sBuf, 104, 0 ) .head 7 - Call CStructPutLong( sBuf, 108, 0 ) .head 7 - Call CStructPutLong( sBuf, 112, 0 ) .head 7 - Call CStructPutLong( sBuf, 116, 0 ) .head 7 - Call CStructPutLong( sBuf, 120, 0 ) .head 7 - Call CStructPutLong( sBuf, 124, 0 ) .head 7 - Call CStructPutLong( sBuf, 128, 0 ) .head 7 - Call CStructPutLong( sBuf, 132, 0 ) .head 7 - Call CStructPutLong( sBuf, 136, 0 ) .head 7 - Call CStructPutLong( sBuf, 140, 0 ) .head 7 - Call CStructPutLong( sBuf, 144, 0 ) .head 7 - Call CStructPutLong( sBuf, 148, 0 ) .head 7 - Call CStructPutLong( sBuf, 152, 0 ) .head 7 - Call CStructPutLong( sBuf, 4, 8 ) .head 7 - Call CStructPutWord( sBuf, 24, p_nAlign ) .head 7 - Call CStructCopyToFarMem( hMem, sBuf, 157 ) .head 7 - Call SalSendMsg( hWndItem, EM_SETPARAFORMAT, 0, hMem ) .head 7 - Call CStructFreeFarMem( hMem ) .head 5 + Function: GetSelStart .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nStart .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nDummy1 .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Call GetSel(nStart,nDummy1 ) .head 7 - Return nStart .head 5 + Function: SetSelStart .head 6 - Description: Sets the start of a selection. The endpos is set to the startpos,so the selction is 0 chars long and the current selections is destroyed. It can be good used in combination SetSelLength. example: SetSelStart( 15) SetSelLength(20) Now the chars from pos 15 to 35 are selected. The same can be dome with. SetSel(15,35) .head 6 - Returns .head 6 + Parameters .head 7 - Number: pnStart .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Call SetSel( pnStart, pnStart ) .head 5 + Function: GetSelLength .head 6 - Description: .head 6 - Returns .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nDummy1 .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: nDummy2 .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Return GetSel( nDummy1, nDummy2 ) .head 5 + Function: SetSelLength .head 6 - Description: Sets the length of the current selection. Only the endpos is changed, the startpos not. .head 6 - Returns .head 6 + Parameters .head 7 - Number: pnLength .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nDummy1 .head 7 - Number: nStart .head 7 - Number: nEnd .head 6 + Actions .head 7 - Call GetSel ( nStart, nDummy1) .head 7 - Set nEnd = nStart + pnLength .head 7 - Call SetSel ( nStart, nEnd ) .head 5 + Function: GetSelText .head 6 - Description: .head 6 + Returns .head 7 - Long String: .head 6 - Parameters .head 6 - Static Variables .head 6 + Local variables .head 7 - String: sBuf .head 7 - Number: hMem .head 7 - Number: nProc .head 7 - Number: nLib .head 7 - Number: nLength .data INHERITPROPS 0000: 0100 .enddata .head 7 - Long String: sRet .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - ! .head 7 - Set nLength = GetTextLength() .head 7 - Call SalStrSetBufferLength( sBuf, nLength + 1 ) .head 7 - Set hMem = CStructAllocFarMem( nLength + 1 ) .head 7 - Call SalSendMsg( hWndItem, EM_GETSELTEXT, 0, hMem ) .head 7 - Call CStructCopyFromFarMem( hMem, sBuf, nLength + 1 ) .head 7 - Call SalStrSetBufferLength( sRet, nLength + 1 ) .head 7 - Call CStructGetString( sBuf, 0, nLength, sRet ) .head 7 - Call CStructFreeFarMem( hMem ) .head 7 - Return sRet .head 7 - ! .head 5 + Function: SetSelText .head 6 - Description: Replaces the selected text with the given text. If no text is selected, the text is set to the position of the selection begin. .head 6 - Returns .head 6 + Parameters .head 7 - Long String: psStr .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Call VisSendMsgString(hWndItem, EM_REPLACESEL, TRUE, psStr ) .head 5 + Function: GetTextLength .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Return SalSendMsg( hWndItem, WM_GETTEXTLENGTH, 0, 0 ) + 1 .head 5 + Function: GetLineIndex .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 + Parameters .head 7 + Number: nLineNr .data INHERITPROPS 0000: 0100 .enddata .head 8 - ! -1 for the current line .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Return SalSendMsg(hWndItem,EM_LINEINDEX,nLineNr,0 ) .head 5 + Function: GetLineIndexCurrent .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Return GetLineIndex( -1 ) .head 5 + Function: GetLineLength .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 + Parameters .head 7 + Number: nLineNr .data INHERITPROPS 0000: 0100 .enddata .head 8 - ! -1 for the current line .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: nPos .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 - Set nPos = GetLineIndex( nLineNr ) .head 7 - Return SalSendMsg(hWndItem,EM_LINELENGTH,nPos,0 ) .head 5 + Function: GetLineLengthCurrent .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 - Parameters .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Return GetLineLength( -1 ) .head 4 + Message Actions .head 5 + On WM_GETDLGCODE .head 6 - Return ECO_WANTRETURN | DLGC_WANTALLKEYS .head 5 + On SAM_Create .head 6 - Call SalSendMsg( hWndItem, EM_SETOPTIONS, ECOOP_SET, ECO_AUTOWORDSELECTION | ECO_AUTOVSCROLL | ECO_AUTOHSCROLL | ECO_NOHIDESEL | ECO_SAVESEL ) .head 6 - ! // set auto url detect to true .head 6 - ! Call SalSendMsg(hWndItem, EM_AUTOURLDETECT, TRUE, 0) .head 6 - Set nEventMask = SalSendMsg(hWndItem, EM_GETEVENTMASK, 0,0) .head 6 - ! // Set the Event Mask to request that EN_LINK messages are sent .head 6 - Set nEventMask = SalSendMsg(hWndItem, EM_SETEVENTMASK, 0, nEventMask | ENM_LINK) .head 6 - ! .head 6 - Call VisWinSetStyle( hWndItem, WS_VISIBLE | WS_CHILD | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP | ES_NOHIDESEL | ES_MULTILINE | ES_SAVESEL | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN, TRUE ) .head 6 - ! Call VisWinSetStyle( hWndItem, WS_VISIBLE | WS_CHILD | WS_BORDER | WS_VSCROLL | ES_NOHIDESEL | ES_MULTILINE | ES_SAVESEL, TRUE ) .head 6 - ! .head 5 + On WM_MOUSEWHEEL .head 6 - Call SalTblScrollOnWheel(wParam,lParam) .head 5 + On WM_KEYDOWN .head 6 - Call SalTimerKill(hWndItem,99) .head 6 - Call SalPostMsg(hWndItem,SAM_AnyEdit,wParam,lParam ) .head 3 + Custom Control Class: cRichEditHighlight .head 4 - DLL Name: .head 4 - Display Settings .head 5 - DLL Name: .head 5 - MS Windows Class Name: .head 5 - Style: Class Default .head 5 - ExStyle: Class Default .head 5 - Title: .head 5 - Window Location and Size .head 6 - Left: .head 6 - Top: .head 6 - Width: Class Default .head 6 - Width Editable? Class Default .head 6 - Height: Class Default .head 6 - Height Editable? Class Default .head 5 - Visible? Class Default .head 5 - Border? Class Default .head 5 - Etched Border? Class Default .head 5 - Hollow? Class Default .head 5 - Vertical Scroll? Class Default .head 5 - Horizontal Scroll? Class Default .head 5 - Tab Stop? Class Default .head 5 - Tile To Parent? Class Default .head 5 - Font Name: Class Default .head 5 - Font Size: Class Default .head 5 - Font Enhancement: Class Default .head 5 - Text Color: Class Default .head 5 - Background Color: Class Default .head 5 - DLL Settings .head 4 - List in Tool Palette? Yes .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Description: author: Thomas Lauzi .head 4 + Derived From .head 5 - Class: cRichEdit .head 4 - Class Variables .head 4 + Instance Variables .head 5 - ! Colorizer Defaults .head 5 - Boolean: ibColorMatchCase .head 5 - Number: inKeyWordFormat .head 5 - String: isDefFont .head 5 - Number: inDefColor .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: inDefSize .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: inDefEnh .head 5 - ! Colorizer KeyWords .head 5 - Number: inKeyWordCount .head 5 - String: isKeyWord[*] .data INHERITPROPS 0000: 0100 .enddata .head 5 - String: isKeyFont[*] .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: inKeyColor[*] .head 5 - Number: inKeySize[*] .head 5 - Number: inKeyEnh[*] .head 5 - ! Colorizer Blocks .head 5 - String: isColorBlockBegin[*] .head 5 - String: isColorBlockEnd[*] .head 5 - String: isColorBlockFont[*] .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: inColorBlockSize[*] .head 5 - Number: inColorBlockEnh[*] .head 5 - Number: inColorBlockCol[*] .head 5 - Number: inColorBlockCount .head 5 - ! .head 5 - Number: __nDummy .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: __nStart .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: __nEnd .data INHERITPROPS 0000: 0100 .enddata .head 5 - Boolean: __bKeyIsDown .data INHERITPROPS 0000: 0100 .enddata .head 5 - Boolean: ibColorizeEnabled .data INHERITPROPS 0000: 0100 .enddata .head 5 - ! .head 4 + Functions .head 5 - ! ------------- Colorizer----------------- .head 5 + Function: ColorizeEnable .head 6 - Description: Enables or disables the colorizer (the colorizer slows down a lot ) .head 6 - Returns .head 6 + Parameters .head 7 - Boolean: pbColorizeEnabled .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Set ibColorizeEnabled = pbColorizeEnabled .head 5 + Function: Colorize .head 6 - Description: author: tl (Thomas Lauzi) desc: Colorizes the given section.For colorizing all specify a -1 for endposition. example: Call reEditor.Colorize(0, -1 ) .head 6 - Returns .head 6 + Parameters .head 7 - Number: pnStart .head 7 - Number: pnEnd .head 6 - Static Variables .head 6 + Local variables .head 7 - Long String: lsText .head 7 - Number: lnLength .head 7 - String: lsPiece .head 7 - Number: lnIdx .head 7 - String: lsKey .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: lnKeyLength .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: lnPos .head 7 - Boolean: lbStepped .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: lnStartOriginal .head 7 - Number: lnEndOriginal .head 7 - String: lsTextPiece .head 7 - String: lsBlockBegin .head 7 - String: lsBlockEnd .head 7 - Boolean: lbBlockIsActive .head 7 - Number: lnBlockBegin .head 7 - Number: lnBlockIdx .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: lnLeftCharCode .head 7 - String: lsLeftChar .head 7 - Number: lnRightCharCode .head 7 - String: lsRightChar .head 6 + Actions .head 7 - Call HideSel( TRUE ) .head 7 - Call GetSel(lnStartOriginal,lnEndOriginal) .head 7 - ! .head 7 - Call SetSel(pnStart,pnEnd ) .head 7 - Set lnLength = GetSelLength () .head 7 - Set lsText = GetSelText () .head 7 - ! Set the defaults .head 7 - Call SetColor( inDefColor ) .head 7 - Call SetFont( isDefFont, inDefSize,inDefEnh,NUMBER_Null ) .head 7 - ! .head 7 - Set lnPos = 0 .head 7 + While lnPos < lnLength .head 8 - ! .head 8 - ! ******** compare blockmarker ********* .head 8 - Set lnIdx = 0 .head 8 + While lnIdx < inColorBlockCount .head 9 - ! .head 9 + If lbBlockIsActive .head 10 - ! when block is active, look only for end markers .head 10 - Set lsKey = isColorBlockEnd[lnIdx] .head 9 + Else .head 10 - ! when block is inactive, look only for begin markers .head 10 - Set lsKey = isColorBlockBegin[lnIdx] .head 9 - Set lnKeyLength = SalStrLength( lsKey ) .head 9 - Set lsTextPiece = SalStrMidX(lsText,lnPos,lnKeyLength ) .head 9 - ! .head 9 - ! compare textpiece with key .head 9 + If lsTextPiece = lsKey OR ( NOT ibColorMatchCase AND SalStrLowerX(lsTextPiece) = SalStrLowerX(lsKey ) ) .head 10 + If lbBlockIsActive .head 11 - ! look if the ending key correspondend to the equivalent startkey .head 11 + If lnBlockIdx != lnIdx .head 12 - Break .head 10 - ! toogle block .head 10 - Set lbBlockIsActive = ( NOT lbBlockIsActive ) .head 10 + If lbBlockIsActive .head 11 - ! store the startpos. .head 11 - Set lnBlockBegin = lnPos + pnStart .head 11 - Call SetSel(lnBlockBegin, lnPos + pnStart +lnKeyLength ) .head 11 - Call SetColor( inColorBlockCol[lnIdx] ) .head 11 - Set lnPos = lnPos + lnKeyLength .head 11 - Set lnBlockIdx = lnIdx .head 11 - Set lbStepped = TRUE .head 11 - Break .head 10 + Else .head 11 - ! mark the found block and set the block properties .head 11 - Call SetSel(lnBlockBegin, lnPos + pnStart +lnKeyLength ) .head 11 - Call SetColor( inColorBlockCol[lnBlockIdx] ) .head 11 + If isColorBlockFont[lnBlockIdx] != STRING_Null .head 12 - Call SetFont( isColorBlockFont[lnBlockIdx], inColorBlockSize[lnBlockIdx],inColorBlockEnh[lnBlockIdx],NUMBER_Null ) .head 11 - ! Keyword found, add position and stop searching here .head 11 - Set lnPos = lnPos + lnKeyLength .head 11 - ! Set marker, that it is already increased to the next position .head 11 - Set lbStepped = TRUE .head 11 - Break .head 10 - Break .head 9 - Set lnIdx = lnIdx + 1 .head 8 - ! .head 8 + If NOT lbBlockIsActive .head 9 - ! *********compare all keywords********* .head 9 - ! when space then skip.. .head 9 + If SalStrMidX(lsText,lnPos,1 ) != " " .head 10 - Set lnIdx = 0 .head 10 + While lnIdx < inKeyWordCount .head 11 - ! .head 11 - Set lsKey = isKeyWord[lnIdx] .head 11 - Set lnKeyLength = SalStrLength( lsKey ) .head 11 - Set lsTextPiece = SalStrMidX(lsText,lnPos,lnKeyLength ) .head 11 - ! .head 11 - ! compare textpiece with key .head 11 + If lsTextPiece = lsKey OR ( NOT ibColorMatchCase AND SalStrLowerX(lsTextPiece) = SalStrLowerX(lsKey ) ) .head 12 - Set lsRightChar = SalStrMidX(lsText,lnPos + lnKeyLength,1 ) .head 12 - Set lnRightCharCode = SalStrLop( lsRightChar ) .head 12 + If lnPos > 0 .head 13 - Set lsLeftChar = SalStrMidX(lsText,lnPos-1,1 ) .head 13 - Set lnLeftCharCode = SalStrLop( lsLeftChar ) .head 12 + Else .head 13 - Set lnLeftCharCode = 0 .head 12 + If ( NOT ( (lnRightCharCode >= 65 AND lnRightCharCode <= 90) OR (lnRightCharCode >= 97 AND lnRightCharCode <= 122) ) AND NOT ( (lnLeftCharCode >= 65 AND lnLeftCharCode <= 90) OR (lnLeftCharCode >= 97 AND lnLeftCharCode <= 122) ) ) OR lnKeyLength = 1 .head 13 - ! mark the found key and set the key properties .head 13 - Call SetSel(lnPos + pnStart, lnPos + pnStart + lnKeyLength ) .head 13 - Call SetColor( inKeyColor[lnIdx] ) .head 13 + If isKeyFont[lnIdx] != STRING_Null .head 14 - Call SetFont( isKeyFont[lnIdx], inKeySize[lnIdx],inKeyEnh[lnIdx],NUMBER_Null ) .head 13 - ! Keyword found, add position and stop searching here .head 13 - Set lnPos = lnPos + lnKeyLength .head 13 - ! Set marker, that it is already increased to the next position .head 13 - Set lbStepped = TRUE .head 13 - Break .head 12 - ! If lsRightChar = " " OR lsRightChar = "" OR lsRightChar = CRLF .head 11 - Set lnIdx = lnIdx + 1 .head 8 - ! .head 8 + If NOT lbStepped .head 9 - ! Only when nothing was found increase to the next position .head 9 - Set lnPos = lnPos + 1 .head 8 - Set lbStepped = FALSE .head 7 - ! when the block never ends, the colorize to the end .head 7 + If lbBlockIsActive .head 8 - ! mark the found block and set the block properties .head 8 - Call SetSel(lnBlockBegin, lnPos + pnStart +lnKeyLength ) .head 8 - Call SetColor( inColorBlockCol[lnBlockIdx] ) .head 8 + If isColorBlockFont[lnBlockIdx] != STRING_Null .head 9 - Call SetFont( isColorBlockFont[lnBlockIdx], inColorBlockSize[lnBlockIdx],inColorBlockEnh[lnBlockIdx],NUMBER_Null ) .head 7 - ! .head 7 - Call SetSel(lnStartOriginal,lnEndOriginal) .head 7 - Call HideSel( FALSE ) .head 7 - ! .head 5 + Function: ColorizeAddKeyWord .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - String: psKeyWord .data INHERITPROPS 0000: 0100 .enddata .head 7 - ! .head 7 - String: psKeyFont .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: pnKeySize .head 7 - Number: pnKeyEnh .head 7 - Number: pnKeyColor .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Set isKeyWord[inKeyWordCount] = psKeyWord .head 7 - Set isKeyFont[inKeyWordCount] = psKeyFont .head 7 - Set inKeySize[inKeyWordCount] = pnKeySize .head 7 - Set inKeyEnh[inKeyWordCount] = pnKeyEnh .head 7 - Set inKeyColor[inKeyWordCount] = pnKeyColor .head 7 - Set inKeyWordCount = inKeyWordCount + 1 .head 5 + Function: ColorizeAddKeyWords .head 6 - Description: .head 6 + Returns .head 7 - Number: .head 6 + Parameters .head 7 - String: psKeyWords[*] .data INHERITPROPS 0000: 0100 .enddata .head 7 - ! .head 7 - String: psKeyFont .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: pnKeySize .head 7 - Number: pnKeyEnh .head 7 - Number: pnKeyColor .head 6 - Static Variables .head 6 + Local variables .head 7 - Number: lnIdx .head 7 - Number: lnUpperBound .data INHERITPROPS 0000: 0100 .enddata .head 6 + Actions .head 7 + If SalArrayIsEmpty( psKeyWords ) .head 8 - Return -1 .head 7 - ! sort, so that the longest kewords are on the lowest index .head 7 - Call VisArraySort(psKeyWords,SORT_Descending, DT_String) .head 7 - Call SalArrayGetUpperBound( psKeyWords,1, lnUpperBound ) .head 7 - ! .head 7 + While lnIdx <= lnUpperBound .head 8 - Call ColorizeAddKeyWord( psKeyWords[lnIdx], psKeyFont, pnKeySize, pnKeyEnh, pnKeyColor ) .head 8 - Set lnIdx = lnIdx + 1 .head 7 - ! .head 7 - Return lnIdx .head 5 + Function: ColorizeClearKeys .head 6 - Description: .head 6 - Returns .head 6 - Parameters .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Set inColorBlockCount = 0 .head 7 - Set inKeyWordCount = 0 .head 5 + Function: ColorizeSetDefault .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - String: psDefFont .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: pnDefSize .head 7 - Number: pnDefEnh .head 7 - Number: pnDefColor .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Set isDefFont = psDefFont .head 7 - Set inDefSize = pnDefSize .head 7 - Set inDefEnh = pnDefEnh .head 7 - Set inDefColor = pnDefColor .head 7 - ! .head 7 - Call SetColor( inDefColor ) .head 7 - Call SetFont( isDefFont, inDefSize,inDefEnh,NUMBER_Null ) .head 7 - ! .head 5 + Function: ColorizeSetProps .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - Boolean: pbColorMatchCase .head 7 + ! Number: pnKeyWordFormat .data INHERITPROPS 0000: 0100 .enddata .head 8 - ! FMT_Format_LowerCase FMT_Format_UpperCase FMT_Format_Unformatted .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Set ibColorMatchCase = pbColorMatchCase .head 7 - ! Set inKeyWordFormat = pnKeyWordFormat .head 5 + Function: ColorizeAddBlock .head 6 - Description: .head 6 - Returns .head 6 + Parameters .head 7 - String: psBlockBegin .data INHERITPROPS 0000: 0100 .enddata .head 7 - String: psBlockEnd .data INHERITPROPS 0000: 0100 .enddata .head 7 - ! .head 7 - String: psColorBlockFont .data INHERITPROPS 0000: 0100 .enddata .head 7 - Number: pnColorBlockSize .head 7 - Number: pnColorBlockEnh .head 7 - Number: pnColorBlockCol .data INHERITPROPS 0000: 0100 .enddata .head 6 - Static Variables .head 6 - Local variables .head 6 + Actions .head 7 - Set isColorBlockBegin[ inColorBlockCount ] = psBlockBegin .head 7 - Set isColorBlockEnd[ inColorBlockCount ] = psBlockEnd .head 7 - Set isColorBlockFont[ inColorBlockCount ] = psColorBlockFont .head 7 - Set inColorBlockSize[ inColorBlockCount ] = pnColorBlockSize .head 7 - Set inColorBlockEnh[ inColorBlockCount ] = pnColorBlockEnh .head 7 - Set inColorBlockCol[ inColorBlockCount ] = pnColorBlockCol .head 7 - Set inColorBlockCount = inColorBlockCount + 1 .head 5 - ! --------------------------------------------- .head 4 + Message Actions .head 5 + On SAM_Timer .head 6 + Select Case wParam .head 7 + Case 99 .head 8 - Call SalTimerKill(hWndItem,99) .head 8 - ! .head 8 - Set __nStart = GetLineIndexCurrent () .head 8 - Set __nEnd = GetLineLengthCurrent () + __nStart .head 8 + If ibColorizeEnabled .head 9 - Call Colorize( __nStart, __nEnd ) .head 8 - Break .head 5 + On WM_KEYUP .head 6 - ! ! ignore these keys .head 6 + Select Case wParam .head 7 - Case VK_Left .head 7 - Case VK_Right .head 7 - Case VK_Up .head 7 + Case VK_Down .head 8 - Return TRUE .head 6 - Call SalTimerSet(hWndItem,99,20 ) .head 2 + Default Classes .head 3 - MDI Window: cBaseMDI .head 3 - Form Window: .head 3 - Dialog Box: .head 3 - Table Window: .head 3 - Quest Window: .head 3 - Data Field: .head 3 - Spin Field: .head 3 - Multiline Field: .head 3 - Pushbutton: .head 3 - Radio Button: .head 3 - Option Button: .head 3 - Check Box: .head 3 - Child Table: .head 3 - Quest Child Window: cQuickDatabase .head 3 - List Box: .head 3 - Combo Box: .head 3 - Picture: .head 3 - Vertical Scroll Bar: .head 3 - Horizontal Scroll Bar: .head 3 - Column: .head 3 - Background Text: .head 3 - Group Box: .head 3 - Line: .head 3 - Frame: .head 3 - Custom Control: cRicheditHighlight .head 3 - ActiveX: .head 2 - Application Actions
Return to http://gupta.narod.ru/