Hi,
Using Harbour 3.0 +MingW on XP/Win8.1
I am porting a xHarbour application to Harbour. My users make extensive use of cut/copy/paste feature in gets (which is the default behavior in xHarbour). To give similar functionality, I copied the tgetlist.prg over to the source folder, and made the following modifications in it.
#ifdef HB_EXT_INKEY
case K_CTRL_C
oGet:Assign()
hb_gtInfo( GTI_CLIPBOARDDATA, CStr( oGet:VarGet() ) )
exit
case K_CTRL_X
oGet:Assign()
hb_gtInfo( GTI_CLIPBOARDDATA, CStr( oGet:VarGet() ) )
oGet:DelEnd()
exit
case K_CTRL_V
cToPaste := hb_gtInfo( GTI_CLIPBOARDDATA )
nLen := len( cToPaste )
for nI := 1 to nLen
oGet:Insert( cToPaste[ nI ] )
next nI
exit
#endif
In my .hbp file I have /d HB_EXT_INKEY, but when executing the program none of the above cases are triggered. The inkey() value returns 3 (Ctrl-C) whereas it should return 515 (Ctrl-C), see definition in xhbinkey.ch
I have tried including xHbInkey.ch as also defining the Keys with #define directive in tgetlist.prg but no change.
Will I have to compile the HB30 sources again with some flag to enable this feature ?
Kindly help.
Warm regards,
Jayadev
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi José,
Many thanks for your prompt reply. I shall test and see.
Warm regards,
Jayadev
From: harbou...@googlegroups.com [mailto:harbou...@googlegroups.com] On Behalf Of José Quintas
Sent: Sunday, March 2, 2014 1:34 AM
To: harbou...@googlegroups.com
Subject: Re: [harbour-users] Cut/Copy/Paste feature in Get
I like the idea to copy to clipboard the get, better than nothing.
Hi José,
Your codes works perfectly. I have made the following modification to add Cut feature (ctrl-x). It may be of use to you.
CASE K_CTRL_X
nBits := hb_gtInfo( HB_GTI_KBDSHIFTS )
lIsKeyCtrl := ( nBits == hb_BitOr( nBits, HB_GTI_KBD_CTRL ) )
IF lIsKeyCtrl
IF GetActive() != NIL
hb_gtInfo( HB_GTI_CLIPBOARDDATA, Transform( GetActive():VarGet(), "" ) )
GetActive():DelEnd()
RETURN 0
ENDIF
ENDIF
Thanks for helping me.
Warm regards,
Jayadev
From: harbou...@googlegroups.com [mailto:harbou...@googlegroups.com] On Behalf Of José Quintas
Sent: Sunday, March 2, 2014 1:34 AM
To: harbou...@googlegroups.com
Subject: Re: [harbour-users] Cut/Copy/Paste feature in Get
I like the idea to copy to clipboard the get, better than nothing.
--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com
Web: http://groups.google.com/group/harbour-users
--- You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.