<< Return to Main Index

< Return to Class Index

CGXGridCore::OnReplaceSel

virtual void OnReplaceSel(LPCTSTR lpszFind, BOOL bNext, BOOL bCase, LPCTSTR lpszReplace);

lpszFind

The text to be found.

bNext

Specifies the direction of the search. If TRUE, the search direction is down. If FALSE, the search direction is up.

bCase

Specifies whether the search is case sensitive. If TRUE, the search is case sensitive. If FALSE, the search case is not case sensitive.

lpszReplace

The text to replace the search text.

Remarks

CGXGridView or CGXGridWnd calls OnReplaceSel when the user chooses the Replace button in the standard Replace dialog box. After replacing the selection, this function searches the text specified by lpszFind, with case sensitivity specified by bCase in the the direction specified with bNext. The search starts at the current cell and is accomplished by initializing the GX_FR_STATE structure and calling FindText.

Override OnReplaceSel to change the way a CGXGridCore-derived object replaces  the selected text.

Control-Factory Specific ->

This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementFindReplace method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this method available to your application.

If no concrete implementation is available this method performs no action. A warning will be displayed in the debug window.

END Control-Factory Specific

See Also

CGXGridCore::OnFindNext CGXGridCore::OnReplaceAll CGXGridCore::OnTextNotFound GX_FR_STATE

CGXGridCore

Class Overview | Class Members