惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
V
Visual Studio Blog
罗磊的独立博客
GbyAI
GbyAI
V
V2EX
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
博客园 - 司徒正美
WordPress大学
WordPress大学
B
Blog RSS Feed

博客园 - Jonny Yu

[GCC学习]get the optimized function call graph 界面开发中的那些疯狂的小事 Re:架构设计之性能设计经验 技术资产管理 .Net下进程外COM服务器的实现 控件的鼠标拖动和改变大小实现的思考 Learn from mistake, i.e. 和 e.g. 是不同的 How can I hide a user from the Welcome Screen in Windows XP? About HDC window class, OO 就差一点点-微妙的强制类型转换 [GDI+]DrawRectangle和FillRectangle,细节决定成败 Disable the CrossThreadChecking in .Net Framework v2.0 several useful Store Procedures in MSSQL http://cnblogs.com/rickie/archive/2005/07/02/184927.aspx VS2005使用体验 Inventor 的一些快捷键 First day in Hanna. XPath crash course note
about wParam and lParam
Jonny Yu · 2005-08-23 · via 博客园 - Jonny Yu

这两个是Win16系统遗留下来的产物了
在Win16API中WndProc有两个参数
一个是WORD类型的16位整型变量
另一个是LONG类型的32位整型变量,
因此根据匈牙利命名法,16位的变量就被命名为wParam,
而32位的变量就被命名为lParam。

到了Win32API中,原来的16位变量也被扩展为32位,
因此wParam和lParam的大小完全相同。
在Win32API的早期,为了保证和Win16API的代码可移植性
MS定义了WPARAM和LPARAM两个宏
当时保留了w前缀的原因一方面是由于WPARAM宏也已W开头,
还有也因为要提醒程序员注意到可移植性,当然到了现在
Win16早已退出历史舞台,这个前缀也就约定俗成的沿用下来了。

posted on 2005-08-23 00:03  Jonny Yu  阅读(1060)  评论(0)    收藏  举报