ToyleY Posted February 8, 2008 Posted February 8, 2008 (edited) Any body ever had any joy trapping OCM_NOTIFY events. The essences of the code I'm working on is below, and I just can't see why it won't work. ; 1. Create the RichText Control Global $DocEd1 = ObjCreate("RICHTEXT.RichtextCtrl") ; 2. Create the ActiveX Container $GUIActiveX = GUICtrlCreateObj($DocEd1, 10, 70) ; 3 .find the 'Notify' offset for ActiveX control Global Const $OCM__BASE = ($WM_USER + 0x1c00) ; 4 .calculate $OCM_NOTIFY Global Const $OCM_NOTIFY = ($OCM__BASE + $WM_NOTIFY) ;5. register (trap) $OCM_NOTIFY events (like $WM_NOTIFY ; events but with the offset for ActiveX objext) GUIRegisterMsg($OCM_NOTIFY, "OCM_Notify_Events")OCM_NOTIFY is a reflected Window Message ID (whatever that means)I get the values:$WM_USER = 1024$OCM__BASE = 8192$OCM_NOTIFY = 8270when I run the script but the 'OCM_Notify_Events' function is never called? Any ideas?TaEDIT - So, with activex controls, the window with the rich text (the place where I want to trap events) is a reflector window that intercepts some window messages, and sends them to the control with a different name. The reflected messages are:Message sent by control Message reflected to controlWM_COMMAND .......................... OCM_COMMANDWM_CTLCOLOR ........................... OCM_CTLCOLORWM_DRAWITEM ........................... OCM_DRAWITEMWM_MEASUREITEM ....................... OCM_MEASUREITEMWM_DELETEITEM ........................... OCM_DELETEITEMWM_VKEYTOITEM ........................ OCM_VKEYTOITEMWM_CHARTOITEM ....................... OCM_CHARTOITEMWM_COMPAREITEM .................... OCM_COMPAREITEMWM_HSCROLL .................................. OCM_HSCROLLWM_VSCROLL ................................. OCM_VSCROLLWM_NOTIFY ................................... OCM_NOTIFYWM_PARENTNOTIFY ..................... OCM_PARENTNOTIFYMight try a different approach to registration of OCM_NOTIFY. Edited February 8, 2008 by ToyleY
GaryFrost Posted February 8, 2008 Posted February 8, 2008 http://msdn2.microsoft.com/en-us/library/a0h15f4z.aspx SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now