Page 1 of 1

New HFCL word processor and other improvements

Posted: Tue May 31, 2016 10:38 am
by kcarmody
I have been working on the following 4 enchancements to 3.4.3 and am now submitting a proposal that includes them. At the end of this message is the location where you can download the proposal and several files of interest from it.
You can download the proposal from my site as follows. The proposal should be installed on top of 3.4.3.
Now the details.
Fixed variable does not exist bug in GetRichEditFileType()
  • Added #include statement hfcl\Source\RichEditBoxEx_H.prg line 5

Code: Select all

#include "hfcl.ch"

CHM file handling
  • Fixed use of .CHM file with SET HELPFILE and HELPBUTTON
    • Fixed _hmg_DisplayHelpTopic() in SOURCE\h_help.prg lines 90-112
    • Fixed WM_HELP case in Events() in SOURCE\h_windows.prg lines 974-980
  • Added CHM compile and decompile batch file makechm.bat
  • Added new sample demonstrating using CHM as help file
Fixed _hmg_DisplayHelpTopic() in SOURCE\h_help.prg lines 90-112

Code: Select all

*-----------------------------------------------------------------------------*
Procedure _hmg_DisplayHelpTopic ( xTopic , nMet)
*-----------------------------------------------------------------------------*
local cFile

  If empty(_HMG_SYSDATA [ 217 ])
    Return    
  endif

  _HMG_SYSDATA [ 168 ] := xTopic
  _HMG_SYSDATA [ 170 ]   := nMet

  if HB_URIGHT ( ALLTRIM(HMG_UPPER(_HMG_SYSDATA [ 217 ])) , 4 ) == '.CHM'

    cFile := _HMG_SYSDATA [ 217 ]
    if ValType( xTopic ) == 'C'
      cFile += '::/' + xTopic
    endif
    if nMet == nil
      nMet := 0
    endif
    _Execute( _HMG_SYSDATA [ 181 ] , "open" , "hh.exe" , cFile , , SW_SHOW )

  else

    if xTopic == nil
      xTopic := 0
    endif
    if nMet == nil
      nMet := 0
    endif
    WinHelp( _HMG_SYSDATA [ 181 ] , _HMG_SYSDATA [ 217 ] , 1 , nMet , xTopic )

  endif

Return

Fixed WM_HELP case in Events() in SOURCE\h_windows.prg lines 974-980

Code: Select all

      cTemp := _HMG_SYSDATA [ 217 ]
      xTemp := _HMG_SYSDATA [ 35 ][i]
      if HB_URIGHT ( ALLTRIM(HMG_UPPER(cTemp)) , 4 ) == '.CHM'
        _Execute( hwnd , "open" , "hh.exe" , cTemp + if( ValType( xTemp ) == 'C', '::/' + xTemp, '' ) , , SW_SHOW )
      else
        WinHelp ( hwnd , cTemp , 1  , 2 , xTemp )
      Endif

Added CHM compile and decompile batch file makechm.bat Creates a CHM file from a group of HTML files, or the reverse. Comments in the batch file describe how to use it. It requires a free download from Microsoft to compile CHM files.
Added new sample demonstrating using CHM as help file I propose that this sample go into SAMPLES\Basics\Help\. It includes a CHM file, and also a set of HTML files which are compiled into the CHM file, which demonstrates the use of makechm.bat.
Upgrades and bug fixes for WordScribe
  • Upgraded and fixed print and print preview
  • Added word wrap option
  • Fixed recent files list not updating
  • Fixed associations get and set
  • Several minor changes
There are many changes, but since this is an HFCL application, I will not list them here.
Continued in part 2

Re: New HFCL word processor and other improvements

Posted: Tue May 31, 2016 11:10 am
by bpd2000
Thank you for sharing and improve /enhancement

Re: New HFCL word processor and other improvements

Posted: Tue May 31, 2016 1:41 pm
by serge_girard
Thanks Kevin!

Serge

Re: New HFCL word processor and other improvements

Posted: Tue May 31, 2016 1:57 pm
by srvet_claudio
Thanks. I will update

Re: New HFCL word processor and other improvements

Posted: Tue May 31, 2016 2:36 pm
by Steed
gracias

Re: New HFCL word processor and other improvements

Posted: Tue May 31, 2016 4:05 pm
by kcarmody
srvet_claudio wrote:Thanks. I will update
Thank you, Claudio!