[持续更新]Windows Programming常见Hungarian Notation/Abbreviation大全
Windows Programming必须了解的naming-convention,下面解释每个前缀/缩略词的含义,如果含义的解释一行放不下的,就把解释放在一个引用框里
Prefix
Meaning
CS
Class style option
ps
eg: psText; a pointer to the character string,
DC
device context, The device context is really just a data structure maintained internally by GDI. A device context is associated with a particular display device, such as a video display or a printer. For a video display, a device context is usually associated with a particular window on the display.
rc
eg: rcPaint; a structure of type RECT, the RECT structure defines a rectangle with four fields named left , top , right , and bottom
MM
eg: MM_TEXT;
Windows has a variety of "mapping modes" that govern how the logical coordinates specified in GDI drawing functions are translated to the physical pixel coordinates of the display. The mapping mode is defined in the device context.
DT
Options related to DrawText function
SW
show window option
CW
Create window option
DT
Draw text option
IDI
ID number for an icon
IDC
ID number for a cursor
MB
Message box options
SND
Sound option
WM
Window message
SND
sound option
WS
Window style
UINT
unsigned int
PSTR
a pointer to a nonwide character string, that is, a char *
WPARAM/LPARAM
The origin of these names requires a bit of history. When Windows was a 16-bit system, thethird parameter to WndProc was defined as a WORD, which
was a 16-bit unsigned short integer, and the fourthparameter was defined as a LONG, which was a 32-bit signed long integer. That's the reason for the "W"
and "L"prefixes on the word "PARAM." In the 32-bit versions of Windows, however, WPARAM is defined as a UINT andLPARAM is defined as a LONG (which is still the C long data type), so both parameters to the window procedureare 32-bit values. This may be a little confusing because the WORD data type is still defined as a 16-bit unsignedshort integer in Windows 98, so the "W" prefix to "PARAM" creates somewhat of a misnomer.
WINAPI/CALLBACK
Both these identifiers are defined as __stdcall , which refers to a special calling
sequence for function calls that occur between Windows itself and your application.
MSG
Message structure
WNDCLASS
Window class structure
PAINTSTRUCT
Paint structure
RECT
Rectangle structure
HINSTANCE
Handle to an "instance"—the program itself
HWND
Handle to a window
HDC
Handle to a device context. A device context refers to a physical output device (such as a video display) and its device driver.
sz, eg: szCmdLine
string terminated by zero
h, eg: hPrevInstance
h stands for "handle"
i, eg: iCmdShow
i stands for integer
ui, eg: uiParam
ui stands for unsigned integer
c
char or WCHAR or TCHAR
by
BYTE (unsigned char)
n
short
i
int
x , y
int used as x-coordinate or y-coordinate
cx , cy
int used as x or y length; c stands for "count"
b or f
BOOL (int); f stands for "flag"
w
WORD (unsigned short)
l
LONG (long)
dw
DWORD (unsigned long)
fn
function
s
string
sz
string terminated by 0 character
h
handle
p
pointer
lpfn
long pointer to a function, Recall that in the Win32 API there is no distinction between long pointers and near pointers. This is a remnant of 16-bit Windows.
cb
stands for "count of bytes" and is often used for a variable that denotes a byte size
hbr
handle to a brush
lpsz
long pointer to a string terminated with a zero
np
near pointer, also a remnant of 16-bit windows
lpcwstr
long poiner to const wide character string (const wchar_t *)
[持续更新]Windows Programming常见Hungarian Notation/Abbreviation大全的更多相关文章
- SQL Server 2008 常见异常收集(持续更新)
写在前面: 最近,在使用SQL Server 2008时,出现了不少问题.发现,很多问题都是以前碰见过的,并且当时也寻找到了解决方法(绝大部分来源于“百度”与“Google”),只是时间一长,又忘记了 ...
- Android源码编译常见错误(持续更新)
本文为个人工作中处理遇到的编译问题做个小结,后续遇到新的问题,持续更新. No such file or directory: 1. 检查路径是否有问题,文件是否存在,若文件存在且路径没问题 2. 检 ...
- (持续更新) C# 面试技术点、常见SQL技术点 和 解决高并发的相关技术
这篇博客 持续更新. 方便小伙伴们学习与面试前的复习
- 常见 git 需求整理(持续更新中)
首发于 语雀文档 突然感觉自己对 git 还是挺熟悉的,因为团队里新来的七八号应届生来问我 git 问题,基本没有答不上的情况,但为了能更好地对知识进行整理,还是记录一下为好. (希望能)持续更新.. ...
- 【持续更新】JavaScript常见面试题整理
[重点提前说]这篇博客里的问题涉及到了了JS中常见的的基础知识点,也是面试中常见的一些问题,建议初入职场的园友Mark收藏,本文会持续更新~ 1. 引入JS的三种方式 1.在HTML标签中直接使用,直 ...
- LeetCode All in One题解汇总(持续更新中...)
突然很想刷刷题,LeetCode是一个不错的选择,忽略了输入输出,更好的突出了算法,省去了不少时间. dalao们发现了任何错误,或是代码无法通过,或是有更好的解法,或是有任何疑问和建议的话,可以在对 ...
- web前端面试题(持续更新)
此文是我本人在面试的时候遇到的问题和一些同学遇到的问题加资料上面的问题的总结.(将会持续更新,因为未有满意工作) 面试时有几点需要注意: 1.面试题目:根据你的等级和职位的变化,入门级到大神级,广度和 ...
- ASP.NET MVC深入浅出系列(持续更新) ORM系列之Entity FrameWork详解(持续更新) 第十六节:语法总结(3)(C#6.0和C#7.0新语法) 第三节:深度剖析各类数据结构(Array、List、Queue、Stack)及线程安全问题和yeild关键字 各种通讯连接方式 设计模式篇 第十二节: 总结Quartz.Net几种部署模式(IIS、Exe、服务部署【借
ASP.NET MVC深入浅出系列(持续更新) 一. ASP.NET体系 从事.Net开发以来,最先接触的Web开发框架是Asp.Net WebForm,该框架高度封装,为了隐藏Http的无状态模 ...
- Android 常用开源库总结(持续更新)
前言 收集了一些比较常见的开源库,特此记录(已收录350+).另外,本文将持续更新,大家有关于Android 优秀的开源库,也可以在下面留言. 一 .基本控件 TextView HTextView 一 ...
随机推荐
- idea的一些快捷键
查找文本的出现位置就用Ctrl+F/Ctrl+Shift+F在当前窗口或全工程中查找,再配合F3/Shift+F3前后移动到下一匹配处Intellij的Ctrl+N/Ctrl+Shift+N可以打开类 ...
- create xml file from sql script
Declare @xmlDoc xmlSET @xmlDoc = (SELECT * FROM USERS AS UserTable For XML AUTO, ELEMENTS, ROOT('Roo ...
- Python爬虫(3)豆瓣登录
前面(1)(2)的内容已经足够爬虫如链家网之类的不需要登录可以直接获取数据的网站. 而要爬取社交网站比较鲜明的特点就是需要登录,否则很多东西都无法获取.经过测试发现,微博,知乎都不是很好登录,知乎有时 ...
- C++数组参数应用方式探讨(转)
对于经验丰富的编程人员来说,C++编程语言应该是他们经常使用于程序开发的一种实用性语言.那么,在C++中,C++数组参数永远不会按值传递.它是传递第一个元素(准确地说是第0个)的指针. 例如,如下声明 ...
- MapReduce开发技巧
数据类型的选择 自定义数据类型 参考:Hadoop提交作业自定义排序和分组 MapWritable/SortedMapWritable Hadoop中可传输的Map集合,和Java中的Map用法差不多 ...
- Oracle数据库导入dmp文件报错处理方法
在向oracle数据库执行导入命令的时候报错,错误如下,大概意思是TNS中找不到服务名 下面说一下解决步骤 1:进入oracle用户,使用cat查看.bash_profile文件,找到ORACLE_H ...
- Android四大基本组件之 Activity
[Activity介绍] Activity 是用户接口程序,原则上它会提供给用户一个交互式的接口功能. 它是 android 应用程序的基本功能单元.Activity 本身是没有界面的.所以activ ...
- Visual studio中后期生成事件命令使用
在做项目是总要把发布后的一些dll拷贝的根网站的bin目录下,为了避免每次都需要手动拷贝可以在 项目的生成事件中写入bat命令,下面的命令只在项目使用的发布配置时执行拷贝, (在生成->配置管理 ...
- 小贝_redis高级应用-公布与订阅
redis高级应用-公布与订阅 一.公布与订阅(pub/sub)功能 二.公布与订阅(pub/sub)机制 三.redis公布与订阅(pub/sub)的实现 一.公布与订阅(pub/sub)功能 Pu ...
- 算法笔记_140:最小费用最大流问题(Java)
目录 1 问题描述 2 解决方案 1 问题描述 在最大流有多组解时,给每条边在附上一个单位费用的量,问在满足最大流时的最小费用是多少? 2 解决方案 下面代码所使用的测试数据如下图: 具体代码如下 ...