Are there any examples of implementing the FindTextAsync in 6.1?
Hello Andrew,
Thank you for posting this question. What you should do first is call SetFindTextHandler:
This takes in a FindTextAsyncHandler:
Then when you call FindTextAsync, that FindTextAsyncHandler delegate will be called:
For example, code to search for the string “and” and select the first result would look something like:
void MyFindTextHandler(bool success, Selection select, void custom_data)
{
if (success)
{
PDF::PDFViewCtrl view = (PDF::PDFViewCtrl*)custom_data;
view->Select(select);
}
}…
PDF::PDFViewCtrl view = …
view->SetFindTextHandler(MyFindTextHandler, (void)view);
view->FindTextAsync(“and”, false, false, false, false);