What's New in FWH 26.09
Highlights of FiveWin for Harbour/xHarbour version 26.09 (September 2026).
See also whatsnew.txt in the FWH root for the full day-by-day log.
Automatic dark title bar + FW_SetCaptionColors
With FW_SetDarkMode( .T. ) every WINDOW and
DIALOG now gets a dark title bar automatically, using the dark
mode colors: no extra code needed
(source/classes/dialog.prg, source/classes/window.prg).
The new FW_SetCaptionColors() function customizes the caption
(source/classes/dialog.prg):
// Custom caption text/background colors (also in light mode)
FW_SetCaptionColors( nClrText, nClrBack )
// Back to the automatic colors
FW_SetCaptionColors( nil, nil )
// Query the custom colors: { nClrText, nClrBack } or nil
aClrs := FW_SetCaptionColors()
Caption theming uses the DWM (DwmSetWindowAttribute, with
dwmapi.dll loaded at runtime, so there is no new dependency).
It requires Windows 11; on older Windows it silently does nothing.
See TDialog caption colors
and TWindow dark mode.
TBitmap ASPECT: proportional scaling
New ASPECT option for @ ... BITMAP and
REDEFINE BITMAP, and new lAspectRatio property
(source/classes/bitmap.prg): the bitmap is drawn proportionally
scaled and centered inside the control, without distortion, leaving the
remaining area in the control background color. It takes precedence over
ADJUST; zero dimensions draw nothing. You can also set
oBmp:lAspectRatio := .T. and call oBmp:Refresh().
See TBitmap.
TScrollPanel: focus jump after horizontal scroll fixed
After a horizontal scroll, the bGotFocus handler that
SetRange() assigns to tab-stop controls still called
ControlIntoView(), yanking the panel back. It is now skipped
after a horizontal scroll too (lHScrolled), as it already was
after a vertical one (source/classes/scrlpanl.prg). No changes
required in user code. See TScrollPanel.
TWebView2: from 10 to 40+ natives
TWebView2 (source/classes/twebview2.prg,
source/internal/twebview/cwebview.cpp,
source/winapi/webview2.c, include/WebView2.ch) grows
from 10 to more than 40 natives. New methods:
NavigateEx( cUrl, cMethod, cHeaders, cBody ) (native POST),
GoBack/GoForward/Reload/Stop,
CanGoBack/CanGoForward, GetSource,
GetDocumentTitle, GetBrowserVersion, Print,
SetZoomFactor/GetZoomFactor,
SetDefaultScriptDialogs,
SetDefaultContextMenus/SetContextMenuExclude,
CapturePreview (async PNG) / PrintToPdf (async PDF),
Add/RemoveWebResourceRequestedFilter,
ClearSession/ClearBrowsingData,
EnableConsole, CloseWebView, Reinitialize,
SetSizeRatio and Diag/Reregister
diagnostics. New bOn* events: NavigationStarting (cancelable),
SourceChanged, HistoryChanged, DocumentTitleChanged, NewWindow, Permission
(allow/deny), FullScreen, ProcessFailed, FrameNavStarting/Completed and
Console. The default user data folder is
%LOCALAPPDATA%\FWH_webview2_UserData. Fully backward compatible;
new sample in samples/webview2/.
TProlog: a Prolog engine inside FiveWin
New class TProlog (source/classes/tprolog.prg):
a Prolog engine embedded in Harbour/FiveWin, with facts and rules,
backtracking, unification (optional occurs-check), cut (!),
negation (not/\+), findall/3, arithmetic
(is/2, =:=/2, ...) and fast native list builtins
(member, append, permutation,
numlist, alldiff, sort,
between, ...). Query() returns an array of hashes
{ VarName => "term" }. The C core
(source/function/prolog.c, trail + owned term heap) solves the
8-queens problem (all 92 solutions) about 230x faster than the previous
Harbour interpreter. Samples: samples/ai/tprolog.prg,
samples/ai/tprologbench.prg and samples/ai/plpad.prg,
a Prolog pad with syntax highlighting, a 3D graph of the knowledge base and
an "explain" button powered by TOpenCode.
MAPI: typed SMTP address fill
MAPISendMail() / DEFINE MAIL with a single-parameter
TO cEmail: the 26.07 fallback copied the bare display name into
lpszAddress (no type prefix), which made Outlook build a one-off
recipient and Exchange Online never deliver the attachment.
mapi.c now fills the typed form SMTP:user@domain,
only when the name contains @. The new optional
SetMapiAddrFill( .F. ) restores the pre-26.07 behaviour of
leaving lpszAddress empty for the client to resolve. The dual
form TO cName, cAddress is unchanged.
IsWindows10() fixed on Windows Server
IsWindows10() now reads the build number, the same way
IsWindows11() does, instead of the registry product name, which
says "Windows Server" on server editions: it wrongly returned .F.
on Windows Server 2016/2019/2022.
xHarbour 64 and MinGW link fixes
xHarbour + BCC 64 (xb64): Fivexh64.a was missing everything in
source/function/harbour.prg (ASend(),
OSend(), OClone(), ParamCount(),
OleInvoke() and more), so xHarbour 64-bit apps failed to link
with errors like Unresolved external 'HB_FUN_ASEND';
TVistaMenu was missing too. Both are in now, and
mfwh_new.bat xb64 lists any source that fails to compile and
stops, instead of silently leaving it out of the lib.
The FiveWin libs also build again with MinGW 32
(source/internal/remoteview/capture.c defines
SM_CXPADDEDBORDER when the SDK headers lack it), and FWMariaDB
apps link with xHarbour + MSVC 32 (source/internal/fwmaria.prg
uses its own nxs_crypt and Adler-32 there).
TOpenCode talks to OpenCode Zen again
TOpenCode (source/classes/topencode.prg) works with
the Zen service again: the x-opencode-session: public header is
sent (the old requests failed with MissingSessionID), the free-model catalog
is up to date (ling-3.0-flash-fin-free default) and HTTP status
falls back to the return value. See
TOpenCode.
New samples
samples/menus/vistamenu.prg— a minimalTVistaMenuexample (lateral menu with three items); this class had no sample to build.samples/ai/plpad.prg— Prolog pad: paste or open a.plfile, consult it withTPrologand run queries, with a TWebView2/three.js graph ofnode()/edge().
PrinterKeepSetup
New: PrinterKeepSetup( lOn ) keeps the printer chosen in PrinterSetup() or PageSetup() for the following print jobs (off by default, falls back silently to the default printer if the kept one is gone, PrinterResetSetup() forgets it). See TPrinter.