Atualizações da Hwgui 09-09-2026

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 8277
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 7 vezes
Curtiram: 2 vezes

Atualizações da Hwgui 09-09-2026

Mensagem por Itamar M. Lins Jr. »

Olá!
Atualizamos a função richtext. Agora ela está completa.
Quando foi feita, não veio com a opção de imagens(estava comentado). gif, jpeg, png. toda essa parte era de uma lib (dll) do pessoal do fivewin.

Código: Selecionar todos

2026-09-09 02:35 UTC-0300 Itamar Lins  <itamarlins at gmail.com>
  ### Fixed
  - **dialog.c**: fixed s_PSPProc() pushing pObject a second time instead
    of the real lParam when dispatching WM_INITDIALOG for property sheet
    pages. Confirmed harmless today - InitModalDlg() in hdialog.prg (the
    handler property sheet pages route through, since pages are regular
    HDialog objects) explicitly marks both wParam and lParam as
    HB_SYMBOL_UNUSED - but any WM_INITDIALOG handler that started reading
    lParam would have silently received the wrong value. Now pushes
    lParam like every other message.

2026-09-09 02:08 UTC-0300 Itamar Lins <itamarlins at gmail.com>
    * contrib/misc/richtext.prg:
      - Refactored Bmp2Wmf() to convert BMP files into Enhanced Metafiles (EMF)
        using the library's native hwg_Createenhmetafile()

2026-09-09 01:27 UTC-0300 Itamar Lins <itamarlins at gmail.com>
    * contrib/misc/richtext.prg:
      - Modernized Bmp2Wmf() method: replaced legacy DibRead/DibDraw with
        HBitmap():LoadFromFile() and oBmp:Draw() to generate WMF metafiles
        directly via GDI. Eliminates dependencies on obsolete DIB functions.
      - Uses 8 KB buffer and hb_StrToHex() for fast binary conversion.
      - Added screen DPI fallback and proper temporary file management.

2026-09-09 01:14 UTC-0300 Itamar Lins <itamarlins at gmail.com>
    * contrib/misc/richtext.prg:
      - Modernized Bmp2Wmf() method: replaced legacy DibRead/DibDraw with
        HBitmap():LoadFromFile() and oBmp:Draw() to generate WMF metafiles
        directly via GDI. Eliminates dependencies on obsolete DIB functions.
      - Uses 8 KB buffer and hb_StrToHex() for fast binary conversion.
      - Added screen DPI fallback and proper temporary file management.

2026-09-09 01:08 UTC-0300 Itamar Lins <itamarlins at gmail.com>
    * contrib/misc/richtext.prg:
      - Added new Wmf2Rtf() method to embed Windows Metafiles (WMF) directly
        into RTF documents. Extracts dimensions from the Aldus Placeable
        Metafile header using native Harbour functions L2Bin() and Bin2W().
      - Uses 8 KB buffer and hb_StrToHex() for fast binary-to-hex conversion.
      - Eliminates dependency on GETBMETAFILE() and ::oPrinter.

2026-09-09 00:43 UTC-0300 Itamar Lins <itamarlins at gmail.com>
    * source/winapi/draw.c:
      + Added HWG_GDIPLUSSAVEPNG() C function to handle native GDI+ PNG stream
        encoding, providing cross-platform 32/64-bit support (Clang/MSVC/GCC).
    * contrib/misc/richtext.prg:
      - Added new RtfImage() method to embed JPEG, PNG, and GIF images into RTF
        documents using native Harbour/HWGUI functions.
        GIF images are automatically converted to PNG via HWG_GDIPLUSSAVEPNG()
        and embedded as PNG data (using \pngblip).
      - Updated Image() method to call RtfImage() for all image formats except
        BMP/WMF (which remain as stubs for future implementation).

2026-09-08 23:00 UTC-0300 Itamar Lins  <itamarlins at gmail.com>
    * contrib/misc/richtext.prg:
      - Added full Unicode (UTF-8) support.
        Changed RTF header to code page 65001 and implemented \u escapes.
      - Fixed shading normalization in Paragraph and IncStyle.
      - Corrected style handling in ParaStyle and CharStyle (now use Len(::ParStyles)).
      - Added validation for header data in DefNewTable.
      - Updated all comments to English and improved code readability.
      - Kept image inclusion methods as stubs (future enhancement).
Saudações,
Itamar M. Lins Jr.
Responder