Since Windows programs are generally very long, programmers may forget the meaning of the defined variables after a while. To help you remember and differentiate variables, Microsoft has created a naming convention for Windows, called Hungarian notation ). Hungarian notation provides a set of prefix characters, as shown in Table 1.1. These prefixes can also be combined.
Table 1.1 Hungarian notation
Prefix |
Meaning |
A |
Array |
B |
Boolean (INT) |
By |
Unsigned characters (bytes) |
C |
Character (byte) |
CB |
Byte Count |
RGB |
Long Integer that saves RGB color values |
CX, Cy |
Short INTEGER (calculate the length of X and Y) |
DW |
Unsigned long integer |
FN |
Function |
H |
Handle |
I |
Integer) |
M _ |
Class data member |
N |
Short or integer |
NP |
Near pointer |
P |
Pointer |
Continue table
Prefix |
Meaning |
L |
Long Integer |
Lp |
Long pointer |
S |
String |
SZ |
String ending with zero |
TM |
Body Size |
W |
Unsigned integer |
X, Y |
Unsigned integer (representing the coordinates of X or Y) |