问题
The special case I am dealing with is to find all usages of the method CTime::Format in the entire solution. Please assume that the Visual Studio functionality „Find All References“ does - as suspected - not work.
回答1:
In order to find all usages of the method CTime::Format follow the steps:
Step 1: Replace the string CTime by the string CCTime in the entire solution.
Step 2: Implement the following:
#include "atltime.h"
class CCTime : public CTime
{
public:
[[deprecated("--> uses the method CTime::Format")]]
CString Format(LPCTSTR pszFormat) const
{
return CString(_T(" "));
}
};
Step 3: Rebuild the entire solution in order to get compile errors at the correct spots.
来源:https://stackoverflow.com/questions/65165060/how-is-it-possible-to-find-all-occurrences-of-a-method-if-the-visual-studio-fin