Messages.pas里的消息

时间:2022-08-28 08:25:51

一、Windows 消息大全

这张表拷贝自万一兄的帖子:http://www.cnblogs.com/del/archive/2008/02/25/1079970.html

但是我希望自己能把这些消息的注释都写上。特别简单的消息就不写了(否则反而无法一目了然),只写对我自己觉得值得注意的消息。我也没有整块的时间,有时间就每天写几个注释,就当是自己学习了。
说到底,常用的Windows消息就这么多,共233个,全部了解清楚的话对编程是很有帮助的。Win32标准控件的消息更是有限的。

二、Delphi 也自定义了一些消息, 分别是 CM_ 和 CN_ 打头。

三、常用问题:
1、参数wParam、lParam这2个参数有什么区别?
Delphi 就是把这两个消息参数重整为一个结构体,但对不同的消息, 消息参数的意义是不同的, 尽管有些规律但区别也很大。如果你能弄明白消息参数在每个消息中的不同意义, Windows 编程就算学会了大半了,事实上, 除了常用的消息外, 大部分消息都是即查(msdn 或 api 手册)即用:

Microsoft Win32 程序员参考大全(五) - 消息、结构和宏

参考:http://msdn.microsoft.com/zh-cn/library/

2、Perform、SendMessage、PostMessage的区别?

Perform、SendMessage会直接发送消息到窗体过程,PostMessage 是把消息放入消息队列。
因为 Application.OnMessage 只接收队列中的消息,所以 Perform、SendMessage 发送的消息, OnMessage 收不到。
Perform 和上面两个不同, 它是控件的一个方法, TControl 的子孙都有这个方法, TControl 之上的父类们不需要处理消息, 也没有消息要处理。
参考:http://www.cnblogs.com/del/archive/2008/10/28/1321490.html

3、TApplicationEvents.OnMessage 的第二个参数是什么意思:
参考:http://www.cnblogs.com/del/archive/2008/10/25/1319318.html

4、消息的发送过程:
参考:http://www.cnblogs.com/del/archive/2008/10/24/1318897.html

5、同一个消息可以有三个函数都响应它,但是它们是有先后顺序的:
参考:http://www.cnblogs.com/del/archive/2008/10/24/1319062.html

6、Delphi 7里Messages.pas里所有消息。

经统计,共104种重定义消息种类,方便使用,180种不同的消息名称。省得像VC里一样,处处自己解析wParam和LParam参数进行分析。有空我要把它们一个一个标注和学习一下。另外要强调一点:Delphi里所有的消息都没有包含Handle,Handle本身不是消息的一部分(VC里也是这样),除非有些消息要用到2个Handle。但是注意,另有TMsg结构,定义在windows.pas文件里。除此之外,还定义有 TEventMsg TCreateStruct 等许多结构,都是需要学习和注意的地方。

tagMSG = packed record
hwnd: HWND;
message: UINT;
wParam: WPARAM;
lParam: LPARAM;
time: DWORD;
pt: TPoint;
end;
TMsg = tagMSG;

// ====================正文开始======================================

PMessage = ^TMessage;
TMessage = packed record
Msg: Cardinal; // 无论什么消息,第一个成员都是消息编号(消息字符串名称所对应的编号)
case Integer of
0: (
WParam: Longint;
LParam: Longint;
Result: Longint); // 返回值
1: (
WParamLo: Word;
WParamHi: Word;
LParamLo: Word;
LParamHi: Word;
ResultLo: Word;  // 返回值
ResultHi: Word);
end;

{ Common message format records }

// 无论消息怎么重定义,总长度都是4个integer

TWMNoParams = packed record
Msg: Cardinal;
Unused: array[0..3] of Word;
Result: Longint;
end;

TWMKey = packed record // 按键
Msg: Cardinal;
CharCode: Word;
Unused: Word;
KeyData: Longint;
Result: Longint;
end;

TWMMouse = packed record // 鼠标
Msg: Cardinal;
Keys: Longint;
case Integer of
0: (
XPos: Smallint;
YPos: Smallint);
1: (
Pos: TSmallPoint;
Result: Longint);
end;

TWMMouseWheel = packed record // 鼠标滚轮
Msg: Cardinal;
Keys: SmallInt;
WheelDelta: SmallInt;
case Integer of
0: (
XPos: Smallint;
YPos: Smallint);
1: (
Pos: TSmallPoint;
Result: Longint);
end;

TMSHMouseWheel = packed record // MS鼠标滚轮
Msg: Cardinal;
WheelDelta: Integer;
case Integer of
0: (
XPos: Smallint;
YPos: Smallint);
1: (
Pos: TSmallPoint;
Result: Longint);
end;

TWMWindowPosMsg = packed record // 窗口位置
Msg: Cardinal;
Unused: Integer;
WindowPos: PWindowPos;
Result: Longint;
end;

TWMScroll = packed record // 滚动条消息
Msg: Cardinal;
ScrollCode: Smallint; { SB_xxxx }
Pos: Smallint;
ScrollBar: HWND;
Result: Longint;
end;

{ Message records }

TWMActivate = packed record
Msg: Cardinal;
Active: Word; { WA_INACTIVE, WA_ACTIVE, WA_CLICKACTIVE }
Minimized: WordBool;
ActiveWindow: HWND;
Result: Longint;
end;

TWMActivateApp = packed record
Msg: Cardinal;
Active: BOOL;
ThreadId: Longint;
Result: Longint;
end;

TWMAskCBFormatName = packed record
Msg: Cardinal;
NameLen: Word;
Unused: Word;
FormatName: PChar;
Result: Longint;
end;

TWMCancelMode = TWMNoParams;

TWMChangeCBChain = packed record // 难道是Hook消息?
Msg: Cardinal;
Remove: HWND;
Next: HWND;
Result: Longint;
end;

TWMChar = TWMKey;

TWMCharToItem = packed record
Msg: Cardinal;
Key: Word;
CaretPos: Word;
ListBox: HWND;
Result: Longint;
end;

TWMChildActivate = TWMNoParams;

TWMChooseFont_GetLogFont = packed record
Msg: Cardinal;
Unused: Longint;
LogFont: PLogFont;
Result: Longint;
end;

TWMClear = TWMNoParams;
TWMClose = TWMNoParams;

TWMCommand = packed record
Msg: Cardinal;
ItemID: Word;
NotifyCode: Word;
Ctl: HWND;
Result: Longint;
end;

TWMCompacting = packed record
Msg: Cardinal;
CompactRatio: Longint;
Unused: Longint;
Result: Longint;
end;

TWMCompareItem = packed record
Msg: Cardinal;
Ctl: HWnd;
CompareItemStruct: PCompareItemStruct;
Result: Longint;
end;

TWMCopy = TWMNoParams;

TWMCopyData = packed record
Msg: Cardinal;
From: HWND;
CopyDataStruct: PCopyDataStruct;
Result: Longint;
end;

{ ?? WM_CLP_LAUNCH, WM_CPL_LAUNCHED }

TWMCreate = packed record
Msg: Cardinal;
Unused: Integer;
CreateStruct: PCreateStruct;
Result: Longint;
end;

TWMCtlColor = packed record
Msg: Cardinal;
ChildDC: HDC;
ChildWnd: HWND;
Result: Longint;
end;

TWMCtlColorBtn = TWMCtlColor;
TWMCtlColorDlg = TWMCtlColor;
TWMCtlColorEdit = TWMCtlColor;
TWMCtlColorListbox = TWMCtlColor;
TWMCtlColorMsgbox = TWMCtlColor;
TWMCtlColorScrollbar = TWMCtlColor;
TWMCtlColorStatic = TWMCtlColor;

TWMCut = TWMNoParams;

TWMDDE_Ack = packed record
Msg: Cardinal;
PostingApp: HWND;
case Word of
WM_DDE_INITIATE: (
App: Word;
Topic: Word;
Result: Longint);
WM_DDE_EXECUTE {and all others}: (
PackedVal: Longint);
end;

TWMDDE_Advise = packed record
Msg: Cardinal;
PostingApp: HWND;
PackedVal: Longint;
Result: Longint;
end;

TWMDDE_Data = packed record
Msg: Cardinal;
PostingApp: HWND;
PackedVal: Longint;
Result: Longint;
end;

TWMDDE_Execute = packed record
Msg: Cardinal;
PostingApp: HWND;
Commands: THandle;
Result: Longint;
end;

TWMDDE_Initiate = packed record
Msg: Cardinal;
PostingApp: HWND;
App: Word;
Topic: Word;
Result: Longint;
end;

TWMDDE_Poke = packed record
Msg: Cardinal;
PostingApp: HWND;
PackedVal: Longint;
Result: Longint;
end;

TWMDDE_Request = packed record
Msg: Cardinal;
PostingApp: HWND;
Format: Word;
Item: Word;
Result: Longint;
end;

TWMDDE_Terminate = packed record
Msg: Cardinal;
PostingApp: HWND;
Unused: Longint;
Result: Longint;
end;

TWMDDE_Unadvise = packed record
Msg: Cardinal;
PostingApp: HWND;
Format: Word;
Item: Word;
Result: Longint;
end;

TWMDeadChar = TWMChar;

TWMDeleteItem = packed record
Msg: Cardinal;
Ctl: HWND;
DeleteItemStruct: PDeleteItemStruct;
Result: Longint;
end;

TWMDestroy = TWMNoParams;
TWMDestroyClipboard = TWMNoParams;

TWMDevModeChange = packed record
Msg: Cardinal;
Unused: Integer;
Device: PChar;
Result: Longint;
end;

TWMDrawClipboard = TWMNoParams;

TWMDrawItem = packed record
Msg: Cardinal;
Ctl: HWND;
DrawItemStruct: PDrawItemStruct;
Result: Longint;
end;

TWMDropFiles = packed record
Msg: Cardinal;
Drop: THANDLE;
Unused: Longint;
Result: Longint;
end;

TWMEnable = packed record
Msg: Cardinal;
Enabled: LongBool;
Unused: Longint;
Result: Longint;
end;

TWMEndSession = packed record
Msg: Cardinal;
EndSession: LongBool;
Unused: Longint;
Result: Longint;
end;

TWMEnterIdle = packed record
Msg: Cardinal;
Source: Longint; { MSGF_DIALOGBOX, MSGF_MENU }
IdleWnd: HWND;
Result: Longint;
end;

TWMEnterMenuLoop = packed record
Msg: Cardinal;
IsTrackPopupMenu: LongBool;
Unused: Longint;
Result: Longint;
end;

TWMExitMenuLoop = TWMEnterMenuLoop;

TWMEraseBkgnd = packed record // 擦除背景
Msg: Cardinal;
DC: HDC; // 已经含有DC句柄了
Unused: Longint;
Result: Longint;
end;

TWMFontChange = TWMNoParams;
TWMGetDlgCode = TWMNoParams;
TWMGetFont = TWMNoParams;

TWMGetIcon = packed record
Msg: Cardinal;
BigIcon: Longbool;
Unused: Longint;
Result: Longint;
end;

TWMGetHotKey = TWMNoParams;

TWMGetMinMaxInfo = packed record
Msg: Cardinal;
Unused: Integer;
MinMaxInfo: PMinMaxInfo;
Result: Longint;
end;

TWMGetText = packed record
Msg: Cardinal;
TextMax: Integer;
Text: PChar;
Result: Longint;
end;

TWMGetTextLength = TWMNoParams;

TWMHotKey = packed record
Msg: Cardinal;
HotKey: Longint;
Unused: Longint;
Result: Longint;
end;

TWMHScroll = TWMScroll;

TWMHScrollClipboard = packed record
Msg: Cardinal;
Viewer: HWND;
ScrollCode: Word; {SB_BOTTOM, SB_ENDSCROLL, SB_LINEDOWN, SB_LINEUP,
SB_PAGEDOWN, SB_PAGEUP, SB_THUMBPOSITION,
SB_THUMBTRACK, SB_TOP }
Pos: Word;
Result: Longint;
end;

TWMIconEraseBkgnd = TWMEraseBkgnd;

TWMInitDialog = packed record
Msg: Cardinal;
Focus: HWND;
InitParam: Longint;
Result: Longint;
end;

TWMInitMenu = packed record
Msg: Cardinal;
Menu: HMENU;
Unused: Longint;
Result: Longint;
end;

TWMInitMenuPopup = packed record
Msg: Cardinal;
MenuPopup: HMENU;
Pos: Smallint;
SystemMenu: WordBool;
Result: Longint;
end;

TWMKeyDown = TWMKey;
TWMKeyUp = TWMKey;

TWMKillFocus = packed record
Msg: Cardinal;
FocusedWnd: HWND;
Unused: Longint;
Result: Longint;
end;

TWMLButtonDblClk = TWMMouse;
TWMLButtonDown = TWMMouse;
TWMLButtonUp = TWMMouse;
TWMMButtonDblClk = TWMMouse;
TWMMButtonDown = TWMMouse;
TWMMButtonUp = TWMMouse;

TWMMDIActivate = packed record
Msg: Cardinal;
case Integer of
0: (
ChildWnd: HWND);
1: (
DeactiveWnd: HWND;
ActiveWnd: HWND;
Result: Longint);
end;

TWMMDICascade = packed record
Msg: Cardinal;
Cascade: Longint; { 0, MDITILE_SKIPDISABLED }
Unused: Longint;
Result: Longint;
end;

TWMMDICreate = packed record
Msg: Cardinal;
Unused: Integer;
MDICreateStruct: PMDICreateStruct;
Result: Longint;
end;

TWMMDIDestroy = packed record
Msg: Cardinal;
Child: HWND;
Unused: Longint;
Result: Longint;
end;

TWMMDIGetActive = TWMNoParams;
TWMMDIIconArrange = TWMNoParams;

TWMMDIMaximize = packed record
Msg: Cardinal;
Maximize: HWND;
Unused: Longint;
Result: Longint;
end;

TWMMDINext = packed record
Msg: Cardinal;
Child: HWND;
Next: Longint;
Result: Longint;
end;

TWMMDIRefreshMenu = TWMNoParams;

TWMMDIRestore = packed record
Msg: Cardinal;
IDChild: HWND;
Unused: Longint;
Result: Longint;
end;

TWMMDISetMenu = packed record
Msg: Cardinal;
MenuFrame: HMENU;
MenuWindow: HMENU;
Result: Longint;
end;

TWMMDITile = packed record
Msg: Cardinal;
Tile: Longint; { MDITILE_HORIZONTAL, MDITILE_SKIPDISABLE,
MDITILE_VERTICAL }
Unused: Longint;
Result: Longint;
end;

TWMMeasureItem = packed record
Msg: Cardinal;
IDCtl: HWnd;
MeasureItemStruct: PMeasureItemStruct;
Result: Longint;
end;

TWMMenuChar = packed record
Msg: Cardinal;
User: Char;
Unused: Byte;
MenuFlag: Word; { MF_POPUP, MF_SYSMENU }
Menu: HMENU;
Result: Longint;
end;

TWMMenuSelect = packed record
Msg: Cardinal;
IDItem: Word;
MenuFlag: Word; { MF_BITMAP, MF_CHECKED, MF_DISABLED, MF_GRAYED,
MF_MOUSESELECT, MF_OWNERDRAW, MF_POPUP, MF_SEPARATOR,
MF_SYSMENU }
Menu: HMENU;
Result: Longint;
end;

TWMMouseActivate = packed record
Msg: Cardinal;
TopLevel: HWND;
HitTestCode: Word;
MouseMsg: Word;
Result: Longint;
end;

TWMMouseMove = TWMMouse;

TWMMove = packed record
Msg: Cardinal;
Unused: Integer;
case Integer of
0: (
XPos: Smallint;
YPos: Smallint);
1: (
Pos: TSmallPoint;
Result: Longint);
end;

TWMMoving = packed record
Msg: Cardinal;
Edge: Integer;
DragRect: PRect;
end;

TWMNCActivate = packed record
Msg: Cardinal;
Active: BOOL;
Unused: Longint;
Result: Longint;
end;

TWMNCCalcSize = packed record
Msg: Cardinal;
CalcValidRects: BOOL;
CalcSize_Params: PNCCalcSizeParams;
Result: Longint;
end;

TWMNCCreate = packed record
Msg: Cardinal;
Unused: Integer;
CreateStruct: PCreateStruct;
Result: Longint;
end;

TWMNCDestroy = TWMNoParams;

TWMNCHitTest = packed record
Msg: Cardinal;
Unused: Longint;
case Integer of
0: (
XPos: Smallint;
YPos: Smallint);
1: (
Pos: TSmallPoint;
Result: Longint);
end;

TWMNCHitMessage = packed record
Msg: Cardinal;
HitTest: Longint;
XCursor: Smallint;
YCursor: Smallint;
Result: Longint;
end;

TWMNCLButtonDblClk = TWMNCHitMessage;
TWMNCLButtonDown = TWMNCHitMessage;
TWMNCLButtonUp = TWMNCHitMessage;
TWMNCMButtonDblClk = TWMNCHitMessage;
TWMNCMButtonDown = TWMNCHitMessage;
TWMNCMButtonUp = TWMNCHitMessage;
TWMNCMouseMove = TWMNCHitMessage;

TWMNCPaint = packed record
Msg: Cardinal;
RGN: HRGN;
Unused: Longint;
Result: Longint;
end;

TWMNCRButtonDblClk = TWMNCHitMessage;
TWMNCRButtonDown = TWMNCHitMessage;
TWMNCRButtonUp = TWMNCHitMessage;

TWMNextDlgCtl = packed record
Msg: Cardinal;
CtlFocus: Longint;
Handle: WordBool;
Unused: Word;
Result: Longint;
end;

TWMNotify = packed record
Msg: Cardinal;
IDCtrl: Longint;
NMHdr: PNMHdr;
Result: Longint;
end;

TWMNotifyFormat = packed record
Msg: Cardinal;
From: HWND;
Command: Longint;
Result: Longint;
end;

TWMPaint = packed record
Msg: Cardinal;
DC: HDC;
Unused: Longint;
Result: Longint;
end;

TWMPaintClipboard = packed record
Msg: Cardinal;
Viewer: HWND;
PaintStruct: THandle;
Result: Longint;
end;

TWMPaintIcon = TWMNoParams;

TWMPaletteChanged = packed record
Msg: Cardinal;
PalChg: HWND;
Unused: Longint;
Result: Longint;
end;

TWMPaletteIsChanging = packed record
Msg: Cardinal;
Realize: HWND;
Unused: Longint;
Result: Longint;
end;

TWMParentNotify = packed record
Msg: Cardinal;
case Event: Word of
WM_CREATE, WM_DESTROY: (
ChildID: Word;
ChildWnd: HWnd);
WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN: (
Value: Word;
XPos: Smallint;
YPos: Smallint);
0: (
Value1: Word;
Value2: Longint;
Result: Longint);
end;

TWMPaste = TWMNoParams;

TWMPower = packed record
Msg: Cardinal;
PowerEvt: Longint; { PWR_SUSPENDREQUEST, PWR_SUSPENDRESUME,
PWR_CRITICALRESUME }
Unused: Longint;
Result: Longint;
end;

TWMQueryDragIcon = TWMNoParams;

TWMQueryEndSession = packed record
Msg: Cardinal;
Source: Longint;
Unused: Longint;
Result: Longint;
end;

TWMQueryNewPalette = TWMNoParams;
TWMQueryOpen = TWMNoParams;
TWMQueueSync = TWMNoParams;

TWMQuit = packed record
Msg: Cardinal;
ExitCode: Longint;
Unused: Longint;
Result: Longint;
end;

TWMRButtonDblClk = TWMMouse;
TWMRButtonDown = TWMMouse;
TWMRButtonUp = TWMMouse;

TWMRenderAllFormats = TWMNoParams;

TWMRenderFormat = packed record
Msg: Cardinal;
Format: Longint;
Unused: Longint;
Result: Longint;
end;

TWMSetCursor = packed record
Msg: Cardinal;
CursorWnd: HWND;
HitTest: Word;
MouseMsg: Word;
Result: Longint;
end;

TWMSetFocus = packed record
Msg: Cardinal;
FocusedWnd: HWND;
Unused: Longint;
Result: Longint;
end;

TWMSetFont = packed record
Msg: Cardinal;
Font: HFONT;
Redraw: WordBool;
Unused: Word;
Result: Longint;
end;

TWMSetHotKey = packed record
Msg: Cardinal;
Key: Longint;
Unused: Longint;
Result: Longint;
end;

TWMSetIcon = packed record
Msg: Cardinal;
BigIcon: Longbool;
Icon: HICON;
Result: Longint;
end;

TWMSetRedraw = packed record
Msg: Cardinal;
Redraw: Longint;
Unused: Longint;
Result: Longint;
end;

TWMSetText = packed record
Msg: Cardinal;
Unused: Longint;
Text: PChar;
Result: Longint;
end;

TWMShowWindow = packed record
Msg: Cardinal;
Show: BOOL;
Status: Longint;
Result: Longint;
end;

TWMSize = packed record
Msg: Cardinal;
SizeType: Longint; { SIZE_MAXIMIZED, SIZE_MINIMIZED, SIZE_RESTORED,
SIZE_MAXHIDE, SIZE_MAXSHOW }
Width: Word;
Height: Word;
Result: Longint;
end;

TWMSizeClipboard = packed record
Msg: Cardinal;
Viewer: HWND;
RC: THandle;
Result: Longint;
end;

TWMSpoolerStatus = packed record
Msg: Cardinal;
JobStatus: Longint;
JobsLeft: Word;
Unused: Word;
Result: Longint;
end;

TWMStyleChange = packed record
Msg: Cardinal;
StyleType: Longint;
StyleStruct: PStyleStruct;
Result: Longint;
end;

TWMStyleChanged = TWMStyleChange;
TWMStyleChanging = TWMStyleChange;

TWMSysChar = TWMKey;
TWMSysColorChange = TWMNoParams;

TWMSysCommand = packed record
Msg: Cardinal;
case CmdType: Longint of
SC_HOTKEY: (ActivateWnd: HWND);
SC_KEYMENU: (Key: Word);
// 13种系统消息,另外热键和菜单消息
SC_CLOSE, SC_HSCROLL, SC_MAXIMIZE, SC_MINIMIZE, SC_MOUSEMENU, SC_MOVE,
SC_NEXTWINDOW, SC_PREVWINDOW, SC_RESTORE, SC_SCREENSAVE, SC_SIZE,
SC_TASKLIST, SC_VSCROLL: (
XPos: Smallint;
YPos: Smallint;
Result: Longint);
end;

TWMSysDeadChar = packed record
Msg: Cardinal;
CharCode: Word;
Unused: Word;
KeyData: Longint;
Result: Longint;
end;

TWMSysKeyDown = TWMKey;
TWMSysKeyUp = TWMKey;

TWMSystemError = packed record
Msg: Cardinal;
ErrSpec: Word;
Unused: Longint;
Result: Longint;
end;

TWMTimeChange = TWMNoParams;

TWMTimer = packed record
Msg: Cardinal;
TimerID: Longint;
TimerProc: TFarProc;
Result: Longint;
end;

TWMUIState = packed record
Msg: Cardinal;
Action: Word;
Flags: Word;
Unused: Longint;
end;

TWMChangeUIState = TWMUIState;
TWMUpdateUIState = TWMUIState;
TWMQueryUIState = TWMNoParams;

TWMUndo = TWMNoParams;

TWMVKeyToItem = TWMCharToItem;

TWMVScroll = TWMScroll;

TWMVScrollClipboard = packed record
Msg: Cardinal;
Viewer: HWND;
ScollCode: Word;
ThumbPos: Word;
Result: Longint;
end;

TWMWindowPosChanged = TWMWindowPosMsg;
TWMWindowPosChanging = TWMWindowPosMsg;

TWMWinIniChange = packed record
Msg: Cardinal;
Unused: Integer;
Section: PChar;
Result: Longint;
end;

TWMSettingChange = packed record
Msg: Cardinal;
Flag: Integer;
Section: PChar;
Result: Longint;
end;

TWMHelp = packed record
Msg: Cardinal;
Unused: Integer;
HelpInfo: PHelpInfo;
Result: Longint;
end;

TWMDisplayChange = packed record
Msg: Cardinal;
BitsPerPixel: Integer;
Width: Word;
Height: Word;
Result: Longint;
end;

TWMContextMenu = packed record
Msg: Cardinal;
hWnd: HWND;
case Integer of
0: (
XPos: Smallint;
YPos: Smallint);
1: (
Pos: TSmallPoint;
Result: Longint);
end;

TWMPrint = packed record
  Msg: Cardinal;
  DC: HDC;
  Flags: Cardinal;
  Result: Integer;
end;

TWMPrintClient = TWMPrint;

-----------------------------------------------------------------------------------------------------
RegisterWindowMessage:

RegisterWindowMessage用于在windows系统中注册一个唯一的消息。如果注册成功时,直接返回消息号,消息号的范围在 0xC000 (3072) 到 0xFFFF (65535) 之间。如果注册失败时,则该函数返回 0。
注意:当以字符串所标识的消息存在时,则直接返回该字符串所对应的消息号。

Messages.pas里的消息的更多相关文章

  1. Delphi 7里Messages.pas里所有104种重定义消息种类,180种不同的消息名称

    Delphi 7里Messages.pas里所有消息.经统计,共104种重定义消息种类,方便使用,180种不同的消息名称.省得像VC里一样,处处自己解析wParam和LParam参数进行分析.有空我要 ...

  2. RabbitMQ使用教程(五)如何保证队列里的消息99.99%被消费?

    1. 前情回顾 RabbitMQ使用教程(一)RabbitMQ环境安装配置及Hello World示例 RabbitMQ使用教程(二)RabbitMQ用户管理,角色管理及权限设置 RabbitMQ使用 ...

  3. 终于懂了:WM_PAINT中应该用BeginPaint与EndPaint这两个api,它们的功能正是使无效区域恢复(所以WM_PAINT里即使什么都不做,也必须写上BeginPaint与EndPaint)——Delphi里WM_PAINT消息的三个走向都做到了这一点 good

    程序本来是想实现鼠标单击改变背景颜色.可是,程序运行时,为什么没有任何消息触发,背景颜色就一直不断的改变了?WM_PAINT怎么被触发的 #include <windows.h> #inc ...

  4. MFC里ON&lowbar;COMMAND&lowbar;RANGE消息映射的ID问题

    今天在工作中遇到一个问题,一个动态菜单,每个菜单的菜单项ID是我自己定义的,定义如下: #define IDM_SEARCHRECORD0 222240 #define IDM_SEARCHRECOR ...

  5. 终于懂了:Delphi重定义消息结构随心所欲,只需要前4个字节是消息编号就行了(有了这个,就有了主动)

    Delphi重定义消息结构随心所欲,只需要前4个字节是消息编号就行了,跟Windows消息虽然尽量保持一致,但其实相互没有特别大的关系.有了这个,就有了主动,带不带句柄完全看需要. 比如这个结构就带句 ...

  6. activemq 控制面板里的 Number Of Pending Messages、 Messages Enqueued、Messages Dequeued含义

    Number Of Consumers  消费者 这个是消费者端的消费者数量 Number Of Pending Messages 等待消费的消息 这个是当前未出队列的数量.可以理解为总接收数-总出队 ...

  7. WM&lowbar;ERASEBKGND官方解释(翻译),以及Delphi里所有的使用情况(就是绘制窗口控件背景色,并阻止进一步传递消息)

    #define WM_ERASEBKGND                   0x0014 Parameters wParam A handle to the device context. //  ...

  8. activemq 控制面板里的 Number Of Pending Messages、 Messages Enqueued、Messages Dequeued含

    Number Of Consumers  消费者 这个是消费者端的消费者数量 Number Of Pending Messages 等待消费的消息 这个是当前未出队列的数量.可以理解为总接收数-总出队 ...

  9. Unity 游戏框架搭建 2019 &lpar;四十六&rpar; 简易消息机制 &amp&semi; 集成到 MonoBehaviourSimplify 里

    在上一篇,我们接触了单例,使用单例解决了我们脚本之间访问的问题. 脚本之间访问其实有更好的方式. 我们先分下脚本访问脚本的几种形式. 第一种,A GameObject 是 B GameObject 的 ...

随机推荐

  1. C&num;中分割字符串输出字符数组

    来自博客园 http://www.cnblogs.com/yugen/archive/2010/08/18/1802781.html   1.用字符串分隔: using System.Text.Reg ...

  2. 获取当前3Ds MAX版本

    昨天看到群里有人问,并贴出了飞浪大大的源码,又对比了一下自己以前写的,顿时觉得弱爆了哈哈~ 飞浪: fn getVer = ( v = (maxversion())[] / then return v ...

  3. Java开发中经典的小实例-(能被3整除,并且十个数换一行)

    import java.util.Scanner;public class Test15 {    public static void main(String[] args) {        // ...

  4. Android中Webview使用javascript调用事先定义好的Java函数

    1. 首先定义好一个类,专们用于给javascript调用 public class JavaScriptInterface { // share your news public void shar ...

  5. Standalone Django scripts

    Standalone Django scripts DJANGO_SETTINGS_MODULE=foo.settings

  6. 7&period;微软AJAX的解决方案

    Asp.net中内置的简化AJAX开发的控件UpdatePanel非常方便,但是它会带了许多viewstate,所以高手们并不喜欢它.但它开发在内网应用时可以考滤 放入ScriptManager,将要 ...

  7. Everything中文绿色版在Win7&sol;8&sol;10用不了问题的图文教程&comma;只显示盘符

    打开Everything后点击菜单上的“工具”——“选项” 勾选 Everything Service 后,点应用 需要用到管理者权限

  8. python和jupyter安装

    python官网:https://www.python.org/ 进去之后选择适合自己电脑的系统类型,安装,我的是windows  下载之后,双击打开 在安装时请勾选上add to path 选项,安 ...

  9. Linux centos7&period; 配置安装Oracle

    oralcle 11g r2 配置一下前期的网络环境 一 修改linux核心配置 1.修改用户的SHELL限制vi /etc/security/limits.conf oracle soft npro ...

  10. Kolakoski

    Kolakoski序列:我们知道的还是太少 上帝创造了整数,其余的则是我们人类的事了.正因为如此,质数.完全数.Fibonacci 数之类的数列才会让数学家们如痴如醉,因为它们的存在是如此自然,没有任 ...