Hi Everyone:
I'm using DDT to write a small editor with basic spell-checking functions, and have successfully put a status line at the bottom of the screen which spell-checks each line in the editbox and displays misspelled words as the user cursors through it. What I'd like to do now is when the user highlightes a misspelled word in the document with the right or left arrows, have suggestions appear at the bottom of the screen of acceptable words. This magical snipit of code gives me the current line number:
CONTROL SEND hWnd&, 101, %EM_LINEFROMCHAR, -1, %NULL TO CurrentLine
but I can't seem to get the current position on the current line. I thought for sure that %EM_POSFROMCHAR would give me the X position on the line, but it doesn't. Any ideas?
One other thing. I would really like to add a feature where I can tell my editor to go to a specific line number like some really nice DOS editors used to have, but I don't know how to reposition the curser at the new line number. Another %EM_* Message?
Thank you! I've spent a morning pouring over %EM_* messages, faithfully trying each and every one. I've gotten some of the strangest numbers ever, but I can't make sence out of any of them at all.
[This message has been edited by Danny Faris (edited September 08, 2000).]
I'm using DDT to write a small editor with basic spell-checking functions, and have successfully put a status line at the bottom of the screen which spell-checks each line in the editbox and displays misspelled words as the user cursors through it. What I'd like to do now is when the user highlightes a misspelled word in the document with the right or left arrows, have suggestions appear at the bottom of the screen of acceptable words. This magical snipit of code gives me the current line number:
CONTROL SEND hWnd&, 101, %EM_LINEFROMCHAR, -1, %NULL TO CurrentLine
but I can't seem to get the current position on the current line. I thought for sure that %EM_POSFROMCHAR would give me the X position on the line, but it doesn't. Any ideas?
One other thing. I would really like to add a feature where I can tell my editor to go to a specific line number like some really nice DOS editors used to have, but I don't know how to reposition the curser at the new line number. Another %EM_* Message?
Thank you! I've spent a morning pouring over %EM_* messages, faithfully trying each and every one. I've gotten some of the strangest numbers ever, but I can't make sence out of any of them at all.
[This message has been edited by Danny Faris (edited September 08, 2000).]
Comment