AutoHotkey Community

It is currently May 27th, 2012, 6:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: November 30th, 2010, 11:32 am 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
Is there anyway to change the style of text caret?

I know there are couple of posts about changing mouse cursor but nothing on changing text caret. I doubt if it is possible.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2010, 11:41 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Yeah, I suppose it's not possible.
http://social.msdn.microsoft.com/Forums ... ffbe73e6b4

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2010, 1:49 pm 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
I tried CreateCaret and ShowCaret API with the following code, but with no luck. Both API returns 0 which means unsuccessful.
Code:
F9::
   hwnd := WinExist("A")
   ret1 := DllCall("CreateCaret", UInt, hwnd, UInt, 1, Int, 5, Int, 5)
   ret2 := DllCall("ShowCaret", UInt, hwnd)
   msgbox, CreateCaret Return: %ret1%`nShowCaret Return: %ret2%
   return

MasterFocus, I guess the link you provided explains the reason.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2010, 2:03 pm 
Offline

Joined: April 19th, 2007, 8:05 am
Posts: 48
Tried with the same code with a window created by the script. It works.
So it's safe to say now that you don't have access to the caret of an external window doesn't belong to you.

Code:
Gui, Add, Edit
Gui, Show

hwnd := WinExist("A")
DllCall("CreateCaret", UInt, hwnd, UInt, 0, Int, 25, Int, 25)
DllCall("ShowCaret", UInt, hwnd)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], hd0202, HotkeyStick and 52 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group