BOOL FindText(BOOL bSetCell = TRUE);
BOOL FindText(ROWCOL& nRow, ROWCOL& nCol, BOOL bSetCell);
bSetCell
Specifies if the current cell should be positioned onto the cell where the search text could be found.
nRow
Reference to the row-id where to start the search and to receive the new row-id if the search was successful.
nCol
Reference to the column-id where to start the search.
Nonzero if the search text is found; otherwise 0.
Call the FindText function to search for text in the specfied column or the column of the current cell. This function loops through all rows in the column, passing a reference to the GX_FR_STATE structure to the associated control’s FindText method. The GX_FR_STATE structure contains the search information.
The first version of FindText determines the coordinates of the current cell and passes these values to the second version of FindText.
Before calling FindText, the attributes of GX_FR_STATE must be initialized:
CFindReplaceDialog* pFindReplaceDlg is a pointer to the find or replace dialog.
BOOL bFindOnly: Specifies if pFindReplace is the find or replace dialog box.
CString strFind: search text
CString strReplace: replace string
BOOL bCase: TRUE if case sensitive, FALSE if not
int bNext: TRUE if search down, FALSE if search up
You normally do not need to call the FindText method unless you override OnFindNext, which calls FindText.
FindText calls OnTextNotFound when the text is not found.
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 returns FALSE. A warning will be displayed in the debug window.
END Control-Factory Specific
CGXControl::FindText CGXGridCore::OnFindNext CGXGridCore::OnTextNotFound GX_FR_STATE
Class Overview | Class Members