I need 1 function written which gets the line of text where the caret is located. For example if I have notepad open and the caret is located on line 2, it should give me the line of text at line 2. It should also give me the index of the caret. For example if the line says "hello how are you?" and the caret is at the beginning of "how", the index is 6 (index starts at 0). The function must work in MS Word, Notepad, IE 7 atleast. If you can get it working in notepad, all the other apps which have regular text boxes should start working automatically (for example, the address bar in IE). MS Word is the only special case. If you can get it to work in Powerpoint, Excel etc i'll give you a bonus.
Making it work in a regular textbox is possible through the win api messages EM_LINEFROMCHAR EM_LINEINDEX etc. Here's a link
<[url removed, login to view]>
Making it work in word is a bit more tricky. You have to use [url removed, login to view] or something along those lines.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
MS Word 2003, Notepad, IE7, Windows XP/Vista, VC++6 (I'll accept VC++2005 as well but your code should compile in VC++6)