TAdvMemo problem


I have a TAdvMemo control that highlights some keywords.
I would like to change the mouse cursor to crHandPointer whenever I hover any of the highlighted keywords.

Is this possible?
I tried the following code but it doesn't work.


void __fastcall TForm1::MemoMouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
int x,y;
UnicodeString word;
TFullPos pos = Memo->CharFromPos(X, Y);
Memo->PosFromText(pos.Pos, x, y);
word = Memo->WordAtXY(x,y);
Label->Caption = word;

if(SQLMemoStyler->AllStyles->Items[3]->KeyWords->IndexOf(word) >= 0)
Cursor = crHandPoint;

TAdvMemo internally handles the cursor and will override the setting you do in OnMouseMove. We'd have to extend the component to make this possible.