' Object events
'
' The system AND apps generate these. The system generates these for
' real windows. Apps generate these for objects within their window which
' act like a separate control, e.g. an item in a list view.
'
' When the system generate them, dwParam2 is always WMOBJID_SELF. When
' apps generate them, apps put the has-meaning-to-the-app-only ID value
' in dwParam2.
' For all events, if you want detailed accessibility information, callers
' should
' ' Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
' of the event, and IID_IAccessible as the REFIID, to get back an
' IAccessible* to talk to
' ' Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
' parameter of the event.
' ' If idChild isn't zero, call get_accChild() in the container to see
' if the child is an object in its own right. If so, you will get
' back an IDispatch* object for the child. You should release the
' parent, and call QueryInterface() on the child object to get its
' IAccessible*. Then you talk directly to the child. Otherwise,
' if get_accChild() returns you nothing, you should continue to
' use the child VARIANT. You will ask the container for the properties
' of the child identified by the VARIANT. In other words, the
' child in this case is accessible but not a full-blown object.
' Like a button on a titlebar which is'small' and has no children.
'
' For all EVENT_OBJECT events,
' hwnd is the dude to Send the WM_GETOBJECT message to (unless NULL,
' see above for system things)
' idObject is the ID of the object that can resolve any queries a
' client might have. It's a way to deal with windowless controls,
' controls that are just drawn on the screen in some larger parent
' window (like SDM), or standard frame elements of a window.
' idChild is the piece inside of the object that is affected. This
' allows clients to access things that are too small to have full
' blown objects in their own right. Like the thumb of a scrollbar.
' The hwnd/idObject pair gets you to the container, the dude you
' probably want to talk to most of the time anyway. The idChild
' can then be passed into the acc properties to get the name/value
' of it as needed.
'
' Example #1:
' System propagating a listbox selection change
' EVENT_OBJECT_SELECTION
' hwnd == listbox hwnd
' idObject == OBJID_WINDOW
' idChild == new selected item, or CHILDID_SELF if
' nothing now selected within container.
' Word'97 propagating a listbox selection change
' hwnd == SDM window
' idObject == SDM ID to get at listbox'control'
' idChild == new selected item, or CHILDID_SELF if
' nothing
'
' Example #2:
' System propagating a menu item selection on the menu bar
' EVENT_OBJECT_SELECTION
' hwnd == top level window
' idObject == OBJID_MENU
' idChild == ID of child menu bar item selected
'
' Example #3:
' System propagating a dropdown coming off of said menu bar item
' EVENT_OBJECT_CREATE
' hwnd == popup item
' idObject == OBJID_WINDOW
' idChild == CHILDID_SELF
'
' Example #4:
'
' For EVENT_OBJECT_REORDER, the object referred to by hwnd/idObject is the
' PARENT container in which the zorder is occurring. This is because if
' one child is zordering, all of them are changing their relative zorder.