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:

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:

mindmap TXBrowse Data Sources DBF / CDX / NTX ADO RecordSets ODBC / SQL MariaDB RowSets PostgreSQL TArrayData arrays Hashes / Objects Trees Features Inline cell editing FastEdit mode Marquee style selection Incremental SeekBar Multi-select rows Frozen columns Column drag-and-drop reorder Auto-sort on header click Grouped headers Footer totals Dynamic filters Conditional formatting Per-cell bitmaps Progress bars in cells Charts in cells CSV / Excel / HTML export PDF export Print with preview Visual Styles Windows themed Office 2007 / 2010 / 2013 / 2015 Dark mode Flat style Gradient rows Grid lines / no lines

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.

mindmap root((FiveWin 26.05)) UI Controls TXBrowse Window Dialog Button BtnBmp Get MultiGet ComboBox ListBox Menu MenuItem Folder FolderEx Tabs Pages Panel TreeView ListView RichEdit5 Scintilla WebView2 Data Access TDatabase TRecSet ADO TODBC MariaDB MySQL PostgreSQL ORM Classes TArrayData TDataRow Printing TPrinter TReport PDF FWPdf Print Preview BarCode Internet and AI Socket Ftp Smtp Pop3 WebServer OpenAI LLMs OAuth2 Email WhatsApp Graphics and GDI Pen Brush Font Image XImage GDI+ Classes Box DrawImage Utilities File Ini Reg32 ClipBoard Excel Integration Localization AI and ML Cloud LLMs Transformer Net TEmbeddings Build System Compilers Installation Samples Guide

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.

classDiagram TWindow <|-- TControl TWindow <|-- TDialog TWindow <|-- TMDIFrame TWindow <|-- TMDIChild TControl <|-- TButton TControl <|-- TGet TControl <|-- TSay TControl <|-- TXBrowse TControl <|-- TComboBox TControl <|-- TCheckBox TControl <|-- TRadio TControl <|-- TFolder TControl <|-- TTreeView TControl <|-- TRichEdit TControl <|-- TScrollBar class TWindow { +hWnd +oWnd +cTitle +nTop, nLeft, nWidth, nHeight +Activate() +Center() +End() } class TControl { +oWnd +bSetGet +bWhen +bValid +Refresh() } class TDialog { +lModal +Activate() } class TXBrowse { +oDbf / oRs +aCols +SetArray() +SetRDD() }

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

mindmap root((FiveWin 26.05)) UI Controls TXBrowse Window Dialog Button BtnBmp Get MultiGet ComboBox ListBox Menu MenuItem Folder FolderEx Tabs Pages Panel TreeView ListView RichEdit5 Scintilla WebView2 Data Access TDatabase TRecSet ADO TODBC MariaDB MySQL PostgreSQL ORM Classes TArrayData TDataRow Printing TPrinter TReport PDF FWPdf Print Preview BarCode Internet and AI Socket Ftp Smtp Pop3 WebServer OpenAI LLMs OAuth2 Email WhatsApp Graphics and GDI Pen Brush Font Image XImage GDI+ Classes Box DrawImage Utilities File Ini Reg32 ClipBoard Excel Integration Localization AI and ML Cloud LLMs Transformer Net TEmbeddings Build System Compilers Installation Samples Guide

Next Steps