好文档 - 专业文书写作范文服务资料分享网站

C#版本常用Windows消息定义 

天下 分享 时间: 加入收藏 我要投稿 点赞

using System;

using System.Collections.Generic; using System.Text;

namespace Zkht.DirectUI.Native {

///

/// win32消息及其他常量定义 ///

publicstaticclassNativeConst {

publicconstint WM_CREATE = 0x0001; publicconstint WM_DESTROY = 0x0002; publicconstint WM_MOVE = 0x0003; publicconstint WM_SIZE = 0x0005; publicconstint WM_ACTIVATE = 0x0006; publicconstint WM_SETFOCUS = 0x0007; publicconstint WM_KILLFOCUS = 0x0008; publicconstint WM_ENABLE = 0x000A; publicconstint WM_SETREDRAW = 0x000B; publicconstint WM_SETTEXT = 0x000C; publicconstint WM_GETTEXT = 0x000D; publicconstint WM_GETTEXTLENGTH = 0x000E; publicconstint WM_PAINT = 0x000F; publicconstint WM_CLOSE = 0x0010; publicconstint WM_QUERYENDSESSION = 0x0011; publicconstint WM_QUIT = 0x0012; publicconstint WM_QUERYOPEN = 0x0013; publicconstint WM_ERASEBKGND = 0x0014; publicconstint WM_SYSCOLORCHANGE = 0x0015; publicconstint WM_ENDSESSION = 0x0016; publicconstint WM_SHOWWINDOW = 0x0018; publicconstint WM_ACTIVATEAPP = 0x001C; publicconstint WM_FONTCHANGE = 0x001D; publicconstint WM_TIMECHANGE = 0x001E; publicconstint WM_CANCELMODE = 0x001F; publicconstint WM_SETCURSOR = 0x0020; publicconstint WM_MOUSEACTIVATE = 0x0021; publicconstint WM_CHILDACTIVATE = 0x0022; publicconstint WM_QUEUESYNC = 0x0023; publicconstint WM_GETMINMAXINFO = 0x0024; publicconstint WM_PAINTICON = 0x0026; publicconstint WM_ICONERASEBKGND = 0x0027;

publicconstint WM_NEXTDLGCTL = 0x0028; publicconstint WM_SPOOLERSTATUS = 0x002A; publicconstint WM_DRAWITEM = 0x002B; publicconstint WM_MEASUREITEM = 0x002C; publicconstint WM_VKEYTOITEM = 0x002E; publicconstint WM_CHARTOITEM = 0x002F; publicconstint WM_SETFONT = 0x0030; publicconstint WM_GETFONT = 0x0031; publicconstint WM_SETHOTKEY = 0x0032; publicconstint WM_GETHOTKEY = 0x0033; publicconstint WM_QUERYDRAGICON = 0x0037; publicconstint WM_COMPAREITEM = 0x0039; publicconstint WM_COMPACTING = 0x0041; publicconstint WM_WINDOWPOSCHANGING = 0x0046; publicconstint WM_WINDOWPOSCHANGED = 0x0047; publicconstint WM_POWER = 0x0048; publicconstint WM_COPYDATA = 0x004A; publicconstint WM_CANCELJOURNA = 0x004B; publicconstint WM_NOTIFY = 0x004E;

publicconstint WM_INPUTLANGCHANGEREQUEST = 0x0050; publicconstint WM_INPUTLANGCHANGE = 0x0051; publicconstint WM_TCARD = 0x0052; publicconstint WM_HELP = 0x0053; publicconstint WM_USERCHANGED = 0x0054; publicconstint WM_NOTIFYFORMAT = 0x0055; publicconstint WM_CONTEXTMENU = 0x007B; publicconstint WM_STYLECHANGING = 0x007C; publicconstint WM_STYLECHANGED = 0x007D; publicconstint WM_DISPLAYCHANGE = 0x007E; publicconstint WM_GETICON = 0x007F; publicconstint WM_SETICON = 0x0080; publicconstint WM_NCCREATE = 0x0081; publicconstint WM_NCDESTROY = 0x0082; publicconstint WM_NCCALCSIZE = 0x0083; publicconstint WM_NCHITTEST = 0x0084; publicconstint WM_NCPAINT = 0x0085; publicconstint WM_NCACTIVATE = 0x0086; publicconstint WM_GETDLGCODE = 0x0087; publicconstint WM_NCMOUSEMOVE = 0x00A0; publicconstint WM_NCLBUTTONDOWN = 0x00A1; publicconstint WM_NCLBUTTONUP = 0x00A2; publicconstint WM_NCLBUTTONDBLCLK = 0x00A3; publicconstint WM_NCRBUTTONDOWN = 0x00A4; publicconstint WM_NCRBUTTONUP = 0x00A5;

publicconstint WM_NCRBUTTONDBLCLK = 0x00A6; publicconstint WM_NCMBUTTONDOWN = 0x00A7; publicconstint WM_NCMBUTTONUP = 0x00A8; publicconstint WM_NCMBUTTONDBLCLK = 0x00A9; publicconstint WM_KEYFIRST = 0x0100; publicconstint WM_KEYUP = 0x0101; publicconstint WM_CHAR = 0x0102; publicconstint WM_DEADCHAR = 0x0103; publicconstint WM_SYSKEYDOWN = 0x0104; publicconstint WM_SYSKEYUP = 0x0105; publicconstint WM_SYSCHAR = 0x0106; publicconstint WM_SYSDEADCHAR = 0x0107; publicconstint WM_INITDIALOG = 0x0110; publicconstint WM_COMMAND = 0x0111; publicconstint WM_SYSCOMMAND = 0x0112; publicconstint WM_TIMER = 0x0113; publicconstint WM_HSCROLL = 0x0114; publicconstint WM_VSCROLL = 0x0115; publicconstint WM_INITMENU = 0x0116; publicconstint WM_INITMENUPOPUP = 0x0117; publicconstint WM_MENUSELECT = 0x011F; publicconstint WM_MENUCHAR = 0x0120; publicconstint WM_ENTERIDLE = 0x0121; publicconstint WM_CTLCOLORMSGBOX = 0x0132; publicconstint WM_CTLCOLOREDIT = 0x0133; publicconstint WM_CTLCOLORLISTBOX = 0x0134; publicconstint WM_CTLCOLORBTN = 0x0135; publicconstint WM_CTLCOLORDLG = 0x0136; publicconstint WM_CTLCOLORSCROLLBAR = 0x0137; publicconstint WM_CTLCOLORSTATIC = 0x0138; publicconstint WM_SHARED_MENU = 0x01E2; publicconstint WM_MOUSEFIRST = 0x0200; publicconstint WM_MOUSEMOVE = 0x0200; publicconstint WM_LBUTTONDOWN = 0x0201; publicconstint WM_LBUTTONUP = 0x0202; publicconstint WM_LBUTTONDBLCLK = 0x0203; publicconstint WM_RBUTTONDOWN = 0x0204; publicconstint WM_RBUTTONUP = 0x0205; publicconstint WM_RBUTTONDBLCLK = 0x0206; publicconstint WM_MBUTTONDOWN = 0x0207; publicconstint WM_MBUTTONUP = 0x0208; publicconstint WM_MBUTTONDBLCLK = 0x0209; publicconstint WM_MOUSEWHEEL = 0x020A; publicconstint WM_PRINT = 0x0317;

publicconstint HC_ACTION = 0; publicconstint WH_CALLWNDPROC = 4;

//LONG GetWindowLong(HWND hWnd,int nlndex)函数nIndex取值,以及

//LONG SetWindowLong(HWND hWnd,int nlndex,LONG dwNewLong)函数nIndex取值 publicconstint GWL_EXSTYLE = -20; publicconstint GWL_STYLE = -16; publicconstint GWL_WNDPROC = -4; publicconstint GWL_HINSTANCE = -6; publicconstint GWL_HWNDPARENT = -8; publicconstint GWL_ID = -12; publicconstint GWL_USERDATA = -21; //在hWnd参数标识了一个对话框时也可用下列值: publicconstint DWL_DLGPROC = 4; publicconstint DWL_MSGRESULT = 0; publicconstint DWL_USER = 8;

//Extended Window Styles

publicconstlong WS_EX_ACCEPTFILES = 0x00000010; publicconstlong WS_EX_APPWINDOW = 0x00040000; publicconstlong WS_EX_CLIENTEDGE = 0x00000200; publicconstlong WS_EX_COMPOSITED = 0x02000000; publicconstlong WS_EX_CONTEXTHELP = 0x00000400; publicconstlong WS_EX_CONTROLPARENT = 0x00010000; publicconstlong WS_EX_DLGMODALFRAME = 0x00000001; publicconstlong WS_EX_LAYERED = 0x00080000; publicconstlong WS_EX_LAYOUTRTL = 0x00400000; publicconstlong WS_EX_LEFT = 0x00000000; publicconstlong WS_EX_LEFTSCROLLBAR = 0x00004000; publicconstlong WS_EX_LTRREADING = 0x00000000; publicconstlong WS_EX_MDICHILD = 0x00000040; publicconstlong WS_EX_NOACTIVATE = 0x08000000; publicconstlong WS_EX_NOINHERITLAYOUT = 0x00100000; publicconstlong WS_EX_NOPARENTNOTIFY = 0x00000004; publicconstlong WS_EX_NOREDIRECTIONBITMAP = 0x00200000;

publicconstlong WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE); publicconstlong WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST);

publicconstlong WS_EX_RIGHT = 0x00001000; publicconstlong WS_EX_RIGHTSCROLLBAR = 0x00000000;

publicconstlong WS_EX_RTLREADING = 0x00002000; publicconstlong WS_EX_STATICEDGE = 0x00020000; publicconstlong WS_EX_TOOLWINDOW = 0x00000080; publicconstlong WS_EX_TOPMOST = 0x00000008; publicconstlong WS_EX_TRANSPARENT = 0x00000020; publicconstlong WS_EX_WINDOWEDGE = 0x00000100; //Window Styles

publicconstlong WS_BORDER = 0x00800000; publicconstlong WS_CAPTION = 0x00C00000; publicconstlong WS_CHILD = 0x40000000; publicconstlong WS_CHILDWINDOW = 0x40000000; publicconstlong WS_CLIPCHILDREN = 0x02000000; publicconstlong WS_CLIPSIBLINGS = 0x04000000; publicconstlong WS_DISABLED = 0x08000000; publicconstlong WS_DLGFRAME = 0x00400000; publicconstlong WS_GROUP = 0x00020000; publicconstlong WS_HSCROLL = 0x00100000; publicconstlong WS_ICONIC = 0x20000000; publicconstlong WS_MAXIMIZE = 0x01000000; publicconstlong WS_MAXIMIZEBOX = 0x00010000; publicconstlong WS_MINIMIZE = 0x20000000; publicconstlong WS_MINIMIZEBOX = 0x00020000; publicconstlong WS_OVERLAPPED = 0x00000000;

publicconstlong WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);

publicconstlong WS_POPUP = 0x80000000;

publicconstlong WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU);

publicconstlong WS_SIZEBOX = 0x00040000; publicconstlong WS_SYSMENU = 0x00080000; publicconstlong WS_TABSTOP = 0x00010000; publicconstlong WS_THICKFRAME = 0x00040000; publicconstlong WS_TILED = 0x00000000;

publicconstlong WS_TILEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX); publicconstlong WS_VISIBLE = 0x10000000; publicconstlong WS_VSCROLL = 0x00200000;

publicconstint GW_HWNDFIRST = 0; publicconstint GW_HWNDLAST = 1; publicconstint GW_HWNDNEXT = 2; publicconstint GW_HWNDPREV = 3;

C#版本常用Windows消息定义 

usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceZkht.DirectUI.Native{//////win32消息及其他常量定义///publicstaticcl
推荐度:
点击下载文档文档为doc格式
7znwk0vjat6ehs74cpbm
领取福利

微信扫码领取福利

微信扫码分享