8月 2010

开启Visual Studio下C++的注释TODO自动列表到TaskList窗口功能

用Eclipse写JAVA时已经习惯了在注释里写TODO,然后Tasks小窗口中就能够看到当前source页里的所有TODO,用起来很方便。这几天用VS 2010写MFC时留了很多TODO,才发现开了VS的Task List窗口竟然看不到代码页里的TODO位置,看了一下M$的官方Blog发现原来只有VC++用这个功能时是需要手动开启的,VB、C#都是直接开启的。VC++开启这个功能的位置如下:
Tools->Options->Text Editor->C/C++->Formatting-> Miscellaneous->Enumerate Comment Tasks。
官方说法这个选项在C++里被默认关闭的原因是due to performance reasons。

取得windows中一些特殊文件夹路径的方法

比如当前用户的documents文件夹、windows安装文件夹等,虽然一些软件的默认文档保存位置通过这种方式取得感觉有点恶心,不过在用户未指定默认目录的情况下通过这种方式取得的路径还是比较合理的。

以下内容转抄自Visual C++ Tips,原始链接:http://weseetips.com/2008/05/01/how-to-get-the-path-of-special-folders-in-windows/

Windows have a number of special folder such as my documents, desktop folder etc. They are special because, their path can be different in system to system. So how can you get the path of special folder in windows?

Continue reading…