<< Return to Main Index

< Return to Class Index

CGXGridCore::OnReplaceAll

virtual void OnReplaceAll(LPCTSTR lpszFind, LPCTSTR lpszReplace, BOOL bCase);

lpszFind

The text to be found.

lpszReplace

The text to replace the search text.

bCase

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

Remarks

CGXGridView or CGXGridWnd calls OnReplaceAll when the user chooses the Replace All button in the standard Replace dialog box. OnReplaceAll searches the text specified by lpszFind, with case sensitivity specified by bCase. The search starts at the current cell and ends at the last row. For each cell in the column, OnReplaceAll passes a reference to the GX_FR_STATE structure to the control’s ReplaceAll method. This method replaces the the search text with the text specified by lpszReplace each time the search text is found. In the default implementation, OnTextNotFound is called if the text is not found.

Override OnReplaceAll to change the way a CGXGridCore-derived object replaces 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::OnReplaceSel CGXGridCore::OnTextNotFound GX_FR_STATE

CGXGridCore

Class Overview | Class Members