RichEditBox and other changes

Source code related resources

Moderator: Rathinagiri

Post Reply
User avatar
kcarmody
Posts: 122
Joined: Tue Oct 07, 2014 11:13 am
Has thanked: 6 times
Been thanked: 16 times
Contact:

RichEditBox and other changes

Post by kcarmody » Sun Nov 23, 2014 10:03 am

I've put together a proposed set of changes to the current stable version at http://kevincarmody.com/hmg/.

Most of these changes are to the RichEditBox control, including new and enhanced properties and methods. Most of the RichEditBox changes are to handle the byte order mark (BOM) correctly for Unicode text files. The need for these changes is explained in http://hmgforum.com/viewtopic.php?f=8&t=4031.

This change set also includes enhancements to GetFile() and PutFile(), which were discussed in http://hmgforum.com/viewtopic.php?f=8&t=4009, and the CHM file help system, which was discussed in http://hmgforum.com/viewtopic.php?f=8&t=3999.

Below is a condensed version of the change log in the root directory, Changes.txt:
- Proposed changes to HMG 3.3.1
Proposed by Kevin Carmody <i@kevincarmody.com> 2014/11/22

- New function
-- GetRtfTxtFileType( cFile, lUtf8Test ) --> nFileType
returns file type which can be used in RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
-- New manifest constants for file types returned by GetRtfTxtFileType()
can be used by RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control

- Enhanced RichEditBox Control
-- Fixed justification bug --> viewtopic.php?f=20&t=3995
-- Fixed RichEditBox_StreamIn( hWndControl, cFileName, lSelection, nDataFormat ) --> lSuccess
now skips over BOM in text files if present
-- Fixed RichEditBox_StreamOut( hWndControl, cFileName, lSelection, nDataFormat ) --> lSuccess
now writes BOM to text files
-- New Property
--- HasUnicodeChars (read only)
detects whether rich edit control contains non-ASCII Unicode characters
-- New methods
--- RtfTxtLoadFile( cFile, lSelection, nType ) --> lSuccess
synonym for RtfLoadFile method
--- RtfTxtSaveFile( cFile, lSelection, nType ) --> lSuccess
synonym for RtfSaveFile
--- SelPasteSpecial
paste special -- needs documentation of clipboard format argument
-- Enhanced methods
--- RtfLoadFile( cFile, lSelection, nType ) --> lSuccess
uses file type returned by GetRtfTxtFileType()
skips over byte order mark in Unicode text file
supports UTF-16 BE (big endian Unicode text file)
--- RtfSaveFile( cFile, lSelection, nType ) --> lSuccess
uses file type returned by GetRtfTxtFileType()
writes byte order mark to Unicode text file
supports UTF-16 BE (big endian Unicode text file)

- Enhanced functions
-- GetFile( [aFilter], [cTitle], [cIniFolder], [lMultiSelect], [lNoChangeDir], [nFilterIndex] ) --> cFileName | aFileNames | NIL
added nFilterInddex to control default file filter
-- Putfile( [aFilter], [cTitle], [cIniFolder], [lNoChangeDir], [cDefaultFileName], [cExtFile], [nFilterIndex] ) --> cFileName | NIL
added nFilterInddex to control default file filter
if passed by reference, nFilterIndex returns index of file filter selected by user

- Overhauled Rich Edit Demo
-- New features --> viewtopic.php?f=9&t=4030
-- Uses enhancements to RichEditBox control described above

- Enhanced documentation
-- Overhauled RichEditBox page
lists previously unlisted properites and methods integrated into main list
detail in sections instead of separate pages
includes documentation of changes described above
-- Updated GetFile and PutFile pages
added description of GetFile and PutFile enhancements described above
-- Added GetRtfTxtFileType page
documentation of GetRtfTxtFileType() function described above
-- Put HMG documentation system into CHM file --> viewtopic.php?f=8&t=3999
5 files can replace contents of DOC folder including DOC/DATA folder
-- Added batch file to compile and decompile CHM files
Kevin

User avatar
serge_girard
Posts: 2279
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 535 times
Been thanked: 115 times
Contact:

Post by serge_girard » Sun Nov 23, 2014 10:09 am

Thanks Kevin!

Serge

Post Reply