Académique Documents
Professionnel Documents
Culture Documents
software
HwGUI 2.21 reference manual
Alexander S.Kresin, October 2018 next
• 1. Introduction
o 1.1. What is HwGUI
o 1.2. History of HwGUI
o 1.3. How to learn HwGUI
• 2. Installation of HwGUI
o 2.1. HwGUI package
o 2.2. How to build HwGUI library (Windows version)
o 2.3. How to build HwGUI library (GTK version)
o 2.4. How to build HwGUI application
• 3. How to use HwGUI
o 3.1. Terminology
o 3.2. Classes, commands and functions
o 3.3. First HwGUI application
o 3.4. Windows in HwGUI. Modal and nomodal.
o 3.5. Controls review.
o 3.6. General information about commands.
o 3.7. General information about classes.
o 3.8. GET-system
o 3.9. Inside HwGUI
o 3.10. Using the UNICODE
• 4. Commands
o 4.1. Commands for windows and dialogs handling
o 4.2. Menu commands
o 4.3. Commands for controls handling
o 4.4. Get system commands
o 4.5. Print commands
• 5. Functions
o 5.1. Common dialogs
o 5.2. MessageBoxes and HwGUI dialogs
o 5.3. Drawing functions.
o 5.4. Windows handling functions.
o 5.5. Controls handling functions.
o 5.6. Menu functions.
o 5.7. Windows registry.
o 5.8. Miscellaneous functions.
o 5.A. Functions, not included in documentation
• 6. Classes
o 6.1. Class hierarchy
• 7. Utilities
o 7.1. Designer
o 7.2. Tutorial
o 7.3. Visual debugger
o 7.4. Editor
o 7.5. Dbc
o 7.6. Binary container manager
• 8. Contrib
o 8.1. ActiveX
o 8.2. QHTM
▪ 8.2.1. Overview
▪ 8.2.2. Commands
▪ 8.2.3. Functions
• 9. License
• 10. About the author
1. Introduction
2. Installation of HwGUI
Changelog
*.hbp,*.hbc - build files for Hbmk
make_b32.bat - command files to build HwGUI
libraries, using Borland C
makefile.bc
make_vc.bat - command files to build HwGUI
libraries, using MSVC
makefile.vc
make_pc.bat - command files to build HwGUI
libraries, using Pelles C
makefile.pc
make_w32.bat - command files to build HwGUI
libraries, using Open Watcom C
makefile.wc
makemngw.bat - command files to build HwGUI
libraries, using Mingw
makefile.gcc
makedll.bat - command files to build HwGUI
dll, using Borland C
makedll.bc
license.txt
install.txt - installation notes
whatsnew.txt
contrib\ - a directory with
contribution modules, which for
various reasons were not
included in the basic sources set
SET HB_PATH=c:\harbour
Then run one of command files depending of the C compiler you use (
make_b32.bat for Borland C, make_pc.bat for Pelles C, make_vc.bat for
MSVC, make_w32.bat for Open Watcom C, makemngw.bat for Mingw ) - this
will build four libraries - hwgui.lib, procmisc.lib, hwg_qhtm.lib and
hbxml.lib. That's all !
export HB_ROOT=../../..
Now you can run the build.sh and the ready libraries must appear
in hwgui/lib/ directory.
For those, who don't use Hbmk, there are command files in
samples\ directory for different C compilers. You may use them to
build sample programs from samples\ or as a templates to build your
programs.
For GTK version you may use Hbmk or samples/gtk_samples/build.sh
bash script - probably, you will need to set the HB_ROOT environment
variable, as described in a subsection 2.3. How to build HwGUI library (GTK
version).
#include "hwgui.ch"
Function Main
Local oMainWnd, oFont
Local aCombo := {"First","Second" }
MENU OF oMainWnd
MENUITEM "About" ACTION hwg_MsgInfo("First HwGUI
Application")
ENDMENU
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.
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.
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.
MENU OF oMainWnd
MENUITEM "About" ACTION hwg_MsgInfo("First HwGUI
Application")
ENDMENU
These commands creates the main menu, which includes the only
item "About".
You can see that it is added to the file not immediately after
the appearance of the window, but only after it is closed. These
explanations may seem trivial for you, but many programmers just
starting to write GUI applications, have some difficulties with this
behaviour.
3.8. GET-system
Email address:
Refresh
Input text from an image:
Send Cancel
Reply
Site map
© Copyright 2016. All Rights Reserved.
<div><img src="https://mc.yandex.ru/watch/37824975"
style="position:absolute; left:-9999px;" alt="" /></div>