Hi Mike,
> If you didn’t want to include the whole
hbgtinfo.ch file, you can use
> only the #defines that you need or you can use the value/number (not
> easily understandable).
>
> HB_GtInfo( < the value/number >, [ <xParam1> ], [ <xParam2> ] ) ⇒ <xResult>
> or
> HB_GtInfo( < the phrase as #defined >, [ <xParam1> ], [ <xParam2> ] )
> ⇒<xResult>
>
> Value/number|Input|Output|...
>
> In GTWIN: Always CERO/zero or NIL
>
> HB_GTI_CLIPBOARDDATA
> Sets/fills the clipboard
> hb_gtInfo(HB_GTI_CLIPBOARDDATA,xxxxx) or
> hb_gtInfo(15,xxxxx)
>
> Gets/retrieves the clipboard
> xStuff = hb_gtInfo(HB_GTI_CLIPBOARDDATA) or
> hb_gtInfo(15)
>
> nHowLongIsIt = LEN(( hb_gtInfo(HB_GTI_CLIPBOARDDATA)) 5
>
> HB_GTI_CLIPBOARDPASTE
> xGetTheStuff = hb_gtInfo(HB_GTI_CLIPBOARDPASTE ) or
> hb_gtInfo(16)
NO, NO, NO! Please NEVER suggest using the numeric values from any
header file. After having been involved in Clipper/Harbour support for
almost 35 years I know that the most inexperienced users will follow
that advice and get themselves into trouble.
It is a BAD programming practice and makes the code hard to read. If
someone else takes over your project after you, or you yourself try to
understand that old code five years from now - or five weeks from now -
it vill be a lot harder to debug than if you use the named constants.
And it is also more error prone. If you mistype a constant name you will
get an error at compile time (provided that you set the warning level
appropriately, or you will otherwise get a clear rutime error). But if
you mistype the numerical code the application will happily do what you
tell it, and then you will wonder why it is misbehaving.
So always use the named constants. And there is no reason whatsoever to
pull them out of the header files and duplicate them in every prg file
where you perform a certain operation.
Regards,
Klas