Un ejemplo de la productividad de Claude code :shock:
March 2026
Fix: Accented characters on buttons, comboboxes and checkboxes in dialogs
On applications with a Windows XP manifest (comctl32 v6), common controls
like BUTTON, COMBOBOX and CHECKBOX are created as Unicode windows.
When SetWindowText() or SendMessage(CB_ADDSTRING) detected a Unicode window
via IsWindowUnicode(), it called fw_parWide() to convert the text from
multibyte to UTF-16. fw_parWide() delegates to strtowidestr() which calls
hbcdp_to_wincdp() to determine the conversion codepage. The bug was in
hbcdp_to_wincdp() (fwunicode.c): when bAnsiOnly was TRUE (non-UTF-8 text),
it was supposed to skip OEM codepages (< 1250) and keep the default CP_ACP.
But the else branch at line 119 unconditionally assigned the OEM codepage:
if ( bAnsiOnly && v >= 1250 ) { icdp = v; }
else { icdp = v; } // <-- BUG: defeats the bAnsiOnly check
This caused CP1252 strings (e.g. "A├▒adir" with ├▒=0xF1) to be converted
using CP437 where 0xF1 is ┬▒ instead of ├▒, producing garbled text.
Fixed by changing the condition to: if ( !bAnsiOnly || v >= 1250 ) { icdp = v; }
so OEM codepages are skipped when the caller expects ANSI-only text.
SAY controls were unaffected because they paint their own text via
DrawTextExA which interprets bytes using the font's ANSI charset.
See samples/test/testlang.prg.
Fix: Dialog titles with accented characters (German, Spanish, Portuguese, etc.)
strings.prg was encoded in UTF-8 where accented chars take 2 bytes (e.g.
ä=C3A4), corrupting dialog templates which expect single-byte characters.
Converted strings.prg to CP1252 encoding (ä=E4, ü=FC, ó=F3, etc.).
Also changed MultiByteToWideChar code page from CP_OEMCP to CP_ACP in
dlg2chr.c and ctrl2chr.c, since PRG strings are ANSI (CP1252), not OEM
(CP850). CP_OEMCP was a Clipper/DOS legacy that misinterpreted accented
characters on modern Windows. See samples/test/testlang.prg.
Enh: New FWString() entries for fivedbu menu localization
Added "Select Printer", "Map Network Drive", "Disconnect Network Drive"
with translations for Spanish, French, Portuguese, German and Italian.
Fixed German translation of "Setup" from "Drucker" (Printer) to
"Einstellungen" (Settings). Fixed Portuguese and Italian translations.
fivedbu.prg: Setup menu, Select Printer, Map/Disconnect Network Drive
now use FWString() for multi-language support.
New: xHarbour + BCC 64 build support
Added new compiler variant to the build system:
- mfwh_new.bat option B (or param xb64): builds Fivexh64.a PRG lib
using xHarbour64 harbour.exe + BCC64 compiler + tlib64
C lib FiveC64.a is shared from Harbour+BCC64 build
- build_new.bat xb64: builds samples with xHarbour64 + BCC64
Links with Fivexh64.a + FiveC64.a + xHarbour64 runtime .a libs
Fix: TGet IME compatibility with Windows 10/11 TSF (Text Services Framework)
The new Chinese IME in Windows 10/11 caused character loss and input blocking
in TGet controls. TGet's KeyChar/KeyWChar methods called Assign(), SetPos(),
and Refresh() during IME composition, interfering with the TSF framework.
Added lIMEComposing flag and WM_IME_STARTCOMPOSITION/ENDCOMPOSITION/COMPOSITION
handling in HandleEvent. During composition, character input bypasses TGet's
custom processing via CallWindowProc, letting the native EDIT control handle
the IME. After composition ends, TGet syncs its buffer and cursor position.
Affects Chinese (Pinyin/Bopomofo), Japanese, and Korean IME input.
See samples/test/testime.prg for an automated IME simulation test.
Fix: TWBrowse nAt NIL crash and nClrPane block evaluation
TWBrowse:nAt was not initialized, causing array access errors when
user codeblocks (bLine, nClrPane) were evaluated during the first
WM_PAINT before SetArray() was called. Additionally, WBRWLINE
evaluated nClrPane blocks without passing the column index, destroying
the block and crashing when the block expected a nCol parameter.
Fixed by initializing DATA nAt INIT 1 and deferring nClrPane block
evaluation to the per-column loop where the column index is available.
See samples/misc/brwcolor.prg.
Fix: DialogBoxIndirect failure (nResult -1) on MSVC 32/64 builds
Commit 8562d5a added #pragma pack(push,1) for ALL compilers to fix
bcc32c dialog template alignment. However, MSVC uses default alignment
(4/8 bytes) for the DIALOG_RES and CONTROL structs in dlg2chr.c and
ctrl2chr.c, and the rest of the code (padding bytes, offsets) was written
for that layout. Forcing pack(1) on MSVC corrupted the dialog template,
causing DialogBoxIndirect to return -1 and all DEFINE DIALOG to fail
silently. Fixed by restricting #pragma pack(push,1) to BORLANDC only.
Enh: fivedbu.prg shows C compiler and 32/64-bit in title bar
Uses hb_Compiler() and #ifdef 64 for architecture detection.
fivedbu.rc paths changed from .\..\..\path to ../../path for
compatibility with MinGW windres resource compiler.
New: Complete HTML documentation (docs/ folder, 26 pages)
Dark theme, DeepWiki-style 3-column layout with sidebar navigation.
Opens automatically after FWH installation. Search with Ctrl+K.
Organized in subfolders: getting-started/, core/, ui/, data/,
printing/, internet/, reference/. Shared CSS/JS, Mermaid diagrams,
Harbour syntax highlighting, parameter tables, code examples.
Sections: Framework Overview, Installation, Build System,
TWindow, TDialog, TControl, TXBrowse, TButton, TGet, TMenu,
TFolder, TComboBox, TCheckBox, TDatabase, TRecordSet, TODBC,
MariaDB, TPrinter, TReport, TWebView2, AI Classes (TOpenAI,
TChatGPT, TOLlama, TDeepSeek, TGemini, TGrok, TKimi, Transformer),
TWebServer, Commands Reference, Functions Reference, Error System,
GDI Resources (TFont, TBrush, TBitmap, TImage, TIni, TReg32).
Enh: Error dialog auto-detects Windows dark mode theme
The FiveWin error system dialog (errsysw.prg) now automatically shows in
dark mode when the Windows system theme is set to dark, even if the app
has not explicitly called FW_SetDarkMode(.T.). Detection uses IsDarkTheme()
and FW_GETTHEMEMODE(). Apps that call FW_SetDarkMode(.T.) always get dark mode.
New: samples/report/prnativa.prg - Printer status check before printing
Demonstrates how to query the default printer status using PrnStatus()
and bitmask flags (PRINTER_STATUS_*) before sending a print job.
Detects: offline, paper out, paper jam, paused, no toner, door open, etc.
If the printer is not available, attempts to start the Windows Spooler service.
New: FiveWin test suite (tests/testfwh.prg)
87 automated tests across 10 categories verifying FWH core functionality:
- Strings: cValToChar, StrToken, NumToken
- Math: Int, Abs, Max, Min, Round, Mod, matrix basics
- Hash: hb_Hash, hb_HSet, hb_HHasKey, hb_HKeys
- Arrays: Len, AScan, ASort, AAdd, ADel, ATail
- Dates: Year, Month, Day, DoW, Date(), Time()
- Files: MemoWrit, MemoRead, FErase, lIsDir
- Classes: TRect, TFont, TBrush, TCursor, TIni
- Controls: Dialog, Button, Say, Get (headless, no ACTIVATE)
- Database: dbCreate, USE, APPEND, REPLACE, LOCATE, SKIP, CLOSE
- Compatibility: Version(), hb_Compiler(), ValType, hash functions
Results output to testfwh.log via LogFile().
Run with: tests\run.bat [hb32|hm32|hm64|hg32|hg64] (interactive menu if no param)
Enhanced: /save skill now auto-updates whatsnew.txt before committing
Analyzes changes and adds an entry with * New:, * Enhanced: or * Fixed: prefix.
New: /dialog skill for designing Windows dialog boxes
Generates .rc resource files and/or pure FiveWin PRG code with proper layout.
Includes visual debugging via SaveAsImage(), font profiles (Segoe UI, MS Sans Serif),
combobox dropdown rules, and automatic proportional control sizing.
Fixed: MSVC 32-bit libraries rebuilt with current Harbour revision
FiveH32.lib and FiveHC32.lib were compiled with an older Harbour revision,
causing incorrect FWString() lookups (e.g. "Setup" returning "Drucker" in German).
New: samples/test/customer.prg - Customer form dialog example
Demonstrates pure PRG dialog creation with Segoe UI font, gradient background,
and combobox handling. Also samples/test/translate.prg for translation testing.
Fixed: TControl:GetNewId() now skips IDs already in use by other controls
When mixing .rc resource controls (fixed IDs) with programmatic controls
(auto-generated IDs), GetNewId() could return an ID already used by a
REDEFINE'd control, causing "Duplicated Id" error in TDialog:DefControl().
Now GetNewId() checks ::oWnd:aControls and skips to the next available ID.
Fixed: 64-bit installer missing libmariadb64_bcc64.a and libmariadb64_gcc.a
BCC64 and GCC64 builds that use MariaDB failed at link time with
"Unable to open file LIBMARIADB64_BCC64.A". Added both libs to fwh64.iss.
Fixed: isutf8() false positives with CP1252 accented text (Portuguese, etc.)
Dialog titles with accented characters (ã, ç, ó, etc.) from FWString() were
corrupted because isutf8() misidentified CP1252 byte pairs (e.g. C3 A7 = ç)
as valid UTF-8, causing SetWindowTextW() to be called with ANSI bytes.
Added CP1250-1258 recognition to is2byteansi() in fwunicode.c.
Fixed: TPreview:SaveAs() passed aMeta array instead of TPrinter object
to MSPrintToPDF(), causing "No existe el m├®todo: CDOCUMENT" error
when saving print preview to PDF via Microsoft Print to PDF.
Enhanced: Added "Test" translation to strings.prg
Portuguese: "Teste", Spanish: "Prueba", Italian: "Prova".
New: Support for Embarcadero BCC32C (LLVM/Clang-based) C compiler
FWH now builds with bcc32c from c:\bcc77c (Embarcadero C++ 7.70, Clang 5.0.2).
New libraries: FiveHL.lib (PRG) + FiveHCL.lib (C/C++) + FiveHXL.lib (xHarbour).
Requires Harbour built with clang: harbour_bcc770C_32_20250515.zip from
https://github.com/FiveTechSoft/harbour_and_xharbour_builds
Use c:\harbour\bin\win\clang\harbour.exe and c:\harbour\lib\win\bcc32c\ libs.
Build via mfwh_new.bat option 2 (Harbour) or option 8 (xHarbour).
Fix: #pragma option -a- (Borland byte alignment) not supported by bcc32c/Clang
Affected files: dlg2chr.c, ctrl2chr.c, wndbrush.c
The Borland-specific #pragma option -a- is silently ignored by bcc32c (Clang),
causing sizeof(DIALOG_RES) and sizeof(CONTROL) to be 20 instead of 18 bytes.
This corrupted dialog templates, making all dialogs fail with error 1407
(ERROR_CLASS_DOES_NOT_EXIST). Fixed by adding #pragma pack(push, 1) which
works with all compilers: BCC32, BCC32C, MSVC, and MinGW/GCC.
New: Unified hbmk2 build system for FWH libraries (fwh.hbp + fwhc.hbp)
Two .hbp files replace 10 makefiles for building all FWH library variants:
- fwh.hbp: builds FiveH*.lib from 351 PRG sources
- fwhc.hbp: builds FiveHC*.lib from 228 C/C++ sources
Supports all compiler/architecture combinations via hbmk2 flags:
BCC 32, MSVC 32/64, MinGW 32/64, and xHarbour (BCC 32, MSVC 64).
New: Unified build script for samples (samples/build_new.bat)
Replaces 20 individual build*.bat files with a single script featuring
an interactive menu to select the compiler/architecture combination:
build_new myapp -> interactive menu
build_new myapp hb32 -> Harbour + BCC 32 (direct)
build_new myapp hbc32c -> Harbour + BCC32C/Clang (direct)
build_new myapp hm64 -> Harbour + MSVC 64 (direct)
build_new myapp xhbc -> xHarbour Commercial + VC98 (direct)
Available options: hb32, hbc32c, hm32, hm64, hg32, hg64, xb32, xm64, xhbc
Works from any subdirectory of samples/.
New: xHarbour Commercial support in build system
- mfwh_new.bat option 0: builds Fivehmx.lib + FiveHX.lib using VC98
- build_new.bat option 9 (xhbc): builds samples with xHB Commercial + VC98
- buildxhb.bat: auto-copies xHBZipDll.dll next to built executables
- source/internal/xhbcompat.c: Harbour compatibility layer for xHB Commercial
Provides hb_DirExists() and other functions missing in xHB (abandoned 2016).
Add new stubs here as needed when unresolved externals appear.
New: hbmk2 project examples in makes/ subfolders (replaces old .zip files)
Each folder has a self-contained go.bat + test.hbp + test.prg ready to use:
makes/hb_bcc32/ Harbour + BCC 32
makes/hb_bcc32c/ Harbour + BCC32C (Clang)
makes/hb_msvc32/ Harbour + MSVC 32
makes/hb_msvc64/ Harbour + MSVC 64
makes/hb_gcc32/ Harbour + GCC 32
makes/hb_gcc64/ Harbour + GCC 64
makes/xhb_bcc32/ xHarbour + BCC 32
makes/xhb_msvc64/ xHarbour + MSVC 64
makes/xhb_commercial/ xHarbour Commercial + VC98 (uses xlink)
Users: copy folder, adjust paths in test.hbp, run go.bat.
New: Unified library build script (mfwh_new.bat)
Replaces 10 individual mfwh*.bat files with a single script:
mfwh_new -> interactive menu
mfwh_new hb32 -> Harbour + BCC 32 (direct)
mfwh_new all -> build all Harbour variants (1-5)
Enhancement: xHarbour compatibility improvements
- Enabled hbcompat.ch in FiveWin.ch for global Harbour/xHarbour function mapping
- Added #ifdef XHARBOUR guards for variadic ... syntax (window.prg, activex.prg)
- Removed duplicate wrapper functions now handled by hbcompat.ch (drxl.prg, harbour.prg)
- xHarbour builds use HB_INSTALL_PREFIX to invoke the real xHarbour compiler
Fix: XBrowse lSeekBar + lIncrFilter: Multiple fixes for incremental filter
with SeekBar display:
- Fix: oFilterCol was never assigned, so the SeekBar SAY was never painted
when lIncrFilter was active. Now auto-assigned from SelectedCol() on first Seek.
- Fix: SeekBar text was painted on screen DC instead of the double-buffer DC,
causing it to be overwritten by DispEnd(). ShowSeek() now uses the active
hDC (buffer or screen) and draws text with DrawText/SetTextColor directly.
- Fix: Seek(nil) called from GoUp/GoDown/navigation methods was clearing
cSeek even during active incremental filtering, erasing the search text.
Now preserves cSeek when lIncrFilter is active.
- Fix: Recursive Seek("") calls during Refresh()/Change() were clearing the
search state. Added static recursion guard in Seek() for lIncrFilter mode.
- Fix: Search icon (zoom2 bitmap) was not drawn with transparent background.
Changed from DrawBitmap to DrawTransparent for proper alpha rendering.
New sample: samples/ui/xbrowse/xbrseek.prg - Demonstrates lSeekBar with
incremental filtering (lIncrFilter + lSeekWild) using a DBF data source.
Shows colored SeekBar (bClrEdit), ESC to reset filter, and AUTOSORT.
Enhancement: CLASS Transformer - Bug fixes and C-accelerated operations:
- Fix: W_vocab gradient was never accumulated in Backward(), preventing the
output projection layer from learning. Now correctly computes dW_vocab.
- Fix: LayerNorm:Backward() used normalized values (x_norm) instead of original
input (x - mean) for gradient computation, producing incorrect gradients.
- Fix: Residual connection gradients were not propagated in Transformer:Backward().
The skip-connection gradient is now correctly added at each residual block.
- New C functions in matrixes.c for Transformer acceleration:
hb_Matrix3DAdd() - Element-wise 3D tensor addition
hb_Matrix3DInplaceAdd() - In-place 3D tensor addition (no allocation)
hb_Matrix3DAvg() - Average pooling over sequence dimension (3D->2D)
hb_Matrix3DExpand() - Expand 2D gradient to 3D (uniform distribution)
hb_MatMul3D() - Batch matrix multiply [batch][seq][d] x [d][d_out]
hb_LayerNorm3D() - Full LayerNorm forward in C (returns output+cache)
hb_LayerNormBackward3D() - Full LayerNorm backward in C (returns grads)
hb_ScaledDotAttention() - Fused scaled dot-product attention (QKT+softmax+V)
hb_EmbeddingLookup3D() - Fast batch embedding lookup from 2D matrix
- Transformer:Forward() and Backward() now use C-accelerated calls, replacing
triple-nested Harbour loops with single C function calls.
- LayerNorm:Forward() and Backward() reduced from 30 lines each to 5 lines.
- MultiHeadAttention:Forward() uses fused hb_ScaledDotAttention() per head.
- FeedForward:Forward() uses hb_MatMul3D() for batch multiplication.
New sample: samples/ai/transformer.prg - Interactive Transformer demo with
unified FiveWin dialog showing live training progress, accuracy metrics,
next-word predictions (top-5 with probabilities), and autoregressive text
generation. Trained on a 141-phrase Spanish corpus with 120 epochs.
Enhancement: Updated all build scripts to support Microsoft Visual Studio 2026
(Community edition, version 18). The vcvarsall.bat path has been updated from
"2022\Community" to "18\Community" in all .bat files: mfwh.bat, mfwh64.bat,
mfwhx64.bat, mfwhxh64.bat, dll\rc2dll64.bat, and the sample build scripts
(buildh32, buildh64, buildx32, buildxh64, bldmbh32, EasyReport, webview, xlsxlibhb).
Fix: Resolved linker error LNK2005 "HB_FUN_MESSAGEBOX already defined" that occurred
when linking with xhb.lib. The internal C function MESSAGEBOX in source\function\msgs.c
and source\winapi\msgbox.c has been renamed to FW_MESSAGEBOX to avoid symbol collision
with xhb.lib(xhbwin.obj). An #xtranslate directive has been added to fivewin.ch so
that any existing user code calling MessageBox() is automatically redirected to
FW_MessageBox() at compile time, requiring no source code changes.
Enhancement: FW_SetDarkMode() - Global dark mode for the entire application.
A single call enables dark mode for all existing and future dialogs:
FW_SetDarkMode( .T. ) // enable with default colors
FW_SetDarkMode( .T., nClrText, nClrBack ) // enable with custom colors
FW_SetDarkMode( .F. ) // disable (restore light mode)
FW_SetDarkMode() // query current state (.T./.F.)
When enabled, TDialog:Initiate automatically applies SetDarkMode() to every new
dialog. Existing open windows are themed immediately. TDialog:CtlColor forces
dark colors on resource-only static controls (SAYs, GroupBoxes, Radio, Checkbox).
Example:
#include "FiveWin.ch"
function Main()
local oWnd, oBar
FW_SetDarkMode( .T. )
DEFINE WINDOW oWnd TITLE "Dark Mode App"
DEFINE BUTTONBAR oBar OF oWnd
DEFINE BUTTON OF oBar ACTION TestDialog()
DEFINE BUTTON OF oBar ACTION FW_SetDarkMode( ! FW_SetDarkMode() ), ;
oWnd:Refresh() // toggle dark/light
ACTIVATE WINDOW oWnd
return nil
function TestDialog()
local oDlg, cName := Space( 30 )
DEFINE DIALOG oDlg TITLE "Test" SIZE 300, 200
@ 1, 1 SAY "Name:" OF oDlg
@ 1, 4 GET cName OF oDlg
@ 3, 1 CHECKBOX lCheck VAR .T. PROMPT "Option 1" OF oDlg
@ 4, 1 CHECKBOX lCheck2 VAR .F. PROMPT "Option 2" OF oDlg
@ 6, 4 BUTTON "OK" OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
Enhancement: TDialog:SetDarkMode( nClrText, nClrBack ) - Unified cascading dark
mode. Handles SAY, Group, Radio, Checkbox, TGet, TComboBox, TMultiGet, TListBox,
TXBrowse (with columns), TFolder (per page), and TBar automatically.
Both parameters default to RGB(220,220,220) / RGB(30,30,30).
Enhancement: TBar:SetDarkMode( nClrText, nClrBack ) - Dark mode for buttonbars.
Same signature as TDialog/TFolder. Detected automatically by the cascade.
FW_SetDarkMode(.F.) restores default light gradients via SetGradients().
Enhancement: TTabs - Dark mode support. Paints flat solid tabs with configurable
colors instead of bitmap-based tabs. Text color respects ::nClrText.
Enhancement: TTxtEdit - Improved text selection with mouse and keyboard:
- Anchor-based selection with consistent absolute line/col coordinates
- Proper multi-line partial rendering, drag selection, Shift+Arrow/Home/End
- Double-click word selection, multi-line DelBlock, partial-line Copy
- Backspace/Delete/typing replaces selected block, Ctrl+V deletes before paste
- Keywords (cTokens1) rendered in bold with slightly larger font
Enhancement: VisualFW IDE - Dark mode applied to all IDE windows: toolbars,
source editor tabs, buttonbars, Object Inspector, Options and Tools dialogs.
Dark Mode menu item shows a check mark. Window layout fixes for proper
alignment of Inspector and Source Editor borders.
Fix: VisualFW IDE - "Duplicated Id: No: 201" crash when opening the Options dialog.
The TXBrowse on the Project Option page was auto-assigned ID 201, colliding with the
ID_GETRESOURCE GET already registered on that dialog page. Fixed by setting the shared
TControl CLASSDATA counter (nInitID) past 201 before the XBrowse is created, ensuring
the auto-assigned ID is always >= 203.
Fix: VisualFW IDE - "Unrecoverable error 9003: Too many recursive error handler calls"
in the FWH error dialog (errsysw.prg). The ListBox was created with "@ LISTBOX n ITEMS
aStack" (without VAR), so n remained a string (aStack[1]) instead of the TListBox
object. Calling n:SetColor() then failed, triggering infinite recursion. Fixed by using
"@ LISTBOX oLbx VAR n ITEMS aStack" and calling oLbx:SetColor().
Enhancement: fixed Class TGemini for images support. Thanks to Roberto for his feedback:
https://forums.fivetechsupport.com/viewtopic.php?p=284399#p284399
Fix: Several fixes in TFont, TWindow, TTreeView and TFolder classes related to
form serialization (.ffm): correct font handle restoration, proper coordinate
handling, TFolder page array bounds, and TFolder per-page background color
preservation across save/load cycles.
Enhancement: VisualFW IDE - Multiple improvements to the Object Inspector: multi-line
editing for aPrompts on TFolder/TTabs controls, real-time tab switching when editing
nOption, fixed color/font/file dialog double-prompting, and improved color persistence.
Enhancement: VisualFW IDE - Dark Mode toggle added under Views menu, switching the
entire IDE between light and dark color schemes.
Enhancement: VisualFW IDE - Build system modernized with a single visualfw.hbp file
supporting both 32-bit (BCC) and 64-bit (MSVC) builds.
Enhancement: FiveWin Library - Refactored event resolution in TWindow:Load() using
variadic ellipsis and a new FW_EvMethod() helper for more robust event restoration.
Enhancement: TFolderEx PaintLR() method now supports multiline text (stacked vertical
characters) when the layout is LEFT or RIGHT. If a tab prompt contains Chr(13), the text
is drawn with a non-rotated font using DT_CENTER (without DT_SINGLELINE), allowing
characters to be displayed one below the other. This mirrors the same Chr(13) multiline
support that PaintTB() already had for TOP/BOTTOM layouts. Fully backwards compatible ÔÇö
existing prompts without Chr(13) are unaffected.
Enhancement: TOutlookMail class improvements:
- Added hUser DATA to cache the Microsoft Graph user profile, avoiding redundant
API calls on every send().
- revoke() now clears the cached hUser on disconnect.
- testoutlook.prg: token is now persisted via saveStore() after authentication and
after sending, so rotated refresh tokens survive application restarts.
- Applied Harbour coding standards (3-space indentation, proper block nesting,
parentheses spacing) to oauth.prg, outlookmail.prg and testoutlook.prg.
Enhancement: samples/outlook/testoutlook.rc minor changes for 32 bits.