Insert/Overstrike Cursors in GETS
- PatrickWeisser
- Posts: 53
- Joined: Fri Mar 23, 2007 4:10 am
- Location: Seattle, WA, USA
- Contact:
Insert/Overstrike Cursors in GETS
Our customers are used to seeing the thin vertical cursor (|) for both insert and overstrike mode (this is the behavior in Word, Quickbooks, and even the very text box I'm typing in right now on this forum). Does anyone know if there a way to either have the thin (|) cursor always appear in a GET, or at least reverse them and have the | cursor be for insert mode and the wider cursor for overstrike?
Thanks!
Thanks!
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Patrick,
In Class TGet comment out this code:
and
In Class TGet comment out this code:
Code: Select all
DestroyCaret()
if Set( _SET_INSERT )
CreateCaret( ::hWnd, 0, 6, ::nGetChrHeight() )
else
CreateCaret( ::hWnd, 0, 2, ::nGetChrHeight() )
endif
ShowCaret( ::hWnd )
Code: Select all
DestroyCaret()
CreateCaret( ::hWnd, 0, 6, ::nGetChrHeight() )
ShowCaret( ::hWnd )
- PatrickWeisser
- Posts: 53
- Joined: Fri Mar 23, 2007 4:10 am
- Location: Seattle, WA, USA
- Contact:
Thanks Antonio, that worked perfectly. I actually used:
CreateCaret( ::hWnd, 0, 2, ::nGetChrHeight() )
...to get the smaller vertical bar cursor. I also made a change to the KeyChar() method in TGet.prg so that the GET text control will stop accepting characters in insert mode when the control is full, instead of having existing characters "fall off" on the right. This is more in keeping with the behavior of our current application I am porting. For consistency, I also changed the WM_PASTE case in HandleEvent() so that only as many characters as there is space remaining for in the control will be pasted, again preventing existing text in the control from being truncated on the right if the paste string is too big.
I think it's wonderful that you have opened up many of the FiveWin classes to user inspection and customization. For me personally they are a great learning tool since I have not done much object oriented programming as of yet. And having some of the FiveWin source code also gives us a glimpse at how very well designed and elegant FiveWin is internally.
-Patrick
CreateCaret( ::hWnd, 0, 2, ::nGetChrHeight() )
...to get the smaller vertical bar cursor. I also made a change to the KeyChar() method in TGet.prg so that the GET text control will stop accepting characters in insert mode when the control is full, instead of having existing characters "fall off" on the right. This is more in keeping with the behavior of our current application I am porting. For consistency, I also changed the WM_PASTE case in HandleEvent() so that only as many characters as there is space remaining for in the control will be pasted, again preventing existing text in the control from being truncated on the right if the paste string is too big.
I think it's wonderful that you have opened up many of the FiveWin classes to user inspection and customization. For me personally they are a great learning tool since I have not done much object oriented programming as of yet. And having some of the FiveWin source code also gives us a glimpse at how very well designed and elegant FiveWin is internally.
-Patrick
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Patrick,
>For me personally they are a great learning tool since I have not done much object oriented programming as of yet.
Have you read the articles about programming with OOP and Fivewin on my website? They may help.
http://ourworld.compuserve.com/homepage ... rogram.htm
Regards,
James
>For me personally they are a great learning tool since I have not done much object oriented programming as of yet.
Have you read the articles about programming with OOP and Fivewin on my website? They may help.
http://ourworld.compuserve.com/homepage ... rogram.htm
Regards,
James
-
- Posts: 4
- Joined: Sat May 12, 2007 4:32 am
- Location: Kuala Lumpur, Malaysia
Do you have to recompile fivewin libaries
Hi Antonio Linares,
I have marked out the lines you mentioned in "/SOURCE/CLASSES/TGET.PRG"
Following which I recompiled a test app with a get object.
The change in "TGET.PRG" does not take place. The get object still changes to a thick line as before making the change.
What am I not doing ? Do you have to recompile fivewin libraries ? If so, can you tell me how?
Thank you.(hope if its not too much trouble.!)
I have marked out the lines you mentioned in "/SOURCE/CLASSES/TGET.PRG"
Following which I recompiled a test app with a get object.
The change in "TGET.PRG" does not take place. The get object still changes to a thick line as before making the change.
What am I not doing ? Do you have to recompile fivewin libraries ? If so, can you tell me how?
Thank you.(hope if its not too much trouble.!)
D.Charles
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 4
- Joined: Sat May 12, 2007 4:32 am
- Location: Kuala Lumpur, Malaysia
It works!
Hi Antonio,
Thanks for the reply. It works!.
It comes to me now that this is the same way things were done in clipper 5.2. Sorry but I am a bit rusty in clipper programming. I an including two working BAT scripts to convert the TGET.PRG into an OBJ. Could you just comment if its OK by you.
FILENAME: C.BAT
-------------------------------------------------------
ECHO Compiling from .PRG to .C
set hdir=\zz\xh
set fwhdir=\zz\fwxh
set bcdir=\zz\bcc55
%hdir%\bin\harbour /n /w /p /oOBJ\ /i%fwhdir%\include;%hdir%\include;%bcdir%\include %1 %2 %3 > clip.log
@TYPE clip.log
FILENAME: L.BAT
-------------------------------------------------------
@ECHO OFF
ECHO Compiling...From .C TO .OBJ
SET hdir=\zz\xh
SET fwh=\zz\fwxh
SET bcdir=\zz\bcc55
ECHO -oOBJ\%1 -I%fwh%\include;%hdir%\include;%bcdir%\include -L%fwh%\lib;%hdir%\lib;%bcdir%\lib OBJ\%1.c > l.bc
%bcdir%\bin\bcc32 -M -c -v @l.bc
Thanks a lot.
Thanks for the reply. It works!.
It comes to me now that this is the same way things were done in clipper 5.2. Sorry but I am a bit rusty in clipper programming. I an including two working BAT scripts to convert the TGET.PRG into an OBJ. Could you just comment if its OK by you.
FILENAME: C.BAT
-------------------------------------------------------
ECHO Compiling from .PRG to .C
set hdir=\zz\xh
set fwhdir=\zz\fwxh
set bcdir=\zz\bcc55
%hdir%\bin\harbour /n /w /p /oOBJ\ /i%fwhdir%\include;%hdir%\include;%bcdir%\include %1 %2 %3 > clip.log
@TYPE clip.log
FILENAME: L.BAT
-------------------------------------------------------
@ECHO OFF
ECHO Compiling...From .C TO .OBJ
SET hdir=\zz\xh
SET fwh=\zz\fwxh
SET bcdir=\zz\bcc55
ECHO -oOBJ\%1 -I%fwh%\include;%hdir%\include;%bcdir%\include -L%fwh%\lib;%hdir%\lib;%bcdir%\lib OBJ\%1.c > l.bc
%bcdir%\bin\bcc32 -M -c -v @l.bc
Thanks a lot.
D.Charles
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: