hb_setListenerRemove()

hb_setListenerRemove()

Syntax

      C Prototype

      #include "hbset.h"
      hb_setListenerRemove( int handle ) --> int

Arguments

<handle> : The handle for the SET listener callback function to be removed.

Returns

The handle if the callback function could not be located or the negative value of the handle if the callback function was removed.

Description

This function removes a SET listener callback function.

Examples

      int handle = hb_setListenerAdd( callback_function );
      ...
      hb_setListenerRemove( handle );

Compliance

NA

Files

Library is core

Platforms

All

Seealso

hb_setListenerAdd()

hb_setListenerNotify()

hb_setListenerNotify()

Syntax

      C Prototype

      #include "hbset.h"
      hb_setListenerNotify( HB_set_enum set,  HB_set_listener_enum
      when ) --> int

Arguments

<set> : The number of the SET parameter that is to be or was changed.

<when> : Set to HB_SET_LISTENER_BEFORE when called before the SET parameter is to be changed and set to HB_SET_LISTENER_AFTER when called after the SET parameter has been changed.

Returns

<int>

Description

This function notifies all SET listener callback functions. It must be called any time you change the value of a SET parameter directly instead of using the Harbour SET function. Both before and after the change.

Examples

      hb_setListenerNotify( HB_SET_DECIMALS,  HB_SET_LISTENER_BEFORE );
      hb_set.HB_SET_DECIMALS = 3;
      hb_setListenerNotify( HB_SET_DECIMALS,  HB_SET_LISTENER_AFTER );

Compliance

NA

Files

Library is core

Platforms

All

Seealso

hb_setListenerAdd()

hb_setListenerAdd()

hb_setListenerAdd()

Syntax

      C Prototype

      #include "hbset.h"
      hb_setListenerAdd( PHB_SET_LISTENER_CALLBACK callback ) --> int

Arguments

<callback> : A pointer to a function taking two enum parameters and returning no value. The first parameter identifies the SET parameter that is to be changed and the second parameter identifies whether the call is from before or after the value is changed. The callback function will be called twice whenever a SET parameter is changed using the Harbour SET function. The first call takes place before the SET value is changed and the second one is after the SET parameter has been changed.

Returns

An integer value representing the callback handle, in case the caller needs to deactivate the callback function.

Description

This function allows a subsystem that needs to track the status of some SET parameters to be notified whenever a SET parameter gets changed.

Examples

      void callback_function( HB_set_enum set,  HB_set_listener_enum when )
      {
         printf("\nCalled for SET parameter %d %s changing.", 
            set,  (when ? "after" : "before"));
      }
      int handle = hb_setListenerAdd( callback_function );

Compliance

NA

Files

Library is core

Platforms

All

Seealso

hb_setListenerRemove()

How I can make an .exe ?

Making .exe (executable) means building application. So you may find answer of this question here.

Anyway I will work to re-describe the process by a simpler way:

Almost every HMG sample have two .bat file: build.bat and ide.bat and using these files are quite simple:

Open command / console window, go to directory ( by CD command) of the sample you want to compile, and enter a simple command :

build demo <- will build demo.exe from demo.prg
or
ide demo <- open HMG-IDE with demo.prg

( IDE will wait your “run” command by pressing “run” button.)

So you may use this two .bat files for your projects too.

Copy build.bat and / or ide.bat to your working <dir>, and modify them this way:

build.bat :

call c:\hmg\build.bat <myProject> | <myProgram>

ide.bat :

c:\hmg\ide\ide.exe <myProject> | <myProgram>

Note : in this syntax “|” means “or”; you don’t need enter both project and program file names nor this sign; simply enter either one or other.

Change:

– “c:\hmg\” depending on your environment (installation); such as c:\hmg.3.1.1\ or antything else;

– <myProject> | <myProgram> to your project / program file name.

Project file is a text file with “.hbp” extension and contains a list of name(s) of your program file(s).

After building such .hbp file, you may open it from directly HMG-IDE ( by “open project command) and again, you may build your .exe by  pressing “run” button.

Clipper 5.x RG Summary

About This Summary

Functions

Commands

Classes

Statements

Operators

Tables

Terms

         Categories: 

Variable Handling

Data Manipulation

Flow Control

User Interface

General

Basics

Global Settings

Advanced

GET System

Menu System

TBrowse Classes

Environment

Database Commands and Statements

Database Functions

RDD Functions

Index Commands and Functions

File Management

Printing

Networking

Pre-processor Directives

Debugging and Error Handling

C5 Environment Commands and Functions

Commands :

SET BELL :

Toggle automatic sounding of the bell during full-screen operations

SET BELL on | OFF | <xlToggle>

SET COLOR :

Define screen colors

SET COLOR | COLOUR TO [ [<standard>]
    [, <enhanced>] [, <border>] [, <background> ]
    [, <unselected>]] | ( <cColorString> )

SET DEFAULT :

Set the default drive and directory

SET DEFAULT TO [ <xcPathspec> ]

SET FUNCTION :

Assign a character string to a function key

SET FUNCTION <nFunctionKey> TO <cString>

SET TYPEAHEAD :

Set the size of the keyboard buffer

SET TYPEAHEAD TO <nKeyboardSize>

Functions :

CURDIR() :

Return the current DOS directory

CURDIR( [ <cDrivespec> ] ) --> cDirectory

DISKSPACE() :

Return the space available on a specified disk

DISKSPACE( [ <nDrive> ] ) --> nBytes

FKLABEL()* :

Return function key name

FKLABEL( <nFunctionKey> ) --> cKeyLabel

FKMAX()* :

Return number of function keys as a constant

FKMAX() --> nFunctionKeys

GETENV() :

Retrieve the contents of a DOS environment variable

GETENV( <cEnvironmentVariable> ) --> cString

ISCOLOR() :

Determine if the current computer has color compatibility

ISCOLOR() | ISCOLOUR() --> lBoolean

MAXROW() :

Determine the maximum visible screen row

MAXROW() --> nRow

MAXCOL() :

Determine the maximum visible screen column

MAXCOL() --> nColumn

MEMORY() :

Determine the amount of available free pool memory

MEMORY( <nMemoryType> ) --> nKbytes

NOSNOW() :

Toggle snow position

NOSNOW( <lToggle> ) --> NIL

OS() :

Return the operating system name

OS() --> cOSName

SET() :

Inspect or change a global setting

SET( <nSpecifier>, [<expNewSetting>], [<lOpenMode> ] )
      --> CurrentSetting

TONE() :

Sound a speaker tone for a specified frequency and duration

TONE( <nFrequency>, <nDuration> ) --> NIL

VERSION() :

Returns Clipper Compiler version

VERSION() --> cVersion

Environment Variables

/*

GETENV() is an environment function that retrieve information
from the DOS environment into an application program.

Typically, this is configuration information, including path names,
that gives the location of files (database, index, label, or reports).

*/

PROCEDURE Main()
 ? " Computer Name:", GETENV( "COMPUTERNAME" )
 ? " Home Drive :", GETENV( "HOMEDRIVE" ) 
 ? " Home Path :", GETENV( "HOMEPATH" ) 
 ? " LogOn Server :", GETENV( "LOGONSERVER" ) 
 ? " Number of Processors :", GETENV( "NUMBER_OF_PROCESSORS" ) 
 ? " Processor Architecture :", GETENV( "PROCESSOR_ARCHITECTURE" ) 
 ? " Processor Identifier :", GETENV( "PROCESSOR_IDENTIFIER" )
 ? " Processor Level :", GETENV( "PROCESSOR_LEVEL" )
 ? " Processor Revision :", GETENV( "PROCESSOR_REVISION" )
 ? " OS :", GETENV( "OS" )
 ? " Session Name :", GETENV( "SESSIONNAME" ) 
 ? " User Domain :", GETENV( "USERDOMAIN" ) 
 ? " User Name :", GETENV( "USERNAME" )
 ? " User Profile :", GETENV( "USERPROFILE" )
 ? " Command Specification:", GETENV( "COMSPEC")
 ? " TEMP Folder :", GETENV( "TEMP" )
 ? " TMP Folder :", GETENV( "TMP" )
 ? " WINDOWS Folder :", GETENV( "WINDIR" )
 ? " Program Files Folder :", GETENV( "PROGRAMFILES" ) 
 ? " Prog. files extentions :", GETENV( "PATHEXT" )
 ? " Default Path :", GETENV( "PATH" )
 ?
RETURN // Main()