上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 63 下一页
摘要: [MSDN: http://msdn.microsoft.com/en-us/library/151kt790.aspx] The Visual C++ linker now supports the delayed loading of DLLs. This relieves you of the need to use the Windows SDK functions LoadLibrary... 阅读全文
posted @ 2009-05-19 22:07 能巴 阅读(366) 评论(0) 推荐(0)
摘要: 1. 菜单是Windows的标准界面元素,几乎所有的Windows应用程序中都有它的身影。MFC中的类CMenu对它进行了封装,使其使用起来更加简便。 要在程序中使用菜单也很简单,一般分以下几步:第一步先用VC的菜单编辑器创建一个菜单资源,给它赋予我们自己定义的ID,第二步在程序中构造一个 CMenu类的对象,用CMenu::LoadMenu函数将菜单从资源中装入,接着调用CWnd::SetMen... 阅读全文
posted @ 2009-05-11 23:01 能巴 阅读(373) 评论(0) 推荐(0)
摘要: 关于MVC结构模式无须多言,如下图所示: 在MFC中实现经典的MVC结构,如下图所示:注意:1、Document和View之间的绑定:View绑定到Document。2、Frame作为Controller时,由于可以接收到输入消息,比较适合充当控制器。但是,由于视图和文档绑定,所以在切换视图时需要将视图和文档分离开,然后再进行切换。3、View作为Contrller时,由于该视图和文档是绑定的,... 阅读全文
posted @ 2009-05-10 23:55 能巴 阅读(1437) 评论(0) 推荐(0)
摘要: [MSDN:http://msdn.microsoft.com/en-us/library/xwz5tb1x(VS.80).aspx]Dialog Data Exchange If you use the DDX mechanism, you set the initial values of the dialog object's member variables, typically in y... 阅读全文
posted @ 2009-05-10 20:34 能巴 阅读(482) 评论(0) 推荐(0)
摘要: 1. Dll typesThree:Win32 dllMFC regular dllMFC extension dll2. MFC extension dllBasic[MSDN]:An MFC extension DLL is a DLL that typically implements reusable classes derived from the existing Microsoft ... 阅读全文
posted @ 2009-05-10 18:35 能巴 阅读(1771) 评论(0) 推荐(0)
摘要: 三个WINDOWS SDK函数: WinExec,ShellExecute ,CreateProcess,可以实现调用其他程序的要求。WinExec这个函数最简单,只有两个参数,原型如下: UINT WinExec( LPCSTR lpCmdLine, // 命令路径 UINT uCmdShow // 显示方式 ;使用方法如下:WinExec("Notepad.exe", SW_SHOW); //... 阅读全文
posted @ 2009-05-10 12:14 能巴 阅读(5634) 评论(0) 推荐(0)
摘要: [转载自: http://mindhacks.cn/2009/03/09/first-principles-of-programming/] 半年前,JoelOnSoftware和CodingHorror合搞的stackoverflow.com刚上线不久,我兴冲冲地跑过去扔了一个问题:你们认为编程的首要原则是什么? 作为我的学习原则的一个实践: 8. 学习一项知识,必须问自己三个重要问题:1. 它... 阅读全文
posted @ 2009-05-09 16:27 能巴 阅读(268) 评论(0) 推荐(0)
摘要: [Copied from C++ coding standards-chapter 9] Easy on yourself, easy on the code: All other things being equal, notably code complexity and readability, certain efficient design patterns and coding id... 阅读全文
posted @ 2009-05-09 16:16 能巴 阅读(381) 评论(0) 推荐(0)
摘要: [Copied From C++ Coding Standards--chapter 8] We define premature optimization as making designs or code more complex, and so less readable, in the name of performance when the effort is not justifi... 阅读全文
posted @ 2009-05-09 16:04 能巴 阅读(259) 评论(0) 推荐(0)
摘要: [MSDN: http://msdn.microsoft.com/en-us/library/6t3612sk(VS.71).aspx]TN035: Using Multiple Resource Files and Header Files with Visual C++ NoteThe following technical note has not been updated since it... 阅读全文
posted @ 2009-05-08 23:43 能巴 阅读(884) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 63 下一页