Upravit

Sdílet prostřednictvím


How WM_GETOBJECT Works

Microsoft Active Accessibility sends the WM_GETOBJECT message to the appropriate server application when a client calls one of the AccessibleObjectFromX functions. The following list describes the various scenarios that occur:

  • If the window or control that receives WM_GETOBJECT implements IAccessible, the window returns a reference to the IAccessible interface using LresultFromObject. Microsoft Active Accessibility, in conjunction with the Component Object Model (COM) library, performs the appropriate marshaling and passes the interface pointer from the server back to the client.
  • If the window that receives the message does not implement IAccessible, it should return zero.
  • If the window does not handle the WM_GETOBJECT message, the DefWindowProc function returns zero.

Even if the server returns zero, Microsoft Active Accessibility still provides the client with information about the object. For most system-provided objects such as list boxes and buttons, Microsoft Active Accessibility provides complete information; for other objects, the information is limited. For example, Microsoft Active Accessibility does not provide information for controls that do not have a window handle. Microsoft Active Accessibility returns a proxied IAccessible interface pointer that the client uses to get information about the object.

For more information, see The WM_GETOBJECT Message.