◆ Hungarian naming law
The basic principle is:
Variable name = property + Type + Object Description
(1) attributes:
Global variable: G _
Constant: C _
Class member variable: M _
(2) Type:
Array:
Boolean: B byte:
CHAR: C Byte Count: CB color reference value: CR Coordinate Difference (length): Cx, Cy
DWORD: DW
Floating Point: F function: FN
Handle: H
INTEGER (integer): I
Long Integer (long): l long pointer: lp
Short INTEGER: N near pointer: NP
Pointer: P
String: s string terminated with '/0': SZ
Text Content: TM
Unsigned: u
Word: W
Coordinates: X, Y
(3) Description:
Initialization: init
Temporary Variable: TMP
Target object: DST
Source object: SRC
Window: WND
Below is an example:
Hwnd: h indicates the handle, and WND indicates the window, which together is the "window handle ".
M_bflag: M indicates a member variable, and B indicates a Boolean variable. In combination, it is a member variable of a class. A boolean variable is a state sign ".
1. variable name;
2. Constant naming and macro definition;
3. Resource Name Definition Format;
4. Function naming and namespace, class naming, and interface naming;
5. struct name;
6. Control name;
7. Notes;