Text Entry Cursor stops blinking

Discussions related to the Program Source Code Editor
User avatar
JackKelly
Posts: 63
Joined: Fri Apr 06, 2018 2:38 am
Location: Rome NY, USA

Re: Text Entry Cursor stops blinking

Post by JackKelly »

Thanks for checking your machines, guys. I appreciate your help and input.
User avatar
JackKelly
Posts: 63
Joined: Fri Apr 06, 2018 2:38 am
Location: Rome NY, USA

Re: Text Entry Cursor stops blinking

Post by JackKelly »

One more, hopefully last, question. What API call is used to invoke the text editor control? What DLL, what parameters?
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: Text Entry Cursor stops blinking

Post by guest »

JackKelly wrote: Sat Apr 06, 2019 6:12 pmWhat API call is used to invoke the text editor control? What DLL, what parameters?
The LBB Texteditor is a superclassed, multiline, Windows Edit Control. I don't know which DLL it is in, does it matter? I'm not too sure what you mean by "parameters", but these are the stylebits if that is helpful: 0x47111C4:

4000000: WS_CLIPSIBLINGS
0400000: WS_DLGFRAME
0200000: WS_VSCROLL
0100000: WS_HSCROLL
0010000: WS_TABSTOP
0001000: ES_WANTRETURN
0000100: ES_NOHIDESEL
0000080: ES_AUTOHSCROLL
0000040: ES_AUTOVSCROLL
0000004: ES_MULTILINE
User avatar
Aurel
Posts: 3
Joined: Sun Apr 21, 2019 2:58 pm

Re: Text Entry Cursor stops blinking

Post by Aurel »

Jack
Edit control is part of standard windows controls and as such belongs into group of
common controls .
comctl32 = LoadLibrary "comctl32.dll"

if your cursor stop blinking that means that something is wrong with edit control attributes or style
or something is wrong with your windows.
User avatar
JackKelly
Posts: 63
Joined: Fri Apr 06, 2018 2:38 am
Location: Rome NY, USA

Re: Text Entry Cursor stops blinking

Post by JackKelly »

Thank you, Aurel, for this additional information regarding the 'cursor stops blinking' issue. It happens on every Windows 10 PC, so this rules out a problem with my particular machine. So, then, how does one find the 'something' that is wrong with the edit control attributes or style? I'm sure you can see this anomaly on your Windows 10 PC.

Thanks again,
Jack
User avatar
Aurel
Posts: 3
Joined: Sun Apr 21, 2019 2:58 pm

Re: Text Entry Cursor stops blinking

Post by Aurel »

I have windows 10 on my son computer who use it for games so i must test it.
On my programming computer i use windows 7
and i don't paid to much attention on caret blinking or not .
Most of tim i use scintilla or richedit control but not edit control
(just in some programs ) in another compiler ..
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: Text Entry Cursor stops blinking

Post by guest »

JackKelly wrote: Wed Apr 24, 2019 11:32 pm It happens on every Windows 10 PC, so this rules out a problem with my particular machine. So, then, how does one find the 'something' that is wrong with the edit control attributes or style?
It's more fundamental than that. The problem doesn't just affect Edit Controls: I've noticed that in BBC BASIC for Windows, which uses a custom editor coded in C rather than a standard Windows control, the caret also stops blinking after a while. This implies that it's the standard default caret functionality in DefWindowProc that is misbehaving.

One possibility is that the (undocumented) WM_SYSTIMER messages are not being delivered consistently; if you have a Windows 10 machine on which Spy++ is installed (unfortunately I don't) it would be very interesting to know if those messages stop being delivered to the window when the blinking ceases. If so it would pinpoint the cause in more detail than I've seen elsewhere.

This appears to be a widespread problem that was introduced at a Windows 10 Update, but I've seen no official acknowledgement of it from Microsoft.
User avatar
JackKelly
Posts: 63
Joined: Fri Apr 06, 2018 2:38 am
Location: Rome NY, USA

Re: Text Entry Cursor stops blinking

Post by JackKelly »

Excellent clarification, Richard. Maybe soon we will have a clear case to take to Microsoft.
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: Text Entry Cursor stops blinking

Post by guest »

I eventually found the solution here. It turns out that it's controlled by a registry setting: HKEY_CURRENT_USER\Control Panel\Desktop\CaretTimeout. By default this is set to 5000 (0x1388), which means the caret stops blinking after 5 seconds. If you want it to continue blinking indefinitely you can set it to a very large value, I chose 0x7FFFFFFF. Rebooting is necessary for the change to take effect.

So the behavior is evidently quite deliberate, but as far as I can see undocumented.
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: Text Entry Cursor stops blinking

Post by guest »

guest wrote: Wed Feb 12, 2020 3:32 amIt turns out that it's controlled by a registry setting: HKEY_CURRENT_USER\Control Panel\Desktop\CaretTimeout.
It would of course be quite easy to write a LB/LBB program to make the necessary change to the Registry, to avoid having to do it manually.