Framework Overview
FiveWin for Harbour (FWH) is a comprehensive Windows application development framework that brings the power of the Win32 and Win64 API to the Harbour and xHarbour programming languages. It lets you build professional native Windows applications using a high-level, xBase-syntax language while accessing the full Windows API underneath.
What Is FiveWin?
FiveWin provides a complete object-oriented class library, a rich set of xBase commands, and seamless integration with multiple C compilers. Instead of wrestling with raw Win32 API calls, you write clean Harbour code with FiveWin commands:
- Native Windows controls — buttons, edit fields, listboxes, treeviews, ribbon bars, folder tabs, splitters, sliders, progress bars, gauges, cover-flow, video players, webcams, GIF animations, code editors (Scintilla), and 50+ more control classes
- Data access — native DBF/CDX/NTX via Harbour RDDs, ADO RecordSets (SQL Server, Oracle, Access), ODBC, MariaDB/MySQL with ORM, PostgreSQL via libpq, SQLite, and in-memory TArrayData
- Printing & reports — TPrinter with PDF output (FWPdf/HaruPDF/I2PDF), TReport engine, EasyReport visual designer, label printing (TLabel), barcode generation (39, 128, EAN, UPC, QR, DataMatrix, PDF417), print preview with dark mode
- Internet & AI — WebView2 (Chromium browser), HTTP/WebSocket client/server, SMTP/POP3/FTP, OAuth2 (Gmail, Outlook), WhatsApp Cloud API, OpenAI/ChatGPT, Google Gemini, DeepSeek, Ollama local LLMs, xAI Grok, Kimi, embeddings, native Transformer neural network
- Multi-language UI — runtime language switching via
FWString()(EN, ES, FR, PT, DE, IT built-in + custom), Unicode/UTF-8 support (FW_SetUnicode), Asian codepages (Big5, GB2312, Shift-JIS, EUC-KR, Thai, Arabic, Hebrew, Cyrillic)
TXBrowse — The Crown Jewel
TXBrowse is the most powerful and versatile data grid control in the FWH arsenal. With 18,000+ lines of source code, it supports virtually every data source and browsing scenario:
Architecture
FWH sits between your Harbour application code and the Windows operating system. The Harbour
compiler translates .prg source into C, which is then compiled by your chosen C compiler
and linked against FiveWin libraries.
Supported Compilers
FWH ships pre-built libraries for all major Harbour-compatible C compilers. Choose the compiler that fits your project requirements:
| Compiler | ID | Architecture | Library File | Notes |
|---|---|---|---|---|
| Borland C++ 5.x | hb32 |
32-bit | FiveH32.lib |
Classic BCC32, most widely used |
| Microsoft Visual C++ | hm32 |
32-bit | FiveHM32.lib |
MSVC 32-bit builds |
| Microsoft Visual C++ | hm64 |
64-bit | FiveH64.lib |
MSVC 64-bit, recommended for new projects |
| MinGW GCC | hg32 |
32-bit | FiveHG32.lib |
GCC 32-bit via MinGW |
| MinGW GCC | hg64 |
64-bit | FiveHG64.lib |
GCC 64-bit via MinGW-w64 |
Class Hierarchy
All FiveWin visual objects inherit from TWindow. Controls inherit through
TControl, while dialogs and MDI frames inherit directly from TWindow.
Quick Start: Hello World
The simplest FiveWin application creates a window and displays it. The DEFINE WINDOW
and ACTIVATE WINDOW commands handle all the Win32 boilerplate for you:
#include "FiveWin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "Hello World!" ;
SIZE 600, 400
ACTIVATE WINDOW oWnd CENTERED ;
ON INIT MsgInfo( "Welcome to FiveWin!" )
return nil
Save this as hello.prg, compile it with any supported compiler (see
Build System), and you have a native Windows application.
Simple Dialog Example
Dialogs are the primary way to collect user input. FiveWin dialogs support both text-based and pixel-based coordinate systems. Here is a typical data entry dialog:
#include "FiveWin.ch"
function CustomerDialog()
local oDlg, oGet1, oGet2, oBtnOk, oBtnCancel
local cName := Space( 40 )
local cCity := Space( 30 )
DEFINE DIALOG oDlg TITLE "Customer Entry" ;
SIZE 420, 220 PIXEL TRUEPIXEL
@ 20, 20 SAY "Name:" OF oDlg SIZE 60, 22 PIXEL
@ 20, 90 GET oGet1 VAR cName OF oDlg SIZE 300, 24 PIXEL
@ 55, 20 SAY "City:" OF oDlg SIZE 60, 22 PIXEL
@ 55, 90 GET oGet2 VAR cCity OF oDlg SIZE 300, 24 PIXEL
@ 100, 200 BUTTON oBtnOk PROMPT "&OK" OF oDlg ;
SIZE 80, 28 PIXEL ;
ACTION ( MsgInfo( "Name: " + AllTrim( cName ) ), oDlg:End() )
@ 100, 290 BUTTON oBtnCancel PROMPT "&Cancel" OF oDlg ;
SIZE 80, 28 PIXEL CANCEL ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
Multi-Language Support
FiveWin provides built-in internationalization via the FWString() function. You define
string tables for each language and switch at runtime without recompiling:
#include "FiveWin.ch"
function Main()
local oDlg
// Load language strings from resource or define inline
// English is the default; switch to Spanish:
FW_SetLanguage( "ES" )
DEFINE DIALOG oDlg TITLE FWString( "Customer Entry" ) ;
SIZE 400, 200 PIXEL TRUEPIXEL
@ 20, 20 SAY FWString( "Name" ) + ":" OF oDlg SIZE 80, 22 PIXEL
@ 20, 100 GET oGet VAR cName OF oDlg SIZE 260, 24 PIXEL
@ 70, 150 BUTTON oBtnOk PROMPT FWString( "Accept" ) OF oDlg ;
SIZE 80, 28 PIXEL ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
Supported languages include English, Spanish, French, German, Italian, Portuguese, Basque, Catalan, Dutch, Russian, and many more. You can also add custom language tables at runtime.
Key Features Summary
Next Steps
- Installation — Set up FiveWin on your machine
- Build System — Compile your first application
- TXBrowse — The most powerful grid control in FiveWin
- TDialog — Master dialog-based interfaces
- Class Index — Alphabetical list of all 285 FWH classes
- Function Index — Alphabetical list of FWH functions