int FoundAt, StartPos, ToEnd;
StartPos=0;
ToEnd = RichEdit1->Text.Length() - StartPos;
RichEdit1->Visible=false;
AA:
FoundAt = RichEdit1->FindText(String("반전"), StartPos, ToEnd, TSearchTypes()<< stMatchCase);
if (FoundAt != -1) {
RichEdit1->SelStart = FoundAt;
RichEdit1->SelLength = strlen("반전");
RichEdit1->SelAttributes->Color = clRed;
StartPos=FoundAt+1;
goto AA;
} else {
RichEdit1->Visible=true;
RichEdit1->SelStart=0;
RichEdit1->SetFocus();
}
위와 같이 하니 반전은 아니지만 색깔이 빨간색으로 바뀌는군요..
|