hi
i want to retrieve the closest word when i right click in a richedit box (without using selection).
I've make SetWindowLong on richedit for right click :OK.
but i've some problem to retrieve char from pos :
i think i must use EM_CHARFROMPOS for first char pos and EM_FINDWORDBREAK for delimiting previous and next break of the whole word (WB_MOVEWORDLEFT and WB_MOVEWORDRIGHT).
but:
invoke SendMessageA, hRichEdit, EM_CHARFROMPOS, 0, MyCursorPos
crash all.
MyCursoPos is a dword with x in low-order word and y in high-order word.
hmm is this ?
XXXXYYYYh (a dword with xxxx for low-order word and yyyy for high-order word, right?)
if someone have some tricks or code source :):)