To locate current opened file in solution explorer you can use this macro:
Sub LocateInSolutionExplorer()
DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer")
DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer")
End Sub
Friday, June 27, 2008
Tuesday, June 24, 2008
Convert std::string to std::wstring
// std::string -> std::wstring
std::string s("string");
std::wstring ws;
ws.assign(s.begin(), s.end());
// std::wstring -> std::string
std::wstring ws(L"wstring");
std::string s;
s.assign(ws.begin(), ws.end());
std::string s("string");
std::wstring ws;
ws.assign(s.begin(), s.end());
// std::wstring -> std::string
std::wstring ws(L"wstring");
std::string s;
s.assign(ws.begin(), ws.end());
Monday, June 16, 2008
Add custom library or form in Visual Studio Macros
- Create custom class library in language that you prefer.
- In Build events Post build events add: copy "$(TargetPath)" "$(DevEnvDir)PublicAssemblies\"
- In macro from where you whant to use your custom library add reference to your class library
- You are now free to use your custom library in your macro
Tuesday, June 10, 2008
Find commented peace of code
In the process of re factoring of your code you may wish to delete commented peaces of code. You can use this regular expression to find potential trash in your code
((//.*\n)(//.*\n)+)(\/\*(.\n)#\*\/)
Subscribe to:
Posts (Atom)