
(*
 Delphi Object and Component Reference
#{bmc bm9.BMP} Perform example
The following example demonstrates the use of the Perform method to send a windows message. The EM_SCROLLCARET message scrolls the caret in the rich edit into view. The caret position is set to the contents of the mask edit prior to calling Perform.
// Perform search on active DBRichEdit
    	TDBRichEdit *DBRE = DtsDBRE;
    	if (MainPgCtl->ActivePage->Caption == "Code Examples")
        	DBRE = CodeTBRE;
        if (MainPgCtl->ActivePage->Caption == "TI's")
        	DBRE = TIDetDBRE;
    	if (MainPgCtl->ActivePage->Caption == "BC5 Bugs")
       	 	DBRE = BC5DBRE;
    	if (MainPgCtl->ActivePage->Caption == "Q and A's")
        	DBRE = DBQaRE;
        if (MainPgCtl->ActivePage->Caption == "TN's")
        	DBRE = TNRE;

    	PosFound = DBRE->Perform(EM_FINDTEXT, FT_WHOLEWORD, (LPARAM) (&MyTFindText));
    	FoundOne = PosFound != -1;
    	DBRE->Perform(EM_SETSEL, PosFound, PosFound + Search.Length());
    	DBRE->Perform(EM_SCROLLCARET, 0, 0);
    	DBRE->SetFocus();
 
