winmsg.odl

来自「The code for this article was written fo」· ODL 代码 · 共 1,002 行 · 第 1/3 页

ODL
1,002
字号
        int       cy;
        int       cx;
        int       y;
        int       x;
        LONG      style;
        LPCSTR    lpszName;
        LPCSTR    lpszClass;
        DWORD     dwExStyle;
    } CREATESTRUCT;
    typedef CREATESTRUCT FAR* LPCREATESTRUCT;
    */

    const int WM_DESTROY       = 0x0002;
    const int WM_NCDESTROY     = 0x0082;

    const int WM_SETTEXT       = 0x000C;
    const int WM_GETTEXT       = 0x000D;
    const int WM_GETTEXTLENGTH =    0x000E;

    const int WM_SETREDRAW     = 0x000B;

    const int WM_ENABLE            = 0x000A;

    const int WM_WINDOWPOSCHANGING = 0x0046;
    const int WM_WINDOWPOSCHANGED  = 0x0047;

    /* Omit WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
    typedef struct tagWINDOWPOS
    {
        HWND    hwnd;
        HWND    hwndInsertAfter;
        int     x;
        int     y;
        int     cx;
        int     cy;
        UINT    flags;
    } WINDOWPOS;
    typedef WINDOWPOS FAR* LPWINDOWPOS;
    */

    const int WM_MOVE          = 0x0003;
    const int WM_SIZE          = 0x0005;

    // WM_SIZE message wParam values
    const int SIZE_RESTORED    = 0;
    const int SIZE_MINIMIZED   =       1;
    const int SIZE_MAXIMIZED   =       2;
    const int SIZE_MAXSHOW     = 3;
    const int SIZE_MAXHIDE     = 4;

    const int WM_QUERYOPEN     = 0x0013;
    const int WM_CLOSE     = 0x0010;

    /* Omit Struct pointed to by WM_GETMINMAXINFO lParam
    typedef struct tagMINMAXINFO
    {
        POINT ptReserved;
        POINT ptMaxSize;
        POINT ptMaxPosition;
        POINT ptMinTrackSize;
        POINT ptMaxTrackSize;
    } MINMAXINFO;
    */
    const int WM_GETMINMAXINFO =    0x0024;

    const int WM_PAINT          = 0x000F;
    const int WM_ERASEBKGND    = 0x0014;
    const int WM_ICONERASEBKGND =   0x0027;


    // ****** Non-client window area management ********

    const int WM_NCPAINT       = 0x0085;

    const int WM_NCCALCSIZE    = 0x0083;

    // WM_NCCALCSIZE return flags
    const int WVR_ALIGNTOP     = 0x0010;
    const int WVR_ALIGNLEFT    = 0x0020;
    const int WVR_ALIGNBOTTOM  =    0x0040;
    const int WVR_ALIGNRIGHT   =       0x0080;
    const int WVR_HREDRAW      = 0x0100;
    const int WVR_VREDRAW      = 0x0200;
    const int WVR_REDRAW       = 0x0300; // (WVR_HREDRAW | WVR_VREDRAW);
    const int WVR_VALIDRECTS   =       0x0400;


    /* WM_NCCALCSIZE parameter structure
    typedef struct tagNCCALCSIZE_PARAMS
    {
        RECT       rgrc[3];
        WINDOWPOS FAR* lppos;
    } NCCALCSIZE_PARAMS;
    typedef struct tagNCCALCSIZE_PARAMS
    {
        RECT    rgrc[2];
    } NCCALCSIZE_PARAMS;
    typedef NCCALCSIZE_PARAMS FAR* LPNCCALCSIZE_PARAMS;
    */

    const int WM_NCHITTEST     = 0x0084;

    // WM_NCHITTEST return codes
    const int HTERROR       = -2;
    const int HTTRANSPARENT = -1;
    const int HTNOWHERE     = 0;
    const int HTCLIENT      = 1;
    const int HTCAPTION     = 2;
    const int HTSYSMENU     = 3;
    const int HTSIZE        = 4;
    const int HTMENU        = 5;
    const int HTHSCROLL     = 6;
    const int HTVSCROLL     = 7;
    const int HTMINBUTTON   = 8;
    const int HTMAXBUTTON   = 9;
    const int HTLEFT        = 10;
    const int HTRIGHT       = 11;
    const int HTTOP         = 12;
    const int HTTOPLEFT     = 13;
    const int HTTOPRIGHT    = 14;
    const int HTBOTTOM      = 15;
    const int HTBOTTOMLEFT  = 16;
    const int HTBOTTOMRIGHT = 17;
    const int HTBORDER      = 18;
    const int HTGROWBOX     = 4; // HTSIZE;
    const int HTREDUCE      = 8; // HTMINBUTTON;
    const int HTZOOM        = 9; // HTMAXBUTTON;

    // *******  Drag-and-drop support *******

    const int WM_QUERYDRAGICON =    0x0037;
    const int WM_DROPFILES     = 0x0233;

    // WM_ACTIVATE state values
    const int WA_INACTIVE      = 0;
    const int WA_ACTIVE       = 1;
    const int WA_CLICKACTIVE   =       2;

    const int WM_ACTIVATE      = 0x0006;
    const int WM_ACTIVATEAPP   =       0x001C;
    const int WM_NCACTIVATE    = 0x0086;

    const int WM_SETFOCUS      = 0x0007;
    const int WM_KILLFOCUS     = 0x0008;

    const int WM_KEYDOWN       = 0x0100;
    const int WM_KEYUP         = 0x0101;

    const int WM_CHAR          = 0x0102;
    const int WM_DEADCHAR      = 0x0103;

    const int WM_SYSKEYDOWN    = 0x0104;
    const int WM_SYSKEYUP      = 0x0105;

    const int WM_SYSCHAR       = 0x0106;
    const int WM_SYSDEADCHAR   = 0x0107;


    // Keyboard message range
    const int WM_KEYFIRST      = 0x0100;
    const int WM_KEYLAST       = 0x0108;

    // WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
    const long KF_EXTENDED     = 0x0100;
    const long KF_DLGMODE      = 0x0800;
    const long KF_MENUMODE     = 0x1000;
    const long KF_ALTDOWN      = 0x2000;
    const long KF_REPEAT       = 0x4000;
    const long KF_UP           = 0x8000;

    // Mouse input messages
    const int WM_MOUSEMOVE     = 0x0200;
    const int WM_LBUTTONDOWN   =       0x0201;
    const int WM_LBUTTONUP     = 0x0202;
    const int WM_LBUTTONDBLCLK =    0x0203;
    const int WM_RBUTTONDOWN   =       0x0204;
    const int WM_RBUTTONUP     = 0x0205;
    const int WM_RBUTTONDBLCLK =    0x0206;
    const int WM_MBUTTONDOWN   =       0x0207;
    const int WM_MBUTTONUP     = 0x0208;
    const int WM_MBUTTONDBLCLK =    0x0209;

    // Mouse input message range
    const int WM_MOUSEFIRST    = 0x0200;
    const int WM_MOUSELAST     = 0x0209;

    // Mouse message wParam key states
    const int MK_LBUTTON       = 0x0001;
    const int MK_RBUTTON       = 0x0002;
    const int MK_SHIFT         = 0x0004;
    const int MK_CONTROL       = 0x0008;
    const int MK_MBUTTON       = 0x0010;

    // Non-client mouse messages
    const int WM_NCMOUSEMOVE      = 0x00A0;
    const int WM_NCLBUTTONDOWN    = 0x00A1;
    const int WM_NCLBUTTONUP      = 0x00A2;
    const int WM_NCLBUTTONDBLCLK  = 0x00A3;
    const int WM_NCRBUTTONDOWN    = 0x00A4;
    const int WM_NCRBUTTONUP      = 0x00A5;
    const int WM_NCRBUTTONDBLCLK  = 0x00A6;
    const int WM_NCMBUTTONDOWN    = 0x00A7;
    const int WM_NCMBUTTONUP      = 0x00A8;
    const int WM_NCMBUTTONDBLCLK  = 0x00A9;

    // Mouse click activation support
    const int WM_MOUSEACTIVATE =    0x0021;

    // WM_MOUSEACTIVATE return codes
    const int MA_ACTIVATE      = 1;
    const int MA_ACTIVATEANDEAT =   2;
    const int MA_NOACTIVATE    = 3;
    const int MA_NOACTIVATEANDEAT = 4;

    // ****** Mode control *********

    const int WM_CANCELMODE    = 0x001F;

    const int WM_TIMER     = 0x0113;

    // Menu messages
    const int WM_INITMENU      = 0x0116;
    const int WM_INITMENUPOPUP =    0x0117;

    const int WM_MENUSELECT    = 0x011F;
    const int WM_MENUCHAR      = 0x0120;


    // Menu and control command messages
    const int WM_COMMAND       = 0x0111;

    // ****** Scroll bar support ***

    const int WM_HSCROLL       = 0x0114;
    const int WM_VSCROLL       = 0x0115;

    // WM_H/VSCROLL commands
    const int SB_LINEUP        = 0;
    const int SB_LINELEFT      = 0;
    const int SB_LINEDOWN      = 1;
    const int SB_LINERIGHT     = 1;
    const int SB_PAGEUP        = 2;
    const int SB_PAGELEFT      = 2;
    const int SB_PAGEDOWN      = 3;
    const int SB_PAGERIGHT     = 3;
    const int SB_THUMBPOSITION = 4;
    const int SB_THUMBTRACK    = 5;
    const int SB_TOP           = 6;
    const int SB_LEFT          = 6;
    const int SB_BOTTOM        = 7;
    const int SB_RIGHT         = 7;
    const int SB_ENDSCROLL     = 8;

    // Clipboard command messages
    const int WM_CUT           = 0x0300;
    const int WM_COPY          = 0x0301;
    const int WM_PASTE         = 0x0302;
    const int WM_CLEAR         = 0x0303;
    const int WM_UNDO          = 0x0304;

    // Clipboard owner messages
    const int WM_RENDERFORMAT     = 0x0305;
    const int WM_RENDERALLFORMATS = 0x0306;
    const int WM_DESTROYCLIPBOARD = 0x0307;

    // Clipboard viewer messages
    const int WM_DRAWCLIPBOARD    = 0x0308;
    const int WM_PAINTCLIPBOARD   = 0x0309;
    const int WM_SIZECLIPBOARD    = 0x030B;
    const int WM_VSCROLLCLIPBOARD = 0x030A;
    const int WM_HSCROLLCLIPBOARD = 0x030E;
    const int WM_ASKCBFORMATNAME  = 0x030C;
    const int WM_CHANGECBCHAIN    = 0x030D;

    const int WM_SETCURSOR     = 0x0020;

    // ****** WM_SYSCOMMAND support

    const int WM_SYSCOMMAND = 0x0112;


    // System Menu Command Values
    const long SC_SIZE      = 0xF000;
    const long SC_MOVE      = 0xF010;
    const long SC_MINIMIZE  = 0xF020;
    const long SC_MAXIMIZE  = 0xF030;
    const long SC_NEXTWINDOW = 0xF040;
    const long SC_PREVWINDOW = 0xF050;
    const long SC_CLOSE     = 0xF060;
    const long SC_VSCROLL   = 0xF070;
    const long SC_HSCROLL   = 0xF080;
    const long SC_MOUSEMENU = 0xF090;
    const long SC_KEYMENU   = 0xF100;
    const long SC_ARRANGE   = 0xF110;
    const long SC_RESTORE   = 0xF120;
    const long SC_TASKLIST  = 0xF130;
    const long SC_SCREENSAVE = 0xF140;
    const long SC_HOTKEY    = 0xF150;

    /* Obsolete names
    const int SC_ICON       = SC_MINIMIZE;
    const int SC_ZOOM       = SC_MAXIMIZE;
    */

    // MDI messages
    const int WM_MDICREATE      = 0x0220;
    const int WM_MDIDESTROY     = 0x0221;
    const int WM_MDIACTIVATE    = 0x0222;
    const int WM_MDIRESTORE     = 0x0223;
    const int WM_MDINEXT        = 0x0224;
    const int WM_MDIMAXIMIZE    = 0x0225;
    const int WM_MDITILE        = 0x0226;
    const int WM_MDICASCADE     = 0x0227;
    const int WM_MDIICONARRANGE = 0x0228;
    const int WM_MDIGETACTIVE   = 0x0229;
    const int WM_MDISETMENU     = 0x0230;

    /* WM_MDICREATE message structure
    typedef struct tagMDICREATESTRUCT
    {
        LPCSTR  szClass;
        LPCSTR  szTitle;
        HINSTANCE hOwner;
        int     x;
        int     y;
        int     cx;
        int     cy;
        DWORD   style;
        LPARAM  lParam;
    } MDICREATESTRUCT;
    typedef MDICREATESTRUCT FAR*  LPMDICREATESTRUCT;
    */

    // wParam values for WM_MDITILE and WM_MDICASCADE messages.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?