Window Class和CreateWindow(不断修改中)
来源:互联网 发布:软件商务怎么谈 编辑:程序博客网 时间:2024/06/05 08:58
1.窗口类WNDCLASS和窗口实例CreateWindow
1.1 这两者怎么联系起来的?
使用WNDCLASS的最后一个成员lpszClassName和CreateWindow第一个参数classname联系起来,正如MSDN所说:
- Search the list of application local classes for a class with the specified name whose instance handle matches the module's instance handle. (Several modules can use the same name to register local classes in the same process.)
- If the name is not in the application local class list, search the list of application global classes.
- If the name is not in the application global class list, search the list of system classes.
1.2 窗口类的作用范围?全局,进程还是线程?
由style成员决定,如果wndClass.style = CS_GLOBALCLASS,则表示这个窗口类是全局的。如果希望在其他进程中使用:
load拥有这个窗口类的dll或者可执行性文件
CreateWindow(类名,.......,dll的句柄,......)
1.3 CreateWindow为什么需要hInstance参数
由 1.2 可知,当程序加载了多个dll的时候,是有可能出现类名冲突的,例如
A.dll和B.dll都注册了为MyClass的窗口类,因此,需要hInstance区别不同的dll来唯一指定窗口类。
博文http://blogs.msdn.com/b/oldnewthing/archive/2005/04/18/409205.aspx有详细解答
0 0
- Window Class和CreateWindow(不断修改中)
- 关于windows消息(不断修改中)
- CreateWindow()
- linux常用命令 不断修改中。。。。。。。。。。
- java基础(个人学习笔记,不断修改更新中)
- HTML(个人学习笔记,不断跟新修改中)
- CreateWindow() 在VC6和 VS2005 中使用差异
- CreateWindow和WNDCLASS中为什么都出现了HINSTANCE
- CreateWindow 和DestroyWindow
- java中函数积累,会不断修改
- CreateWindow
- CreateWindow
- CreateWindow()
- CreateWindow
- CreateWindow
- CreateWindow
- CreateWindow
- CreateWindow
- 使用boost::any实现virtual template成员函数
- linux新内核的freeze框架以及意义
- 敏感字过虑,金字塔算法
- C++ 一个引起C2512错的原因
- (11)奇偶数分离
- Window Class和CreateWindow(不断修改中)
- Android记录自己的日志
- JSoup真好用
- db4o 连接池
- 观察者模式
- String系列——String关键源码解析
- Cocos2d-x 内存管理中retain() 、autoRelease()、release()
- 好久没来这里了!
- 正则表达式替换括号里的空格