CiaranMcCormack
Programmer
Hi.
Is there any way to get the current word which is being typed from a rich edit. The only way that I can see to "get" words is to use the Function
SendMessage( hwndEdit, EM_GETSELTEXT, 0, lpszBuffer );
but in-order for this to work, you first need to select the word/text with the mouse. I dont want to have to select it, but for it to work automatically on the current word being typed.
I have been looking through other messages, and found one which makes me think that it is possible. In the EM_SETCHARFORMAT message one of the options is SCF_WORD | SCF_SELECTION which is described as Applies the formatting to the selected word or words. If the selection is empty but the insertion point is inside a word, the formatting is applied to the word. Given that this can modify the current word without it being selected, it leads me to belive that it is possible to retrieve this word somehow.
Thanks
Ciaran
Is there any way to get the current word which is being typed from a rich edit. The only way that I can see to "get" words is to use the Function
SendMessage( hwndEdit, EM_GETSELTEXT, 0, lpszBuffer );
but in-order for this to work, you first need to select the word/text with the mouse. I dont want to have to select it, but for it to work automatically on the current word being typed.
I have been looking through other messages, and found one which makes me think that it is possible. In the EM_SETCHARFORMAT message one of the options is SCF_WORD | SCF_SELECTION which is described as Applies the formatting to the selected word or words. If the selection is empty but the insertion point is inside a word, the formatting is applied to the word. Given that this can modify the current word without it being selected, it leads me to belive that it is possible to retrieve this word somehow.
Thanks
Ciaran