zoukankan      html  css  js  c++  java
  • [持续更新]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 *)

  • 相关阅读:
    二分+树状数组/线段树(区间更新) HDOJ 4339 Query
    数论(GCD) HDOJ 4320 Arcane Numbers 1
    拓扑排序/DFS HDOJ 4324 Triangle LOVE
    离散化+线段树/二分查找/尺取法 HDOJ 4325 Flowers
    KMP HDOJ 4300 Clairewd's message
    高精度模板
    前缀+排序 HDOJ 4311 Meeting point-1
    Kruskal HDOJ 4313 Matrix
    最短路(Dijkstra) HDOJ 4318 Power transmission
    (转)C语言运算符优先级 详细列表
  • 原文地址:https://www.cnblogs.com/qrlozte/p/4402234.html
Copyright © 2011-2022 走看看