Camel, Pastal, Hungarian notation

Source: Internet
Author: User
Tags uppercase letter

It turns out I've been using the camel notation ... Collection of learning.      */Camel notation uses the first letter lowercase, and the next word begins with an uppercase letter, such as MyName.      The pastal notation is capitalized in the first letter, and the next word begins with an uppercase letter, such as MyName. The Hungarian notation is based on the pastal notation, preceded by a lowercase letter, or a sequence of lowercase letters, indicating the type of the variable, such as Smyname. A array of arrays
b bool (int) Boolean (integer)
by Unsigned Char (byte) unsigned character (bytes)
C Char character (bytes)
cb Count of bytes bytes
CR Color reference value color (reference) values
A collection of CX Count of x (short) x (shorter integers)
DW DWORD (unsigned long) double word (unsigned long integer)
F flags (usually multiple bit values) flag (usually with multiple digits)
fn function functions
G_ Global's
H Handle Handle
I integer integers
L Long Integer
LP Long pointer length pointer
M_ data member of a class of a classes
n Short int shorter integer
P Pointer Pointer
S string strings
SZ Zero terminated string ending with 0
TM Text Metric Textual rules
u Unsigned int unsigned integer
UL Unsigned Long (ULONG) unsigned length integer
W WORD (unsigned short) unsigned integer
x, y x, coordinates (short) coordinate value/shorter integer
Example of an unprecedented prefix type for V void
G_ global variable G_servers
Class C or structural body cdocument,cprintinfo
M_ member variable m_pdoc,m_ncustomers prefix type description example
CH Char 8-bit character Chgrade
CH TCHAR 16-bit Unicode set character chname
b BOOL Boolean variable benable
n int integral type nlength
n UINT-free integer nlength
W WORD 16-bit unsigned integer wpos
L Long 32-bit signed integer loffset
DW DWORD 32-bit unsigned integer dwrange
p * Pointer variable, memory module pointer (Ambient Memories model Point) PDoc
LP far* long Pointer Lpdoc
Lpsz LPSTR 32-bit string pointer lpszName
Lpsz LPCSTR 32-bit constant string pointer lpszName
Lpsz LPCTSTR 32-bit Unicode set constant pointer lpszName
H handle Windows object handle HWND
LPFN (*FN) () callback function pointer Callback far pointer to Callback function LPFNABORTMFC, handle, control and struct naming specification Windows type Sample variable MFC Class sample variable HWND hwn        D cwnd* pWnd;
Hdlg Hdlg; cdialog* Pdlg;
HDC hdc; cdc* PDC;
Hgdiobj Hgdiobj; cgdiobject* Pgdiobj;
Hpen Hpen; cpen* Ppen;
Hbrush Hbrush; cbrush* Pbrush;
Hfont Hfont; cfont* Pfont;
Hbitmap Hbitmap; cbitmap* Pbitmap;
Hpalette Hpaltte; Cpalette* Ppalette;
HRGN HRGN; crgn* prgn;
HMENU HMENU; cmenu* Pmenu;
HWND Hctl; Cstate* pState;
HWND Hctl; cbutton* Pbutton;
HWND Hctl; cedit* PEdit;
HWND Hctl; clistbox* Plistbox;
HWND Hctl; ccombobox* Pcombobox;
HWND Hctl; cscrollbar* Pscrollbar;
HSZ Hszstr; CString pStr;
Point pt; CPoint pt;
Size size; CSize size;
Rect rect; CRect rect; prefix type instance
Class C or structure cdocument,cprintinfo
M_ member variable m_pdoc,m_ncustomers prefix type description instance
CH Char 8-bit character Chgrade
Ch TCHAR If _UNICODE is defined, it is a 16-bit character chname
b bool Boolean value benable
n int integer (its size depends on the operating system) nlength
n UINT unsigned value (its size depends on the operating system) nheight
W WORD 16-bit unsigned value Wpos
L LONG 32-bit signed integer loffset
DW DWORD 32-bit unsigned integer dwrange
p * Pointer PDoc
LP far* far pointer lpszName
Lpsz LPSTR 32-bit string pointer lpszName
Lpsz LPCSTR 32-bit constant string pointer lpszName
Lpsz LPCTSTR If _UNICODE is defined, it is a 32-bit constant string pointer lpszName
H handle Windows object handle HWND
LPFN callback pointer to callback function IDR_ multiple resource share identities for different types Idr_maiinframe 1~0X6FFF
Idd_ Dialog Resource Idd_spell_check 1~0x6fff
Hidd_ dialog resource's help context Hidd_spell_check 0X20001~0X26FF
Idb_ Bitmap Resource Idb_company_logo 1~0x6fff
IDC_ Cursor Resource Idc_pencil 1~0X6FFF
Idi_ icon Resource Idi_notepad 1~0x6fff
Id_ commands from a menu item or toolbar id_tools_spelling 0X8000~0XDFFF
HID_ Command Help Context hid_tools_spelling 0X18000~0X1DFFF
IDP_ message box prompt Idp_invalid_partno 8~0xdeef
HIDP_ message Box Help context Hidp_invalid_partno 0x30008~0x3deff
Ids_ String Resources Ids_copyright 1~0x7eef
IDC_ controls in the dialog box Idc_recalc 8~0xdeefmicrosoft MFC macro Naming convention name type _afxdll unique dynamic link Library,dll version
_alpha only the DEC ALPHA processor is compiled
_DEBUG includes debug versions of diagnostics
_mbcs Compiling multibyte character sets
_unicode to open UNICODE in an application
AFXAPI functions provided by MFC
CALLBACK function U ANSI (N) or Unicode (U) via pointer callback
D Debug or Release: D = Debug; Ignore identifier for release. NAFXCWD. LIB Debug Version: MFC Static Connection Library
NAFXCW. LIB release Version: MFC static Connection Library
UAFXCWD. LIB Debug Version: MFC static connection library with Unicode support
Dynamic Connection Library naming specification name type
The new naming specification type definition in Windows.h describes WINAPI using the far Pascal location in the API declaration, and if you are writing a DLL with an exported API population point, you can use that type in your own API
CALLBACK uses the location of Far Pascal in application callback routines, such as Windows and dialog boxes
LPCSTR is the same as LPSTR, except that LPCSTR is used for read-only string pointers and is similar in definition (const char far*)
A UINT-portable unsigned integer type whose size is determined by the host environment (32-bit for Windows NT and Windows 9x); it is a synonym for unsigned int
LRESULT the type of the return value of the window program
LPARAM declares the type used by LPARAM, LPARAM is the fourth parameter of a window program
WPARAM declares the type used by WPARAM, WPARAM is the third parameter of a window program
LPVOID generic pointer type, same as (void *), can be used instead of LPSTR

Camel, Pastal, Hungarian notation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.