孙鑫VC++Lesson3
来源:互联网 发布:村邮乐购 软件 编辑:程序博客网 时间:2024/05/14 10:32
这节课,开始学习了MFC框架程序,我的感觉就是照着例子倒是好写了,可是自己写的时候就是很困难啊!这节课中,主要给我们讲解了MFC框架程序执行的顺序情况最后的这个例子还是很不错的!class CWnd{public: BOOL CreateEx(DWORD dwExStyle, // extended window style LPCTSTR lpClassName, // registered class name LPCTSTR lpWindowName, // window name DWORD dwStyle, // window style int x, // horizontal position of window int y, // vertical position of window int nWidth, // window width int nHeight, // window height HWND hWndParent, // handle to parent or owner window HMENU hMenu, // menu handle or child identifier HINSTANCE hInstance, // handle to application instance LPVOID lpParam); // window-creation data BOOL ShowWindow(int nCmdShow); BOOL UpdateWindow();public: HWND m_hWnd;};BOOL CWnd::CreateEx(DWORD dwExStyle, // extended window style LPCTSTR lpClassName, // registered class name LPCTSTR lpWindowName, // window name DWORD dwStyle, // window style int x, // horizontal position of window int y, // vertical position of window int nWidth, // window width int nHeight, // window height HWND hWndParent, // handle to parent or owner window HMENU hMenu, // menu handle or child identifier HINSTANCE hInstance, // handle to application instance LPVOID lpParam) // window-creation data{ m_hWnd=::CreateWindowEx(dwExStyle,lpClassName,dwStyle,x,y, nWidth,nHeight,hWndParent,hMenu,hInstance, lpParam); if(m_hWnd!=NULL) return TRUE; else return FALSE;}BOOL CWnd::ShowWindow(int nCmdShow){ return ::ShowWindow(m_hWnd,nCmdShow); //加上::代表全局的函数,平台SDK的函数}BOOL CWnd::UpdateWindow(){ return ::UpdateWindow(m_hWnd);}int WINAPI WinMain( HINSTANCE hInstance, // handle to current instance HINSTANCE hPrevInstance, // handle to previous instance LPSTR lpCmdLine, // command line int nCmdShow // show state){ WNDCLASS wndcls; wndcls.cbClsExtra=0; wndcls.cbWndExtra=0; ...... RegisterClass(&wndcls); CWnd wnd; wnd.CreateEx(...); wnd.ShowWindow(SW_SHOWNORMAL); wnd.UpdateWindow(); ...... //进入消息循环}
- 孙鑫VC++Lesson3
- 孙鑫VC++深入详解:Lesson3
- Lesson3 MFC应用程序框架 ---孙鑫VC++教程
- Lesson3 MFC应用程序框架 ---孙鑫VC++教程
- 孙鑫Lesson3 principle
- lesson3
- lesson3
- LESSON3
- LogicJava---Lesson3
- csdnsS2-lesson3
- Windows程序设计__孙鑫C++Lesson3《MFC 程序框架的剖析》
- java程序设计--孙鑫java无难事Lesson3《包、类和方法说明符、垃圾回收、接口》
- Lesson3 MFC应用程序框架
- lesson3 NetWork (02.19)
- 黑马程序员-lesson3
- XML 自学笔记 Lesson3
- lesson3 运算符
- 定义泛型类 lesson3
- 在WEB容器中获取持久化上下文
- 学校来了个美丽清纯的女生,好多人追求~
- php邮件群发系统
- VB ActiveX 工程部件设置注意事项
- 当前时间显示
- 孙鑫VC++Lesson3
- 【转帖】PHP开源AJAX框架
- sql2005还原备份后,选择“数据库关系图”提示:此数据库没有有效所有者,因此无法安装数据库关系图支持对象"的解决方法
- 美国黑客入侵取款机网络
- Cannot convert from 'const char [..]' to 'LPCTSTR'
- __FUNCTION__ 在C语言中以编程的方式获取函数名(VC6.0不支持)
- CFileDialog
- ACE_Proactor框架代码简析
- 在Oracle中获取拼音助记码