Switch to Russian Home page of Alexander Kresin
Main Clipper HwGUI Five stones File utilities
Links KS Organizer My photo

HwGUI reference manual for version 2.10

Alexander S.Kresin
September 2003

1 Introduction

1.1 What is HwGUI

HwGUI is an add-on library for Harbour, intended for creating GUI applications on Win32 platform. HwGUI is based on direct calls of Win32 API, so it cannot be used with other operating systems. While developing HwGUI I tried to hide from the end user - Harbour programmer technical details of API calls and to build a set of commands and functions, which could allow easily create and manage GUI objects.

1.2 History of HwGUI

I began to work on HwGUI in August 2001 and the first version was released on August 21. My initial intention was to create a small and fast GUI lib mainly for my own needs. And already in October I had wrote the first small application with HwGUI for my firm, it reads the databases, created and managed with the accounting system, generates some documents and sends them by fax.

Firstly, from the initial release and til the 1.3 HwGUI didn't use the OOP paradigm - and I even had declared this as one of HwGUI features. My main motivations was speed and stability. Harbour's implementation of classes at that time had some bugs and I didn't want to add problems to myself. And, of course, access to object's variables is more slow than access to the array items. OOP is an additional level and using of it reduces application's performance.

But later I have arrived at a decision to make HwGUI OOP based - to simplify user interface and make it better structured and more convenient. So since release 2.0 HwGUI uses classes.

2 Installation of HwGUI

2.1 HwGUI package

HwGUI is distributed as a zip package. Currently it doesn't use any setup utility, you need simply unzip it to any place you want. The zip package includes following files and directories:

make_b32.bat
makefile.bc
make_vc.bat
makefile.vc
license.txt
install.txt
whatsnew.txt
DOC- Folder with documentation
INCLUDE- Folder with HwGUI header files
LIB- Folder for HwGUI lib
OBJ
SAMPLES- Folder with HwGUI samples
SOURCE- Folder with Hwgui sources

2.2 How to build HwGUI library

Before building the library you need to check the value of HRB_DIR environment variable in the HWGUI/makefile.bc file. It should point to the directory where your copy of Harbour is. Then run make_b32.bat - and this will build two libraries - hwgui.lib and procmisc.lib. That's all !

2.3 How to build HwGUI samples

3 How to use HwGUI

3.1 First HwGUI application

   Function Main
   Local oMainWnd, oFont
   Local aCombo := {"First","Second" }
   PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13
   INIT WINDOW oMainWnd TITLE "Example" ;
           FONT oFont ;
           ON EXIT {||MsgYesNo("Really want to quit ?")}

   @ 20,10 EDITBOX "Hello, World!" ;
           SIZE 200,30 ;
           STYLE WS_DLGFRAME+ES_LEFT

   @ 270,10 COMBOBOX aCombo ;
           STYLE WS_TABSTOP ;
           SIZE 100, 150 TOOLTIP "Combobox"

   @ 120,60 BUTTON "Close" ;
           SIZE 150,30 ;
           ON CLICK {||EndWindow()}

   MENU OF oMainWnd
           MENUITEM "About" ACTION MsgInfo("First HwGUI Application")
   ENDMENU

   ACTIVATE WINDOW oMainWnd
   Return

First thing you will want to do, I think, is to create the main window. The best way to do this is the command INIT WINDOW. In this command you can define initial position and the size of the window, it's style, icon, background color. You can set also event handlers - codeblocks, which are evaluated for different events ( INIT, EXIT, PAINT, SIZE changing, GETFOCUS, LOSTFOCUS and others ).

Then you need to define controls for that window and the main menu ( MENU ... ENDMENU commands), and, at least, activate the window, ( ACTIVATE WINDOW ) show it on the screen. Let analyse the above sample.

   PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13
At first, we create the font object for the main window. HwGUI works in such a way, that if a font isn't defined for a control, this control uses the font, defined for his parent window.
   INIT WINDOW oMainWnd MAIN TITLE "Example" ;
           FONT oFont ;
           ON EXIT {||MsgYesNo("Really want to quit ?")}
This command creates main window with the title "Example" and with previously created font. ON EXIT clause will cause appearance of a message box, user will need to choose "Yes" to quit the application.
   @ 20,10 EDITBOX "Hello, World!" ;
           SIZE 200,30 ;
           STYLE WS_DLGFRAME+ES_LEFT
   @ 270,10 COMBOBOX aCombo ;
           STYLE WS_TABSTOP ;
           SIZE 100, 150 TOOLTIP "Combobox"
   @ 120,60 BUTTON "Close" ;
           SIZE 150,30 ;
           ON CLICK {||EndWindow()}
The above commands creates appropriate controls - Edit, Combobox and Push Button. ComboBox is initialized with aCombo array, which was declared before. Button has an event handler defined - closing the application.
   MENU OF oMainWnd
           MENUITEM "About" ACTION MsgInfo("First HwGUI Application")
   ENDMENU

These commands creates the main menu, which includes the only item "About".
   ACTIVATE WINDOW oMainWnd
And, at least, this last command activates the main window. It appears on the screen with menu and all controls defined.

4 Commands

4.1 Commands for windows and dialogs handling

4.1.1 INIT WINDOW

This command creates the window - main, MDI or MDI CHILD. To force this window show up on the screen you need to activate it later. You can do this with ACTIVATE WINDOW command or with Activate() method of that window object.

INIT WINDOW <oWnd>
[ MAIN ]
[ MDI ]
[ MDICHILD ]
[ APPNAME <appname> ]
[ TITLE <cTitle> ]
[ AT <x>, <y> ]
[ SIZE <width>, <height> ]
[ ICON <ico> ]
[ COLOR <clr> ]
[ BACKGROUND BITMAP <oBmp>> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ MENU <cMenu> ]
[ MENUPOS <nPos> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ ON OTHER MESSAGES <bOther> ]
[ ON EXIT <bExit> ]

MAIN,MDI,MDICHILD clauses specifies the type of the window, only one of this clauses may be used in the command.
cTitle - title of the window;
x,y,width,height - left and top coordinates of the window, it's width and height;
ico - the name of the Icon in the resource file;
clr - the background color of the window;
nStyle - style of the window;
oFont - previously created HFont object;
cMenu - the name of menu declaration in the resource file ( if you specify menu in resources );
nPos - identifies the window menu used for controlling MDI child windows. As child windows are created, the application adds their titles to the Window menu as menu items. The user can then activate a child window by choosing its title from the window menu.
bSize - codeblock, which is evaluated while resizing window;
bPaint - codeblock, which is evaluated while window drawing;
bGFocus - codeblock, which is evaluated when window gets focus;
bLFocus - codeblock, which is evaluated when window losts focus;
bExit - codeblock, which is evaluated when window is closed;
bOther - codeblock, which is evaluated for all other messages - you can write your own procedure for messages handling;

4.1.2 INIT DIALOG

This command creates the dialog box. To force the dialog show up on the screen you need to activate it later. You can do this with ACTIVATE DIALOG command or with Activate() method of that window object.

INIT DIALOG <oWnd>
[ FROM RESOURCE ]
[ TITLE <cTitle> ]
[ AT <x>, <y> ]
[ SIZE <width>, <height> ]
[ ICON <ico> ]
[ BACKGROUND BITMAP <oBmp> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ CLIPPER ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ ON OTHER MESSAGES <bOther> ]
[ ON EXIT <bExit> ]

All clauses has the same meaning as in INIT WINDOW command, there is only one specific clause - FROM RESOURCE - it is used if you create the dialog box from resource file.

4.1.3 ACTIVATE WINDOW
ACTIVATE WINDOW <oWnd>

This command is equal to 'oWnd:Activate()' call. It shows the previously created window and starts messages processing for it.

4.1.4 ACTIVATE DIALOG
ACTIVATE DIALOG <oDlg> [ NOMODAL ]

This command is equal to 'oDlg:Activate()' call. It shows the previously defined dialog and starts messages processing for it. By default, it creates modal dialog. You can create modeless dialog, specifying NOMODAL clause in this command.

4.1.5 DIALOG ACTIONS OF

DIALOG ACTIONS OF <oWnd>
ON <id1>,<id2> ACTION <b1>
[ ON <idn1>,<idn2> ACTION <bn> ]

This command is for those users, who are familiar with Win32 API. The window gets WM_COMMAND message when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
You can specify in this command the event, the source of the event and the appropriate action. id1 ...idn1 is the event code, id1 ... idn2 - is the identificator of the control, b1 ... bn - the codeblock.
Take a look at the samples to see how this command may be used.

4.2 Menu commands

4.2.1 MENU

MENU [ OF <oWnd> ] [ ID <nId> ] [ TITLE <cTitle> ]
4.2.2 ENDMENU

ENDMENU
4.2.3 MENUITEM

MENUITEM <item> [ ID <nId> ]
ACTION <act>
[ ACCELERATOR <flag>, <key> ]
[ <lDisabled: DISABLED> ]
4.2.4 SEPARATOR

SEPARATOR
4.2.5 MENU FROM RESOURCE OF

MENU FROM RESOURCE OF <oWnd>
ON <id1> ACTION <b1>
[ ON <idn> ACTION <bn> ]

This command is used if you specify menu in resource file, it defines actions for each menu item.

4.2.6 CONTEXT MENU

CONTEXT MENU <oMenu>

4.3 Commands for controls handling

All the following commands creates the instances of classes, they are preprocessed into the New() or Redefine() method of appropriate class.

4.3.1 ADD STATUS TO

ADD STATUS [ TO <oWnd> ]
[ ID <nId> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ PARTS <aparts,...> ]
4.3.2 @ <x>,<y> SAY

@ <x>,<y> SAY [ <oSay> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.3 @ <x>,<y> EDITBOX

@ <x>,<y> EDITBOX [ <oEdit> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ STYLE <nStyle> ]
[<lnoborder: NOBORDER> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.4 REDEFINE EDITBOX

REDEFINE EDITBOX <oEdit>
[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.5 @ <x>,<y> BUTTON

@ <x>,<y> BUTTON [ <oButton> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
2 4.3.6 REDEFINE BUTTON

REDEFINE BUTTON <oButton>
[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.7 @ <x>,<y> CHECKBOX

@ <x>,<y> CHECKBOX [ <oCheck> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ INIT <lInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.8 REDEFINE CHECKBOX

REDEFINE CHECKBOX <oCheck>
[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ INIT <lInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.9 @ <x>,<y> COMBOBOX

@ <x>,<y> COMBOBOX [ <oCombo> ITEMS ] <aItems>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ INIT <nInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CHANGE <bChange> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.10 REDEFINE COMBOBOX

REDEFINE COMBOBOX [ <oCombo> ITEMS ] <aItems>
[ OF <oWnd> ]
ID <nId>
[ INIT <nInit> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CHANGE <bChange> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.11 @ <x>,<y> RADIOBUTTON

@ <x>,<y> RADIOBUTTON [ <oRadio> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.12 REDEFINE RADIOBUTTON

REDEFINE RADIOBUTTON <oRadio>
[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.13 RADIOGROUP
   RADIOGROUP
4.3.14 END RADIOGROUP
   END RADIOGROUP [ SELECTED <nSel> ]
4.3.15 @ <x>,<y> PANEL

@ <x>,<y> PANEL <oPanel>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
4.3.16 REDEFINE PANEL

REDEFINE PANEL <oCheck>
[ OF <oWnd> ]
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
4.3.17 @ <x>,<y> BROWSE

@ <x>,<y> BROWSE <oBrowse>
[ ARRAY ]
[ DATABASE ]
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ ON GETFOCUS <bGetFocus> ]
[ ON LOSTFOCUS <bLostFocus> ]
[ STYLE <nStyle> ]
[ <lNoVScr: NO VSCROLL> ]
[ <lNoBord: NO BORDER> ]
[ FONT <oFont> ]
4.3.18 REDEFINE BROWSE

REDEFINE BROWSE <oBrowse>
[ ARRAY ]
[ DATABASE ]
[ OF <oWnd> ]
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ ON GETFOCUS <bGetFocus> ]
[ ON LOSTFOCUS <bLostFocus> ]
[ FONT <oFont> ]
4.3.19 ADD COLUMN

ADD COLUMN <block> <
TO <oBrowse>
[ HEADER <cTitle> ]
[ TYPE <type> ]
[ LEN <length> ]
[ DEC <dec> ]
[ <lEdit: EDITABLE> ]
4.3.20 @ <x>,<y> OWNERBUTTON

@ <x>,<y> OWNERBUTTON <oOwnBtn>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ STYLE <nStyle> ]
[ FLAT ]
[ TEXT <cText>
           [ COLOR <color> ] [ FONT <font> ]
           [ COORDINATES <xt>, <yt>, <widthtt>, <heightt> ]
]
[ BITMAP <bmp> [ FROM RESOURCE ] [ TRANSPARENT ]
           [ COORDINATES <xb>, <yb>, <widthtb>, <heightb> ]
]
4.3.21 REDEFINE OWNERBUTTON

REDEFINE OWNERBUTTON <oOwnBtn>
[ OF <oWnd> ]
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CLICK <bClick> ]
[ STYLE <nStyle> ]
[ FLAT ]
[ TEXT <cText>
           [ COLOR <color> ] [ FONT <font> ]
           [ COORDINATES <xt>, <yt>, <widthtt>, <heightt> ]
]
[ BITMAP <bmp> [ FROM RESOURCE ] [ TRANSPARENT ]
           [ COORDINATES <xb>, <yb>, <widthtb>, <heightb> ]
]
4.3.22 @ <x>,<y> GROUPBOX
@ <x>,<y> GROUPBOX [ <oGroup> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
4.3.23 @ <x>,<y> DATEPICKER
@ <x>,<y> DATEPICKER [ <oPicker> CAPTION ] <caption>
[ OF <oWnd> ]
ID <nId>
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ INIT <value> ]
[ ON INIT <bInit> ]
[ ON GETFOCUS <bGetFocus> ]
[ ON LOSTFOCUS <bLostFocus> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.24 @ <x>,<y> UPDOWN

@ <x>,<y> UPDOWN [ <oUpDown> INIT ] <nInit>
RANGE <nLower>, <nUpper>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ WIDTH <nUpdWidth> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.25 @ <x>,<y> TAB

@ <x>,<y> TAB [ <oTab> ITEMS ] <aTabs>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bDraw> ]
[ ON CHANGE <bChange> ]
4.3.26 BEGIN PAGE BEGIN PAGE <cname> OF <oTab>

4.3.27 END PAGE

END PAGE OF <oTab>

4.3.28 @ <x>,<y> TREE

@ <x>,<y> TREE [ <oTree> ]
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ FONT <oFont> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ STYLE <nStyle> ]
[<lEdit: EDITABLE> ]
[ BITMAP <aBmp> [<res: FROM RESOURCE>] ]
4.3.29 INSERT NODE

INSERT NODE [ <oNode> TITLE ] <cTitle>
TO <oTree>
[ AFTER <oPrev> ]
[ BEFORE <oNext> ]
[ BITMAP <aBmp> ]
[ ON CLICK <bClick> ]
4.3.30 SET TIMER

SET TIMER [ <oTimer> ]
[ OF <oWnd> ]
[ ID <id> ]
VALUE <value>
ACTION <bAction>
4.3.31 @ <x>,<y> BITMAP

@ <x>,<y> BITMAP [ <oBmp> SHOW ] <bitmap>
[<res: FROM RESOURCE> ]
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
4.3.32 @ <x>,<y> REDEFINE BITMAP REDEFINE BITMAP [ <oBmp> SHOW ] <bitmap>
[ OF <oWnd> ]
[ ID <nId> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
4.3.33 @ <x>,<y> ICON

@ <x>,<y> ICON [ <oBmp> SHOW ] <icon>
[<res: FROM RESOURCE> ]
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
4.3.34 @ <x>,<y> REDEFINE ICON REDEFINE ICON [ <oBmp> SHOW ] <icon>
[ OF <oWnd> ]
[ ID <nId> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
4.3.35 @ <x>,<y> IMAGE

@ <x>,<y> IMAGE [ <oBmp> SHOW ] <image>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
4.3.36 @ <x>,<y> REDEFINE IMAGE REDEFINE IMAGE [ <oBmp> SHOW ] <image>
[ OF <oWnd> ]
[ ID <nId> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ TOOLTIP <ctoolt> ]
4.3.37 @ <x>,<y> LINE

@ <x>,<y> LINE [ <oLine> ]
[ LENGTH <length> ]
[ OF <oWnd> ]
[ ID <nId> ]
[<lVert: VERTICAL>]
[ ON SIZE <bSize> ]
4.3.38 @ <x>,<y> RICHEDIT

@ <x>,<y> RICHEDIT [ <oEdit> TEXT ] <vari>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ ON GETFOCUS <bGfocus> ]
[ ON LOSTFOCUS <bLfocus> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.3.39 @ <x>,<y> SPLITTER

@ <x>,<y> SPLITTER [ <oSplit> ]
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON SIZE <bSize> ]
[ ON PAINT <bPaint> ]
[ DIVIDE <aLeft> FROM <aRight> ]
4.3.40 @ <x>,<y> GRAPH

@ <x>,<y> GRAPH [ <oGraph> DATA ] <aData>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ ON SIZE <bSize> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]

4.4 Get system commands

Get system doesn't use a special class, something like HGet. It uses the same control classes ( HEdit, HCheckButton, etc. ), as usual control creating commands, only add there some new behavour.

4.4.1 @ <x>,<y> GET

@ <x>,<y> GET [ <oEdit> VAR ] <vari>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ PICTURE <cPicture> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.2 REDEFINE GET

REDEFINE GET [ <oEdit> VAR ] <vari>
[ OF <oWnd> ]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.3 @ <x>,<y> GET CHECKBOX

@ <x>,<y> GET CHECKBOX [ <oEdit> VAR ] <vari>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ <valid: VALID,ON CLICK> <bValid> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.4 REDEFINE GET CHECKBOX

REDEFINE GET CHECKBOX [ <oEdit> VAR ] <vari>
[ OF <oWnd>]
ID <nId>
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ <valid: VALID,ON CLICK> <bValid> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.5 @ <x>,<y> GET COMBOBOX

@ <x>,<y> GET COMBOBOX [ <oCombo> VAR ] <vari>
ITEMS ] <aItems>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON CHANGE <bChange> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.6 REDEFINE GET COMBOBOX

REDEFINE GET COMBOBOX [ <oCombo> VAR ] <vari>
ITEMS ] <aItems>
[ OF <oWnd> ]
ID <nId>
[ ON CHANGE <bChange> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.7 GET RADIOGROUP

   GET RADIOGROUP [ <ogr> VAR ] <vari>
4.4.8 @ <x>,<y> GET DATEPICKER

@ <x>,<y> GET DATEPICKER [ <oPick> VAR ] <vari>
[ OF <oWnd>]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]
4.4.9 @ <x>,<y> GET UPDOWN

@ <x>,<y> GET UPDOWN[ <oUpDown> VAR ] <vari>
RANGE <nLower>, <nUpper>
[ OF <oWnd> ]
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ WIDTH <nUpdWidth> ]
[ COLOR <tcolor> ]
[ BACKCOLOR <bcolor> ]
[ PICTURE <cPicture> ]
[ WHEN <bWhen> ]
[ VALID <bValid> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]

5 Functions

5.1 Common dialogs

5.1.1 SelectFont( [ oFont ] )

This function calls the standard dialog for font selecting. Usually it isn't needed to call this function directly, use HFont():Select( oFont ) instead.

5.1.2 SelectFile( cDescript,cMask,[ cInitDir ], [ cTitle ] )

This function calls the standard dialog for file selecting.

5.1.3 SaveFile( cPrompt,cDescript,cMask,cInitDir,cTitle )

This function calls the standard dialog for file saving.

5.1.4 PrintSetup()

This function calls the standard dialog for printer selecting.

5.1.5 hwg_ChooseColor( nColorCurrent )

This function calls the standard dialog for color selecting.

5.2 MessageBoxes and HwGUI dialogs

5.2.1 MsgInfo( cMessage,cTitle )

5.2.2 MsgStop( cMessage,cTitle )

5.2.3 MsgOkCancel( cMessage,cTitle )

5.2.4 MsgYesNo( cMessage,cTitle )

5.2.5 MsgBeep( nSound )

5.2.6 MsgGet( cTitle, cText, nStyle, x, y, nDlgStyle )

5.2.7 WChoice( arr, cTitle, nLeft, nTop, oFont, clrT, clrB, clrTSel, clrBSel )

5.3 Drawing functions.

6 Classes

6.1 Class hierarchy

The following schema illustrates the hierarchy of classes, currently implemented in HwGUI.


6.2 HObject

It is a base class for all HwGUI classes.

6.3 HCustomWindow

Do not create instances of HCustomWindow. It serves as a base class for windows, dialogs and controls classes. Variables and methods of HCustomWindow provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.

DATA
handle
oParent
title
type
nTop, nLeft, nWidth, nHeight
tcolor, bcolor, brush
style
extstyle
lHide
oFont
aEvents, aNotify
aControls
bInit
bDestroy
bSize
bPaint
bGetFocus
bLostFocus
bOther
cargo
METHODS
AddControl( oCtrl )
DelControl( oCtrl )
AddEvent( nEvent,nId,bAction )
FindControl( nId )
Hide()
Show()

6.3.1 HWindow

DATA
CLASS VAR aWindows
CLASS VAR szAppName
menu, nMenuPos, oPopup, hAccel
oIcon, oBmp
oNotifyIcon, bNotify, oNotifyMenu
lClipper
lTray
METHODS
New( lType,oIcon,clr,nStyle,x,y,width,height,cTitle,cMenu,nPos,oFont,
           bInit,bExit,bSize,bPaint,bGfocus,bLfocus,bOther,cAppName,oBmp )
Activate( lShow )
InitTray( oNotifyIcon, bNotify, oNotifyMenu )
AddItem( oWnd )
DelItem( oWnd )
FindWindow( hWnd )
GetMain()
GetMdiActive()

6.3.2 HDialog

DATA
CLASS VAR aDialogs
CLASS VAR aModalDialogs
oPopup
lResult
lUpdated // TRUE, if any GET is changed
lClipper // Set it to TRUE for moving between GETs with ENTER key
GetList
nLastKey
oIcon, oBmp
METHODS
New( lType,nStyle,x,y,width,height,cTitle,bInit,bExit,bSize,
           bPaint,bGfocus,bLfocus,bOther,lClipper,oBmp,oIcon ) Activate(lNoModal)
AddItem( oWnd,lModal )
DelItem( oWnd,lModal )
FindDialog( hWnd )

6.3.3 HControl

DATA
id
tooltip
lInit
METHODS
Init()
SetColor( tcolor,bcolor,lRepaint )
NewId()
Move( x1,y1,width,height )

6.3.3.1 HBrowse

DATA
winclass
active
lChanged
lDispHead Should I display headers ?
lDispSep Should I display separators ?
aColumns HColumn's array
rowCount Number of visible data rows
rowPos Current row position
rowCurrCountCurrent number of rows
colPos Current column position
nColumns Number of visible data columns
nLeftCol Leftmost column
xpos
freeze Number of columns to freeze
kolz Number of records in browse
tekzp,msrec
recCurr
headColor Header text color
sepColor Separators color
tcolorSel,bcolorSel,brushSel
bSkip,bGoTo,bGoTop,bGoBot,bEof,bBof
bRcou,bRecno
bPosChanged, bLineOut
bEnter, bKeyDown
internal
alias Alias name of browsed database
x1,y1,x2,y2,width,height
minHeight
lEditable
lAppable
lAppMode
lAutoEdit
lUpdated
lAppended
METHODS
New( lType,oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont ;
           bInit,bSize,bPaint,bEnter,bGfocus,bLfocus,lNoVScroll,lNoBorder )
InitBrw( nType )
Rebuild()
Activate()
Redefine( lType,oWnd,nId,bInit,bSize,bDraw,bEnter,bGfocus,bLfocus )
FindBrowse( nId )
AddColumn( oColumn )
InsColumn( oColumn,nPos )
DelColumn( nPos )
Paint()
LineOut()
HeaderOut( hDC )
DoHScroll( wParam )
DoVScroll( wParam )
LineDown()
LineUp()
PageUp()
PageDown()
Bottom()
Top()
ButtonDown( lParam )
ButtonUp( lParam )
ButtonDbl( lParam )
MouseMove( wParam, lParam )
Edit( wParam,lParam )
Append()
RefreshLine()
Refresh()
ShowSizes()
End()

6.3.3.2 HPanel

DATA
winclass
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,
           bInit,bSize,bPaint )
Activate()
Redefine( oWnd,nId,nHeight,bInit,bSize,bPaint )
Paint()
End()

6.3.3.3 HOwnerButton

DATA
CLASSDATA oSelected
winclass
lFlat
state
bClick
text,tfont,xt,yt,widtht,heightt
bitmap,xb,yb,widthb,heightb,lTransp
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,
           bInit,bSize,bPaint,bClick,lflat,
           cText,color,font,xt,yt,widtht,heightt,
           bmp,lResour,xb,yb,widthb,heightb,lTr,
           cTooltip )
Activate()
Redefine( oWndParent,nId,bInit,bSize,bPaint,bClick,lflat,
           cText,color,font,xt,yt,widtht,heightt,
           bmp,lResour,xb,yb,widthb,heightb,lTr,
           cTooltip ) Paint()
MouseMove( wParam, lParam )
MDown()
MUp()
Press()
Release()
End()

6.3.3.4 HSplitter

DATA
winclass
aLeft
aRight
lVertical
hCursor
lCaptured, lMoved
METHODS
New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,
           bSize,bPaint,color,bcolor,aLeft,aRight )
Activate()
Init()
Paint( lpdis )
Drag( lParam )
DragAll()

6.3.3.5 HStatus

DATA
aParts
METHODS
New( oWndParent,nId,nStyle,aParts,bInit,bSize,bPaint )
Activate()

6.3.3.6 HStatic

DATA
CLASS VAR winclass
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,bInit,bSize,bPaint,ctoolt,tcolor,bcolor,lTransp )
Activate()
Redefine( oWndParent,nId,oFont,bInit, ;
           bSize,bPaint,ctoolt,tcolor,bcolor,lTransp ) SetValue(value)

6.3.3.7 HButton

DATA
CLASS VAR winclass
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,
           bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor )
Activate()
Redefine( oWnd,nId,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor )

6.3.3.8 HEdit

DATA
CLASS VAR winclass
CLASS VAR lCtrl
CLASS VAR lShift
lMultiLine
cType
bSetGet
bValid
cPicFunc, cPicMask
lPicComplex
lFirst
lChanged
METHODS
New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,oFont,
           bInit,bSize,bPaint,bGfocus,bLfocus,ctoolt,tcolor,bcolor,cPicture,lNoBorder )
Activate()
Redefine( oWnd,nId,vari,bSetGet,oFont,bInit,bSize,bDraw,bGfocus,bLfocus,ctoolt,tcolor,bcolor,cPicture )
Init()
SetGet(value) INLINE Eval( ::bSetGet,value )
Refresh()

6.3.3.9. HChecButton

DATA
CLASS VAR winclass
bSetGet
value
METHODS
New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,
           bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor )
Activate()
Redefine( oWnd,nId,vari,bSetGet,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor )
Init()

6.3.3.10 HRadioButton

DATA
CLASS VAR winclass
CLASS VAR oGroup
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,
           bInit,bSize,bPaint,bClick,ctoolt,tcolor,bcolor )
Activate()
Redefine( oWnd,nId,oFont,bInit,bSize,bDraw,bClick,ctoolt,tcolor,bcolor )

6.3.3.11 HCombobox

DATA
CLASS VAR winclass
aItems
value
bChangeSel
METHODS
New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight,aItems,
           bInit,bSize,bPaint,bChange,cTooltip )
Activate()
Redefine( oWnd,nId,vari,bSetGet,aItems,bInit,bSize,bPaint,bChange,cTooltip )
Init( aCombo, nCurrent )

6.3.3.12 HGroup

DATA
CLASS VAR winclass
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,cCaption,oFont,
           bInit,bSize,bPaint,tcolor,bcolor )
Activate()

6.3.3.13 HLine

DATA
CLASS VAR winclass
lVert
oPenLight, oPenGray
METHODS
New( oWndParent,nId,lVert,nLeft,nTop,nLength,bSize )
Activate()
Paint()

6.3.3.14 HSayImage

DATA
CLASS VAR winclass
oImage
METHODS
New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,bInit,
           bSize,ctoolt )
Activate() Redefine( oWndParent,nId,bInit,bSize,ctoolt )
End()

6.3.3.14.1 HSayBmp

METHODS
New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit,
           bSize,ctoolt )
Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt )
Init()

6.3.3.14.2 HSayIcon

METHODS
New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit,
           bSize,ctoolt )
Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt )
Init()

6.3.3.14.3 HSayFImage

METHODS
New( oWndParent,nId,nLeft,nTop,nWidth,nHeight,Image,lRes,bInit,
           bSize,ctoolt )
Redefine( oWndParent,nId,Image,lRes,bInit,bSize,ctoolt )
Init()

6.3.3.15 HDatePicker

DATA
CLASS VAR winclass
bSetGet
value
METHODS
New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight, ;
           oFont,bInit,bGfocus,bLfocus,ctoolt,tcolor,bcolor )
Activate()
Init()

6.3.3.16 HUpDown

DATA
CLASS VAR winclass
bSetGet
hUpDown, idUpDown, styleUpDown
nLower
nUpper
nUpDownWidth
lChanged
METHODS
New( oWndParent,nId,vari,bSetGet,nStyle,nLeft,nTop,nWidth,nHeight, ;
           oFont,bInit,bSize,bPaint,bGfocus,bLfocus,ctoolt,tcolor,bcolor,nUpDWidth,nLower,nUpper )
Activate()
Init()
Refresh()

6.3.3.17 HTab

DATA
CLASS VAR winclass
aTabs
aPages
bChange,bChange2
oTemp
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight, ;
           oFont,bInit,bSize,bPaint,aTabs,bChange )
Activate()
Init()
SetTab( n )
StartPage( cname )
EndPage()
ChangePage( nPage )
HidePage( nPage )
ShowPage( nPage )
GetActivePage( nFirst,nEnd )
End()

6.3.3.18 HTree

DATA
CLASS VAR winclass
aItems
oSelected
himl,aImages,Image1,Image2
bItemChange, bExpand
lEmpty
METHODS
New( oWndParent,nId,nStyle,nLeft,nTop,nWidth,nHeight,oFont,
           bInit,bSize,color,bcolor,aImages,lResour,lEditLabels )
Activate()
Init()
AddNode( cTitle, oPrev, oNext, bAction, aImages )
FindChild( handle )
GetSelected()
EditLabel( oNode )
Expand( oNode )
Select( oNode )
Clean()

6.5 HColumn

DATA
block,heading,width,type,length,dec,cargo
nJusHead, nJusLin
tcolor,bcolor,brush
lEditable
aList
aBitmaps
bValid,bWhen
bEdit
METHODS
New( cHeading,block,type,length,dec,lEditable,nJusHead,nJusLin )

6.6 HRadioGroup

DATA
CLASS VAR oGroupCurrent
aButtons
value
bSetGet
METHODS
New( vari,bSetGet )
EndGroup( nSelected )
SetValue( nValue )

6.7 HFont

DATA
CLASS VAR aFonts
handle
name, width, height ,weight
charset, italic, Underline, StrikeOut
nCounter
METHODS
Add( fontName, nWidth, nHeight ,fnWeight, fdwCharSet, ;
           fdwItalic, fdwUnderline, fdwStrikeOut, nHandle )
Select()
Release()

6.8 HPen

DATA
CLASS VAR aPens
handle
style, width, color
nCounter
METHODS
Add( style, width, color )
Release()

6.9 HBrush

DATA
CLASS VAR aBrushes
handle
color
nHatch
nCounter
METHODS
Add( color,nHatch )
Release()

6.10 HBitmap

DATA
CLASS VAR aBitmaps
handle
name
nWidth, nHeight
nCounter
METHODS
AddResource( name )
AddFile( name,hDC )
AddWindow( oWnd,lFull )
Release()

6.11 HIcon

DATA
CLASS VAR aIcons
handle
name
nCounter
METHODS
AddResource( name )
AddFile( name,hDC )
Release()

6.12 HPrinter

DATA
hDCPrn
hDC
aMeta
lPreview
cMetaName
METHODS
New( cPrinter )Opening a printer. If 'cPrinter' is omitted, Printer Setup dialog appears; if 'cPrinter' is an empty string, default printer is used.
StartDoc( lPreview,cMetaName )Starts printing of a document. lPreview should be TRUE, if you want to preview the printing result.
EndDoc()End of a document printing.
StartPage()
EndPage()
ReleaseMeta()
PlayMeta( nPage, oWnd, x1, y1, x2, y2 )
PrintMeta( nPage )
Preview( cTitle )Opening of a preview window, this should be used after EndDoc() call.
End()Releasing the printer.
Box( x1,y1,x2,y2,oPen )
Line( x1,y1,x2,y2,oPen )
Say( cString,x1,y1,x2,y2,nOpt,oFont )
Bitmap( x1,y1,x2,y2,nOpt,hBitmap )

6.13 HTreeNode

DATA
CLASS VAR winclass
aItems
handle
oTree, oParent
bAction
cargo
METHODS
New( oTree, oParent, oPrev, oNext, cTitle, bAction,aImages )
AddNode( cTitle, oPrev, oNext, bAction, aImages )
Delete()
FindChild( handle )
GetText()

6.14 HTimer

DATA
CLASS VAR aTimers
id
value
oParent
bAction
METHODS
New( oParent,id,value,bAction )
End()

6.15 HFreeImage

This class is similar to HBitmap, HIcon classes, it allows to load, save and draw an image in BMP, JPEG, PNG and some other formats. It uses FreeImage library (http://freeimage.sourceforge.net>) - so, if you include it in your application, you need to have FreeImage.dll.

DATA
CLASS VAR aImages
handle
hBitmap
name
nWidth, nHeight
nCounter
METHODS
AddFile( name )Load the image from a file
FromBitmap( oBitmap )Create an image from a bitmap
Draw( hDC,nLeft,nTop,nWidth,nHeight )Draw the image on specified device contect
Release()Unload the image
The example of using this class you may find in samples/viewer/viewer.prg.

7 Qhtm integration

7.1 Overview

QHTM is a C++ library, which allows to display and print HTML content in your application - on any window, device context, on a report, on a button or in a tooltip. For more details look at http://www.gipsysoft.com.
HwGUI provides an interface for this library. To use it, you need to download QHTM from the http://www.gipsysoft.com/qhtm/freedownload.shtml and copy qhtm.dll to the same directory, where your application is.
Attention !!! QHTM is released under other license than Harbour and HwGUI, so don't forget to read it before using !

7.2 Commands

@ <x>,<y> QHTM [ <oQhtm> ]
[ CAPTION <caption> ]
[ FILE <fname> ]
[ RESOURCE <resname> ]
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON CLICK <bLink> ]
[ ON SUBMIT <bSubmit> ]
[ STYLE <nStyle> ]

This command creates QHTM control. Html content may be assigned in three ways:

ON CLICK clause determines the codeblock, which will be executed when user clicks on an external link.
ON SUBMIT clause determines the codeblock, which will be executed when user submits form.

REDEFINE QHTM [ <oQhtm> ]
[ CAPTION <caption> ]
[ FILE <fname> ]
[ RESOURCE <resname> ]
[ OF <oWnd> ];
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON CLICK <bLink> ]
[ ON SUBMIT <bSubmit> ]

This command redefines QHTM control from resources. Html content may be assigned in three ways the same three ways as in @ ... QHTM command.

@ <x>,<y> QHTMBUTTON [ <oButton> CAPTION ] <caption>
[ OF <oWnd> ];
[ ID <nId> ]
[ SIZE <width>, <height> ]
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON CLICK <bClick> ]
[ STYLE <nStyle> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]

This command works exactly as @ ... BUTTON, but <caption> may include html content.

REDEFINE QHTMBUTTON <oButton>
[ OF <oWnd> ]
ID <nId>
[ ON INIT <bInit> ]
[ ON SIZE <bSize> ]
[ ON CLICK <bClick> ]
[ FONT <oFont> ]
[ TOOLTIP <ctoolt> ]

This command works exactly as REDEFINE BUTTON, but <caption> may include html content.

7.3 Functions

QHTM_Init( [ cDllName ] )

QHTM_Message( cMessage [,cTitle ] [,nFlags ] )

QHTM_LoadFile( handle, cFileName )

QHTM_LoadRes( handle, cResourceName )

QHTM_AddHtml( handle, cText )

QHTM_GetTitle( handle )

QHTM_GetSize( handle )

QHTM_EnableCooltips()

QHTM_PrintCreateContext() --> hContext

QHTM_PrintSetText( hContext,cHtmlText )

QHTM_PrintSetTextFile( hContext,cFileName )

QHTM_PrintSetTextResource( hContext,cResourceName )

QHTM_PrintLayOut( hDC,hContext ) --> nNumberOfPages

QHTM_PrintPage( hDC,hContext,nPage )

QHTM_PrintDestroyContext( hContext )

8 License

HwGUI is released under the same license, as Harbour itself.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).

As a special exception, you have permission for additional uses of the text contained in its release of HWGUI.

The exception is that, if you link the HWGUI library with other files to produce an executable, this does not by itself cause the resulting executable to be covered by the GNU General Public License. Your use of that executable is in no way restricted on account of linking the HWGUI library code into it.

9 About the author


Hosted by www.Geocities.ws

1