[sword-devel] Character under cursor for BibleCS
Christian Renz
sword-devel@crosswire.org
Mon, 11 Nov 2002 16:48:35 +0100
Hi list,
if I remember correctly, there was some trouble to find out what
character is under the mouse cursor, and therefore moving the
text cursor to the current mouse cursor's position was introduced.
While checking out the perl module Win32::GUI, I stumbled upon the
message EM_CHARFROMPOS, which seems to solve that problem. Given
(x,y)-coordinates, it returns a zero-based character index to the
character that is at that position. Google found more information at
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/editcontrols/editcontrolreference/editcontrolmessages/em_charfrompos.asp
Hope this helps!
Greetings,
Christian
--
crenz@web42.com - http://www.web42.com/crenz/ - http://www.web42.com/
"(Jesus Christ) produced mainly three effects -- Hatred -- Terror --
Adoration. There was no trace of people expressing mild approval."
-- C.S. Lewis, God in the Dock