Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
void __fastcall TfrmMain::SearchFind1FindDialogFind(TObject *Sender)
{
int MatchPos, StartPos, EndPos;
 
	if( richEditor->SelLength )
		StartPos = richEditor->SelStart + richEditor->SelLength;
	else
		StartPos = 0;
 
	EndPos = richEditor->Text.Length() - StartPos;
	MatchPos = richEditor->FindText(SearchFind1->Dialog->FindText,
					StartPos,
					EndPos,
					TSearchTypes() << stMatchCase);
 
	if( MatchPos != -1 )
	{
		richEditor->SelStart = MatchPos;
		richEditor->SelLength = SearchFind1->Dialog->FindText.Length();
 
	}
 
}


cela fonctionne normalement sauf que pour voir le resultat il faut cliquer sur le richEdit