Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 30 JUL 2004 03:04:19PM Brock Prusha wrote:

Hello all!

I tried this awhile back with no luck. But, with the new versions

I thought I'd try again.

I'd like to change the caret on a control, preferably to a block caret that's easier to see with colored backgrounds. Originally, I thought the problem was with the two OINSIGHT and OENGINE processes, where OINSIGHT owned the caret and it could not be changed by the engine under the OENGINE process.

Now that there is only one process, I figured it would work, but it does not. Basically, I get the handle of the control/window or even oinsight itself (it doesn't seem to matter) and call the windows SDK createcaret and showcaret functions from a dll on the control's gotfocus event.

I've tried this on 3.71, 4.0, 4.02, 4.12, and 7.0 with no results.

I've tried creating the caret with a bitmap and without but nothing seems to work.

Has anyone tried this or know how to do it? I'd really appreciate any pointers/help.

Thanks a bundle.

Brock Prusha

bprusha@mapcon.com


At 30 JUL 2004 07:50PM Steve Smith wrote:

I doubt that a text control (with focus) will process a gotfocus or lostfocus event on changing between applications. So to run OI's cursor different to other apps or Windows' default may not work too well.

Another problem is that you shouldn't process DestroyCaret during a lostfocus event - as the lostfocus event in OI can sometimes be processed after another non-OI application has gained focus - and this OI DestroyCaret operation would influence the caret in the non-OI application.

The WM_killfocus message should be the location of the DestroyCaret call, so you need to run a subclasser for the OI Window.

Another problem relates to Windows assuming that the caret is a solid vertical line, so changing its width may mean it doesn't align as expected - or that other graphics are displaced by the new caret width.

Can of worms!

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b29aab6b8e65cd9b85256ee10068c43a.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1