winmsg.odl

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

ODL
1,002
字号
    const int MDITILE_VERTICAL      = 0x0000;
    const int MDITILE_HORIZONTAL    = 0x0001;
    const int MDITILE_SKIPDISABLED  = 0x0002;

    const int WM_CHILDACTIVATE =    0x0022;

    // Dialog notification messages
    const int WM_INITDIALOG    = 0x0110;
    const int WM_NEXTDLGCTL    = 0x0028;

    const int WM_PARENTNOTIFY  =    0x0210;

    const int WM_ENTERIDLE     = 0x0121;

    const int WM_GETDLGCODE    = 0x0087;

    // dialog codes
    const int DLGC_WANTARROWS       = 0x0001;
    const int DLGC_WANTTAB          = 0x0002;
    const int DLGC_WANTALLKEYS      = 0x0004;
    const int DLGC_WANTMESSAGE      = 0x0004;
    const int DLGC_HASSETSEL        = 0x0008;
    const int DLGC_DEFPUSHBUTTON    = 0x0010;
    const int DLGC_UNDEFPUSHBUTTON  = 0x0020;
    const int DLGC_RADIOBUTTON      = 0x0040;
    const int DLGC_WANTCHARS        = 0x0080;
    const int DLGC_STATIC           = 0x0100;
    const int DLGC_BUTTON           = 0x2000;

    const int WM_CTLCOLOR      = 0x0019;

    // WM_CTLCOLOR control IDs
    const int CTLCOLOR_MSGBOX  =    0;
    const int CTLCOLOR_EDIT    = 1;
    const int CTLCOLOR_LISTBOX =    2;
    const int CTLCOLOR_BTN     = 3;
    const int CTLCOLOR_DLG     = 4;
    const int CTLCOLOR_SCROLLBAR  = 5;
    const int CTLCOLOR_STATIC     = 6;

    const int WM_SETFONT       =        0x0030;
    const int WM_GETFONT       = 0x0031;

    const int WM_DRAWITEM      =    0x002B;

    /*
    typedef struct tagDRAWITEMSTRUCT
    {
        UINT        CtlType;
        UINT        CtlID;
        UINT        itemID;
        UINT        itemAction;
        UINT        itemState;
        HWND    hwndItem;
        HDC     hDC;
        RECT    rcItem;
        DWORD       itemData;
    } DRAWITEMSTRUCT;
    typedef DRAWITEMSTRUCT NEAR* PDRAWITEMSTRUCT;
    typedef DRAWITEMSTRUCT FAR* LPDRAWITEMSTRUCT;
    */

    const int WM_MEASUREITEM   =        0x002C;

    /*
    typedef struct tagMEASUREITEMSTRUCT
    {
        UINT        CtlType;
        UINT        CtlID;
        UINT        itemID;
        UINT        itemWidth;
        UINT        itemHeight;
        DWORD       itemData;
    } MEASUREITEMSTRUCT;
    typedef MEASUREITEMSTRUCT NEAR* PMEASUREITEMSTRUCT;
    typedef MEASUREITEMSTRUCT FAR* LPMEASUREITEMSTRUCT;
    */

    const int WM_DELETEITEM    =    0x002D;

    /*
    typedef struct tagDELETEITEMSTRUCT
    {
        UINT       CtlType;
        UINT       CtlID;
        UINT       itemID;
        HWND       hwndItem;
        DWORD      itemData;
    } DELETEITEMSTRUCT;
    typedef DELETEITEMSTRUCT NEAR* PDELETEITEMSTRUCT;
    typedef DELETEITEMSTRUCT FAR* LPDELETEITEMSTRUCT;
    */

    const int WM_COMPAREITEM   =       0x0039;

    /*
    typedef struct tagCOMPAREITEMSTRUCT
    {
        UINT        CtlType;
        UINT        CtlID;
        HWND    hwndItem;
        UINT        itemID1;
        DWORD       itemData1;
        UINT        itemID2;
        DWORD       itemData2;
    } COMPAREITEMSTRUCT;
    typedef COMPAREITEMSTRUCT NEAR* PCOMPAREITEMSTRUCT;
    typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
    */

    // Button Control Messages
    #ifdef WIN32
    #define BM_FIRST 0xF0
    #else
    #define BM_FIRST WM_USER
    #endif
    const int BM_GETCHECK		= BM_FIRST+0x0;
    const int BM_SETCHECK		= BM_FIRST+0x1;
    const int BM_GETSTATE		= BM_FIRST+0x2;
    const int BM_SETSTATE		= BM_FIRST+0x3;
    const int BM_SETSTYLE		= BM_FIRST+0x4;
	#ifdef WIN32				
    const int BM_CLICK			= BM_FIRST+0x5;
    const int BM_GETIMAGE		= BM_FIRST+0x6;
    const int BM_SETIMAGE		= BM_FIRST+0x7;
	#endif

    // User Button Notification Codes
    const int BN_CLICKED       = 0;
    const int BN_PAINT         = 1;
    const int BN_HILITE        = 2;
    const int BN_UNHILITE      = 3;
    const int BN_DISABLE       = 4;
    const int BN_DOUBLECLICKED = 5;

    // Edit control messages
    #ifdef WIN32
    #define EM_FIRST 0xB0
    #else
    #define EM_FIRST WM_USER
    #endif
    const int EM_GETSEL        = EM_FIRST+0x0;
    const int EM_SETSEL        = EM_FIRST+0x1;
    const int EM_GETRECT       = EM_FIRST+0x2;
    const int EM_SETRECT       = EM_FIRST+0x3;
    const int EM_SETRECTNP     = EM_FIRST+0x4;
    const int EM_LINESCROLL    = EM_FIRST+0x6;
    const int EM_GETMODIFY     = EM_FIRST+0x8;
    const int EM_SETMODIFY     = EM_FIRST+0x9;
    const int EM_GETLINECOUNT  = EM_FIRST+0xA;
    const int EM_LINEINDEX     = EM_FIRST+0xB;
    const int EM_SETHANDLE     = EM_FIRST+0xC;
    const int EM_GETHANDLE     = EM_FIRST+0xD;
    const int EM_GETTHUMB      = EM_FIRST+0xE;
    const int EM_LINELENGTH    = EM_FIRST+0x11;
    const int EM_REPLACESEL    = EM_FIRST+0x12;
    const int EM_SETFONT       = EM_FIRST+0x13;   // NOT IMPLEMENTED: use WM_SETFONT
    const int EM_GETLINE       = EM_FIRST+0x14;
    const int EM_LIMITTEXT     = EM_FIRST+0x15;
    const int EM_SETLIMITTEXT  = EM_FIRST+0x15;   // Win40 Name change
    const int EM_CANUNDO       = EM_FIRST+0x16;
    const int EM_UNDO          = EM_FIRST+0x17;
    const int EM_FMTLINES      = EM_FIRST+0x18;
    const int EM_LINEFROMCHAR  = EM_FIRST+0x19;
    const int EM_SETWORDBREAK  = EM_FIRST+0x1A;   // NOT IMPLEMENTED: use EM_SETWORDBREAK
    const int EM_SETTABSTOPS   = EM_FIRST+0x1B;
    const int EM_SETPASSWORDCHAR     = EM_FIRST+0x1C;
    const int EM_EMPTYUNDOBUFFER     = EM_FIRST+0x1D;
    const int EM_GETFIRSTVISIBLELINE = EM_FIRST+0x1E;
    const int EM_SETREADONLY         = EM_FIRST+0x1F;
    const int EM_SETWORDBREAKPROC    = EM_FIRST+0x20;
    const int EM_GETWORDBREAKPROC    = EM_FIRST+0x21;
    const int EM_GETPASSWORDCHAR     = EM_FIRST+0x22;
	#ifdef WIN32
	const int EM_SETMARGINS          = EM_FIRST+0x23;
	const int EM_GETMARGINS          = EM_FIRST+ 0x24;
	const int EM_GETLIMITTEXT        = EM_FIRST+ 0x25;
	const int EM_POSFROMCHAR         = EM_FIRST+ 0x26;
	const int EM_CHARFROMPOS         = EM_FIRST+ 0x27;
	#endif

    // typedef int  (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code);

    // EDITWORDBREAKPROC code values
    const int WB_LEFT         = 0;
    const int WB_RIGHT        = 1;
    const int WB_ISDELIMITER  = 2;

    // Edit control notification codes
    const int EN_SETFOCUS      = 0x0100;
    const int EN_KILLFOCUS     = 0x0200;
    const int EN_CHANGE        = 0x0300;
    const int EN_UPDATE        = 0x0400;
    const int EN_ERRSPACE      = 0x0500;
    const int EN_MAXTEXT       = 0x0501;
    const int EN_HSCROLL       = 0x0601;
    const int EN_VSCROLL       = 0x0602;

    // Listbox messages
    #ifdef WIN32
    #define LB_FIRST 0x180
    #else
    #define LB_FIRST WM_USER + 1
    #endif
    const int LB_ADDSTRING		= LB_FIRST+0x0;
    const int LB_INSERTSTRING	= LB_FIRST+0x1;
    const int LB_DELETESTRING	= LB_FIRST+0x2;
    const int LB_SELITEMRANGEEX	= LB_FIRST+0x3;
    const int LB_RESETCONTENT	= LB_FIRST+0x4;
    const int LB_SETSEL			= LB_FIRST+0x5;
    const int LB_SETCURSEL		= LB_FIRST+0x6;
    const int LB_GETSEL			= LB_FIRST+0x7;
    const int LB_GETCURSEL		= LB_FIRST+0x8;
    const int LB_GETTEXT		= LB_FIRST+0x9;
    const int LB_GETTEXTLEN		= LB_FIRST+0xA;
    const int LB_GETCOUNT		= LB_FIRST+0xB;
    const int LB_SELECTSTRING	= LB_FIRST+0xC;
    const int LB_DIR			= LB_FIRST+0xD;
    const int LB_GETTOPINDEX	= LB_FIRST+0xE;
    const int LB_FINDSTRING		= LB_FIRST+0xF;
    const int LB_GETSELCOUNT	= LB_FIRST+0x10;
    const int LB_GETSELITEMS	= LB_FIRST+0x11;
    const int LB_SETTABSTOPS	= LB_FIRST+0x12;
    const int LB_GETHORIZONTALEXTENT = LB_FIRST+0x13;
    const int LB_SETHORIZONTALEXTENT = LB_FIRST+0x14;
    const int LB_SETCOLUMNWIDTH	= LB_FIRST+0x15;
    const int LB_ADDFILE		= LB_FIRST+0x16;
    const int LB_SETTOPINDEX	= LB_FIRST+0x17;
    const int LB_GETITEMRECT	= LB_FIRST+0x18;
    const int LB_GETITEMDATA	= LB_FIRST+0x19;
    const int LB_SETITEMDATA	= LB_FIRST+0x1A;
    const int LB_SELITEMRANGE	= LB_FIRST+0x1B;
    const int LB_SETANCHORINDEX	= LB_FIRST+0x1C;
    const int LB_GETANCHORINDEX	= LB_FIRST+0x1D;
    const int LB_SETCARETINDEX	= LB_FIRST+0x1E;
    const int LB_GETCARETINDEX	= LB_FIRST+0x1F;
    const int LB_SETITEMHEIGHT	= LB_FIRST+0x20;
    const int LB_GETITEMHEIGHT  = LB_FIRST+0x21;
    const int LB_FINDSTRINGEXACT= LB_FIRST+0x22;
    #ifdef WIN32
    const int LB_SETLOCALE      = LB_FIRST+0x25;
    const int LB_GETLOCALE      = LB_FIRST+0x26;
    const int LB_SETCOUNT		= LB_FIRST+0x27;
    const int LB_INITSTORAGE	= LB_FIRST+0x28;
    const int LB_ITEMFROMPOINT	= LB_FIRST+0x29;
    #endif

    // Listbox notification codes
    const int LBN_ERRSPACE     = -2;
    const int LBN_SELCHANGE    = 1;
    const int LBN_DBLCLK       = 2;
    const int LBN_SELCANCEL    = 3;
    const int LBN_SETFOCUS     = 4;
    const int LBN_KILLFOCUS    = 5;

    // Listbox notification messages
    const int WM_VKEYTOITEM    =    0x002E;
    const int WM_CHARTOITEM    =    0x002F;

    // Listbox message return values
    const int LB_OKAY          = 0;
    const int LB_ERR           = -1;
    const int LB_ERRSPACE      = -2;

    const long LB_CTLCODE      = 0;

    // Combo box messages
    #ifdef WIN32
    #define CB_FIRST 0x140
    #else
    #define CB_FIRST WM_USER
    #endif
    const int CB_GETEDITSEL    = CB_FIRST+0x0;
    const int CB_LIMITTEXT     = CB_FIRST+0x1;
    const int CB_SETEDITSEL    = CB_FIRST+0x2;
    const int CB_ADDSTRING     = CB_FIRST+0x3;
    const int CB_DELETESTRING  = CB_FIRST+0x4;
    const int CB_DIR           = CB_FIRST+0x5;
    const int CB_GETCOUNT      = CB_FIRST+0x6;
    const int CB_GETCURSEL     = CB_FIRST+0x7;
    const int CB_GETLBTEXT     = CB_FIRST+0x8;
    const int CB_GETLBTEXTLEN  = CB_FIRST+0x9;
    const int CB_INSERTSTRING  = CB_FIRST+0xA;
    const int CB_RESETCONTENT  = CB_FIRST+0xB;
    const int CB_FINDSTRING    = CB_FIRST+0xC;
    const int CB_SELECTSTRING  = CB_FIRST+0xD;
    const int CB_SETCURSEL     = CB_FIRST+0xE;
    const int CB_SHOWDROPDOWN  = CB_FIRST+0xF;
    const int CB_GETITEMDATA   = CB_FIRST+0x10;
    const int CB_SETITEMDATA   = CB_FIRST+0x11;
    const int CB_GETDROPPEDCONTROLRECT = CB_FIRST+0x12;
    const int CB_SETITEMHEIGHT = CB_FIRST+0x13;
    const int CB_GETITEMHEIGHT = CB_FIRST+0x14;
    const int CB_SETEXTENDEDUI = CB_FIRST+0x15;
    const int CB_GETEXTENDEDUI = CB_FIRST+0x16;
    const int CB_GETDROPPEDSTATE = CB_FIRST+0x17;
    const int CB_FINDSTRINGEXACT = CB_FIRST+0x18;

    #ifdef WIN32
    const int CB_SETLOCALE     = CB_FIRST+0x19;
    const int CB_GETLOCALE     = CB_FIRST+0x1A;
	const int CB_GETTOPINDEX   = CB_FIRST+0x1B;
	const int CB_SETTOPINDEX   = CB_FIRST+0x1C;
	const int CB_GETHORIZONTALEXTENT	= CB_FIRST+0x1D;
	const int CB_SETHORIZONTALEXTENT    = CB_FIRST+0x1E;
	const int CB_GETDROPPEDWIDTH        = CB_FIRST+0x1F;
	const int CB_SETDROPPEDWIDTH        = CB_FIRST+0x20;
	const int CB_INITSTORAGE            = CB_FIRST+0x21;   
	#endif

    // Combo box notification codes
    const int CBN_ERRSPACE     = -1;
    const int CBN_SELCHANGE    = 1;
    const int CBN_DBLCLK       = 2;
    const int CBN_SETFOCUS     = 3;
    const int CBN_KILLFOCUS    = 4;
    const int CBN_EDITCHANGE   = 5;
    const int CBN_EDITUPDATE   = 6;
    const int CBN_DROPDOWN     = 7;
    const int CBN_CLOSEUP      = 8;
    const int CBN_SELENDOK     = 9;
    const int CBN_SELENDCANCEL = 10;

    // Combo box message return values
    const int CB_OKAY          = 0;
    const int CB_ERR           = -1;
    const int CB_ERRSPACE      = -2;

    const int WM_QUEUESYNC     = 0x0023;

    const int WM_COMMNOTIFY    = 0x0044;

}

⌨️ 快捷键说明

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