分享
 
 
 

VCL Component Messages

王朝delphi·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

VCL Control Messages (values): parameters: comments:

CM_BASE

($B000)

CM_ACTIVATE no params used when app is actived or a

(CM_BASE + 0) custom form is modally shown

CM_DEACTIVATE no params counter part to CM_ACTIVATE

(CM_BASE + 1)

CM_GOTFOCUS no params not used

(CM_BASE + 2)

CM_LOSTFOCUS no params not used

(CM_BASE + 3)

CM_CANCELMODE TCMCancelMode used to stop special behaviour of

(CM_BASE + 4) controls like TDBLookup

CM_DIALOGKEY TCMDialogKey used in the KeyPreview chain of a

(CM_BASE + 5) form to determin whether a child

control processes special keys like

TAB, arrow keys etc.

CM_DIALOGCHAR TCMDialogChar same as CM_DIALOGKEY but for

(CM_BASE + 6) characters

CM_FOCUSCHANGED TCMFocusChanged used in forms when the active

(CM_BASE + 7) control changes

CM_PARENTFONTCHANGED if wParam = 1 then lParam

(CM_BASE + 8) contains a TFont else just

use the font of the parent

used in all controls

CM_PARENTCOLORCHANGED if wParam = 1 then

(CM_BASE + 9) lParam contains a color

else just use the color of

the parent used in all

controls

CM_HITTEST TCMHitTest used only at design time (and only

(CM_BASE + 10) in ControlAtPos) to determine the

control at the current mouse

Message.Result = 0 if control

considers itself as not hit else 1

CM_VISIBLECHANGED wParam = 1 if visible, used when a control's visibility is

(CM_BASE + 11) lParam contains changed by its Visible property

CM_ENABLEDCHANGED no params used when a control is enabled or

(CM_BASE + 12) disabled by its Enabled property

CM_COLORCHANGED no params used when a control's color is

(CM_BASE + 13) changed by its Color property

CM_FONTCHANGED no params used in the TFont.OnChange

(CM_BASE + 14) event of a control's font

CM_CURSORCHANGED no params used when a control's cursor is

(CM_BASE + 15) changed by its Cursor property

CM_CTL3DCHANGED no params used when control's Ctrl3D

(CM_BASE + 16) property is changed

CM_PARENTCTL3DCHANGED no params used with ActiveX control

(CM_BASE + 17) (OnAmbientPropertyChange), in

response to a

CM_CTRL3DCHANGED message

and used when reading a

TWinControl from a stream

CM_TEXTCHANGED no params used when a control's text is

(CM_BASE + 18) changed

CM_MOUSEENTER wParam = 0,

(CM_BASE + 19) lParam = sometimes

a reference of the control

having the mouse pointer

over it sent by TApplication

and used internally by

TSpeedButton

CM_MOUSELEAVE as in counterpart to

(CM_BASE + 20) CM_MOUSEENTER CM_MOUSEENTER

CM_MENUCHANGED no params internal message for TMenu

(CM_BASE + 21) (when merging or an item has

changed)

CM_APPKEYDOWN wParam = KeyCode, sent only when determining

(CM_BASE + 22) lParam = KeyData (like in whether a key is a menu key

WM_KEYDOWN)

CM_APPSYSCOMMAND wParam = 0, sent in response to a

(CM_BASE + 23) lParam = @Message WM_SYSCOMMAND message (received by a TWinControl)

passing the entire Message record

in lParam (used in hint windows

and by the application to focus

itself)

CM_BUTTONPRESSED wParam = group index, used internally by TSpeedButton

(CM_BASE + 24) lParam = button reference to implement button groups

CM_SHOWINGCHANGED no params sent by TWinControl on various

(CM_BASE + 25) events (window creation, loading

from stream, new parent

assignment), used in TCoolBand

on destroy and by TMemoStrings

on UpdateState change

CM_ENTER TCMEnter sent by TForm when the focus

(CM_BASE + 26) changes to another child control

and by TApplication when it gets

the focus

CM_EXIT TCMExit sent by TForm when the focus

(CM_BASE + 27) changes to another child

CM_DESIGNHITTEST TCMDesignHittest special message never sent from

(CM_BASE + 28) within the VCL (but from a

designer DLL), used only at

design time to determine whether

a control wants mouse and key

input. Message.Result = 1 if the

control behaves like at runtime

else 0

CM_ICONCHANGED no params sent by TApplication from its

(CM_BASE + 29) FIcon.OnChange event

CM_WANTSPECIALKEY TCMWantSpecialKey sent by TControl in response to

(CM_BASE + 30) CN_KEYDOWN and CN_KEYUP

CM_INVOKEHELP wParam = command, sent by TApplication to the main

(CM_BASE + 31) lParam = Data form on help invoking (nowhere

used)

CM_WINDOWHOOK wParam = 0 if hooking sent by TApplication when a form

(CM_BASE + 32) = 1 if unhooking hooks or unhooks the main

lParam = @@Hook window proc

CM_RELEASE no params sent by TForm on release of itself

(CM_BASE + 33) and by TFindDialog when to notify

its redirector

CM_SHOWHINTCHANGED no params used when a control's ShowHint

(CM_BASE + 34) property is changed

CM_PARENTSHOWHINTCHANGED no params used at various places (in

(CM_BASE + 35) response to a

CM_SHOWHINTCHANGED

message, when reading a controls

data from a stream etc.)

CM_SYSCOLORCHANGE no params sent in response to a

(CM_BASE + 36) WM_SYSCOLORCHANGE

message (by TWinControl)

CM_WININICHANGE TWMWinIniChange sent by TWinControl in response

(CM_BASE + 37) to WM_WININICHANGE

CM_FONTCHANGE no params sent by TWinControl in response

(CM_BASE + 38) to WM_FONTCHANGE

CM_TIMECHANGE no params sent by TWinControl in response

(CM_BASE + 39) to WM_TIMECHANGE

CM_TABSTOPCHANGED no params used when a control's TabStop

(CM_BASE + 40) property is changed

CM_UIACTIVATE no params sent by TCustomForm when the

(CM_BASE + 41) active control changes and is used

primarily for OLE controls

CM_UIDEACTIVATE no params counterpart to CM_UIACTIVATE

(CM_BASE + 42)

CM_DOCWINDOWACTIVATE wParam = active, sent by TCustomForm on

(CM_BASE + 43) lParam = 0 activation/deactivation to the

current OLE control if there's one

CM_CONTROLLISTCHANGE wParam = Control, sent by TWinControl on inserting/

(CM_BASE + 44) lParam = 1 if inserting removing a child control

else 0

CM_GETDATALINK no params sent by TDBCtrlGrid to retrieve an

(CM_BASE + 45) eventual data link of a control

(Message.Result returns the link if

applicable)

CM_CHILDKEY TCMChildKey sent by TWinControl in response

(CM_BASE + 46) to CN_KEYDOWN and

CN_SYSKEYDOWN and by

TActiveXControl when translating accelerator keys

CM_DRAG TCMDrag sent by internal drag routines

(CM_BASE + 47) (Controls.pas) and used by

TWinControl to trigger the

various drag and dock events

CM_HINTSHOW wParam = 0, sent by TApplication on hint

(CM_BASE + 48) lParam = @THintInfo activation and on mouse

messages

CM_DIALOGHANDLE wParam = 0, sent by TApplication when

(CM_BASE + 49) lParam = Handle when DialogHandle is read or written to

setting and the applications handle has

wParam = 1, not yet been created, when

lParam = 0 when reading reading the dialog handle then

Message.Result contains the new

handle

CM_ISTOOLCONTROL no params sent by TOLEForm to determine if

(CM_BASE + 50) its child controls are tool controls,

used only by TCustomPanel

CM_RECREATEWND no params sent by

(CM_BASE + 51) TWinControl.RecreateWnd and

TFieldDataLink.UpdateRightToLeft

CM_INVALIDATE wParam = 1 if repaint is sent by TWinControl.Invalidate

(CM_BASE + 52) required else 0, to notify itself and its parent

lParam = 0 of the invalidation request

CM_SYSFONTCHANGED no params sent by TScreen if its IconFont is

(CM_BASE + 53) changed and by TControl when

reading properties from stream or

changing DesktopFont

CM_CONTROLCHANGE TCMControlChange sent by TWinControl when

(CM_BASE + 54) inserting or removing a child

control

CM_CHANGED wParam = 0, sent by TControl.Changed

(CM_BASE + 55) lParam = Self

CM_DOCKCLIENT TCMDockClient sent by TWinControl.DockDrop to

(CM_BASE + 56) determine whether docking is

allowed or not

CM_UNDOCKCLIENT TCMUndockClient sent by TControl on Destroy, by

(CM_BASE + 57) TWinControl.DoUnDock and

TCustomDockForm on removing a

child control

CM_FLOAT TCMFloat sent by internal drag/dock routines

(CM_BASE + 58) to make a control floating

CM_BORDERCHANGED no params sent by TWinControl when

(CM_BASE + 59) BorderWidth or BevelWidth styles

are changed

CM_BIDIMODECHANGED no params sent by TControl.SetBiDiMode

(CM_BASE + 60)

CM_PARENTBIDIMODECHANGED no params sent at various places (in

(CM_BASE + 61) response to

CM_BIDIMODECHANGED, when

reading a control from a stream,

when reading a custom from from

a stream, when BiDiMode of

TApplication changes and when

TCustomRichEdit is created)

CM_ALLCHILDRENFLIPPED no params sent by

(CM_BASE + 62) TWinControl.DoFlipChildren

CM_ACTIONUPDATE wParam = 0, sent by TContainedAction.Update

(CM_BASE + 63) lParam = Action

CM_ACTIONEXECUTE wParam = 0, sent by TContainedAction.Execute

(CM_BASE + 64) lParam = Action

CM_HINTSHOWPAUSE wParam = 1 if hint was sent by TApplication on mouse

(CM_BASE + 65) active messages,when there's a new

lParam = time interval control under the mouse and has

when to show new hint ShowHint set to True

CM_DOCKNOTIFICATION TCMDocNotification sent by

(CM_BASE + 66) TControl.SendDockNotification

which is executed in response to

CM_VISIBLECHANGED and

WM_SETTEXT

CM_MOUSEWHEEL TCMMouseWheel general mousewheel message

(CM_BASE + 67) generated either by the registered

mouse wheel message or

WM_MOUSEWHEEL (not

Win95) and sent by TWInControl

VCL Control Notifications

VCL Control Notifications are just reflections of the corresponding WM_xxx messages. They are sent by a window to their parent window (not VCL but Windows). This makes in Delphi no sense as the parent knows basically nothing about its child windows and can therefore not handle them. Each of these messages contains in its lParam the handle of the child window which has sent the message. The VCL does nothing else then to add CN_BASE to the message value and sends the message then to the window which created it originally. This way windows can handle their special messages themselves.

Control Notification Value

CN_BASE $BC00

CN_CHAR CN_BASE + WM_CHAR

CN_CHARTOITEM CN_BASE + WM_CHARTOITEM

CN_COMMAND CN_BASE + WM_COMMAND

CN_COMPAREITEM CN_BASE + WM_COMPAREITEM

CN_CTLCOLORBTN CN_BASE + WM_CTLCOLORBTN

CN_CTLCOLORDLG CN_BASE + WM_CTLCOLORDLG

CN_CTLCOLOREDIT CN_BASE + WM_CTLCOLOREDIT

CN_CTLCOLORLISTBOX CN_BASE + WM_CTLCOLORLISTBOX

CN_CTLCOLORMSGBOX CN_BASE + WM_CTLCOLORMSGBOX

CN_CTLCOLORSCROLLBAR CN_BASE + WM_CTLCOLORSCROLLBAR

CN_CTLCOLORSTATIC CN_BASE + WM_CTLCOLORSTATIC

CN_DELETEITEM CN_BASE + WM_DELETEITEM

CN_DRAWITEM CN_BASE + WM_DRAWITEM

CN_KEYDOWN CN_BASE + WM_KEYDOWN

CN_KEYUP CN_BASE + WM_KEYUP

CN_HSCROLL CN_BASE + WM_HSCROLL

CN_MEASUREITEM CN_BASE + WM_MEASUREITEM

CN_NOTIFY CN_BASE + WM_NOTIFY

CN_PARENTNOTIFY CN_BASE + WM_PARENTNOTIFY

CN_SYSKEYDOWN CN_BASE + WM_SYSKEYDOWN

CN_SYSCHAR CN_BASE + WM_SYSCHAR

CN_VKEYTOITEM CN_BASE + WM_VKEYTOITEM

CN_VSCROLL CN_BASE + WM_VSCROLL

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有