Please be careful when include a resouce.h file to any cpp to avoid regression.
2008-11-07 09:09
681 查看
I summarize all the points that you should pay attention to before you want to include a resource.h file to any cpp.
1. You should confirm that when you define a new resource, there don’t exist the Macro Re-definition.
You can confirm this by search the new defined macro in your solution, or you can see the build log to check whether have the warning of Macro Re-definition or not, or raise the compiler parameter to set the Macro Re-definition warning as Error by Add: /WE4005 to your project build:
If the Macro have re-definition, there will exist the potential defects,
More details of this potential defects, just see the bottom of this thread.
1. When you try to load a string using LoadString, I would recommend that you specified the hInsance HANDLE as the first parameter of CString’s LoadString, this do really help us avoid some potential issues.
2. If you try to use TUxCommonUtils::LoadString(string macro definition) to load the string resource from TransUtilsRes.dll, please keep in your mind that the string macro definition should and must be defined in project TransUtilsRes/Resource.h, if the string resource is defined in other projects, you would not get that string.
This summarize just let you review and refresh your impression about load string, hope this helpful to you.
相关文章推荐
- vs2005下出现“Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive”的解决方法
- please specify the name of the executable file to be used for the debug session
- How to avoid the error "The file 'xyz.mdf' cannot be overwritten. when deploying
- http://blogs.msdn.com/b/pranavwagh/archive/2007/03/03/word-2007-file-seems-to-be-deleted-when-you-open-and-save-it-using-dsoframer.aspx
- “Problem with MergeList” or “status file could not be parsed” error when trying to do an update?
- What .h file should be include if you want to use colorref
- Use g++ to replace gcc when link the .cpp file
- linux下安装PHP的CI框架,出现Your view folder path does not appear to be set correctly. Please open the following file and correct this: i
- npm ERR!Please include the following file with any support request...../npm-debug.log
- Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive
- Error: The INF file contains Unicode characters that could not be converted correctly to ANSI的彻底解决
- XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPag
- this may be due to a corruption of the heap, which indicates a bug in ... or any of the DLLs it has
- HBase异常:hbase-default.xml file seems to be for and old version of HBase的解决方法
- Git使用之(pathspec master did not match any file(s) known to git)
- ASP Net - compilation error (Metadata file could not be found)-a fatal program hard to solve it.
- JSP中出现According to TLD or attribute directive in tag file, attribute value does not accept any expressions
- Solution to "'ascii' codec can't encode character" when writing file
- socket 关闭但端口占用问题 Bind: Address Already in Use Or How to Avoid this Error when Closing TCP Connections
- find string in file (need to be improved)