04 2009 档案
摘要:[转载自:http://www.cppblog.com/mzty/archive/2006/12/07/16101.html] 主要是两个问题:指针截断和数据对齐。 C/C++移植的问题 1 新的数据类型和函数 1)固定精度:(跟X86或X64无关) Term Description DWORD32 ...
阅读全文
摘要:/Wp64 (Detect 64-Bit Portability Issues). msdn: http://msdn.microsoft.com/en-us/library/yt4xw8fh.aspx
阅读全文
摘要:[转载自:http://violasong.com/blog/] Beautiful Code and Beautiful Software Monday, October 29, 2007 Programming was fun because I could make cool stuff, but what actually got me obsessed about it was su...
阅读全文
摘要:[转载自:http://www.mscto.com/cppvc/1541912.html] MFC-对话框与数据交换 对话框是非常重要的一种窗体,就我看过的应用,除了MDI程序,对话框比文档视图框架用得更多。原因大概有两个,首先对话框可以利用资源编辑器来编 辑,这就有了一点快速开发的感觉,尽管比真正的快速开发弱得多;其次,对话框提供一种叫数据交换的方法,让控件与某种数据类型关联起来,比如...
阅读全文
摘要:1. Inline function expansion,内联函数扩展的三种优化(使用内联可以节省函数调用的开销,加快程序速度):Disable不使用内联;Only __inline,仅函数定义前有inline或__inline标记使用内联;Any Suitable,除了inline或__inline标记的函数外,编译器“觉得”应该使用内联的函数,都使用内联。 2. Enables minimal...
阅读全文
摘要:[MSDN]Objects and the Object Hierarchy Home Page (Objects) | Overview | FAQ | Reference You can control the Visual C++ Developer Studio environment programmatically by manipulating it through...
阅读全文
摘要:Stack unwinding (C++) When an exception is thrown and control passes from a try block to a handler, the C++ run time calls destructors for all automatic objects constructed since the beginning of the ...
阅读全文
摘要:MSDN MFC: http://msdn.microsoft.com/zh-cn/library/d06h2x6e.aspxTN020 http://msdn.microsoft.com/zh-cn/library/ft1t4bbc.aspxNeed to learn0. 什么是窗口类?窗口函数?IRR的使用00. Articles:http://www.vckbase.com/document...
阅读全文
摘要:MFC Library Reference [MSDN: http://msdn.microsoft.com/zh-cn/library/0asx94f7(VS.80).aspx] Managing the State Data of MFC Modules This article discusses the state data of MFC modules and how thi...
阅读全文
摘要:对于Windows平台而言,dll一共有4种类型: 非 MFC DLL 静态链接到 MFC 的规则 DLL (MFC Regular DLL) 动态链接到 MFC 的规则 DLL(MFC Regular DLL) 扩展 DLL(MFC Extension DLL) ...
阅读全文
摘要:1. 资源Basic Visual C++ 支持十种资源:加速键、位图、光标、对话框、HTML、图标、菜单、串表、工具条和版本信息。 各种资源就是堆数据而已,最终都会被嵌入到EXE文件里的数据区中。需要的时候就通过函数加载到内存中使用。和数据库一样的。各种资源通过ID来唯一确 定,就像数据库用关键字来确定一样。不同的资源由于类型不一样可以使用等值的ID,如同数据库里的每一个表...
阅读全文
摘要:Static/globa dataLifecycle:All static data and global data would be stored in static/global storage area for the whole application. Dll's static and global data would be there of course. In general, t...
阅读全文
摘要:[转载自:http://www.vckbase.com/document/viewdoc/?id=1720] C++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static。前者应用于普通变量和函数,不涉及类;后者主要说明static在类中的作用。 一、面向过程设计中的static 1、静态全局变量 在全局变量前,加上关键字static,该变量就被定...
阅读全文
摘要:1) 堆是由低地址向高地址扩展,栈是由高地址向低地址扩展。2) 堆是不连续的空间,栈是连续的空间。3) 在申请空间时,栈的分配要比堆的快。对于堆,先遍历存放空闲存储地址的链表、修改链表、再进行分配;对于栈,只要剩下的可用空间足够,就可分配到,如果不够,那么就会报告栈溢出。4) 栈的生命期最短,到函数调用结束时;静态存储区的生命期最长,到程序结束时;堆中的生命期是到被我们手动释放时(...
阅读全文
摘要:Visual Studio Managing Application Resources You can create and manage resources for your project using the Resource Designer or the Resources page of the Project Designer. Resou...
阅读全文
摘要:CString::LoadString(UINT nID) Conclusion: the correct way to load string resource by ID is to call CString::LoadString(HINSTANCE hInstance,UINT nID), specifying the dll handler you want to search for....
阅读全文
摘要:Dialog Modality—Modal or Modeless Dialogs A dialog can be used in two ways. Basically, it either blocks access (by mouse or keyboard) to any other parts if an application while visible, or it does no...
阅读全文
摘要:使用“devenv.exe /edit ”命令在一个已经存在的vs实例里打开文件 原文链接:You can use devenv.exe /edit to open a file in an existing Visual Studio instance 操作步骤: 运行命令:devenv /edit ,可以在IDE里打开文件。 你也可以创建一个cmd文件,例如VSEdit.cmd,在文件里...
阅读全文
摘要:Macros for Custom Build Commands You can use the File and Directory drop-down lists to insert any of the following directory and filename macros in either grid at the current insertion point location....
阅读全文

浙公网安备 33010602011771号