Object Identifiers

Object identifiers are 32-bit values that identify categories of accessible objects within an application.

Clients receive these values in their WinEventProc callback function and use them to identify parts of a window. Servers also use these values to identify the corresponding parts of a window when calling NotifyWinEvent or when responding to the WM_GETOBJECT message.

Servers can define custom object IDs to identify other categories of objects within their applications. Custom object IDs must be assigned positive values because Microsoft Active Accessibility reserves zero and all negative values to use for the following standard object identifiers.

The following constants are defined in winuser.h:

  • OBJID_ALERT
    Refers to an alert associated with a window or an application. System provided message boxes are the only UI elements that send events with this ID. Server applications cannot use the AccessibleObjectFromX functions with this object identifier. This is a known issue with Active Accessibility.
  • OBJID_CARET
    Refers to the text insertion bar (caret) in the window.
  • OBJID_CLIENT
    Refers to the window's client area. In most cases, the operating system controls the frame elements and the client object contains all elements that the application controls. When processing the WM_GETOBJECT message, servers only process the messages in which the lParam is OBJID_CLIENT, OBJID_WINDOW, or custom object IDs.
  • OBJID_CURSOR
    Refers to the mouse pointer. There is only one mouse pointer in the system and it is not a child of any window.
  • OBJID_HSCROLL
    Refers to the window's horizontal scroll bar.
  • OBJID_NATIVEOM
    In response to this object identifier, third-party applications can expose their own object model. Third-party applications can return any COM interface in response to this object identifier.
  • OBJID_MENU
    Refers to the window's menu bar.
  • OBJID_QUERYCLASSNAMEIDX
    Refers to an object identifier that OLEACC.dll uses internally. For more information, see Appendix F: Object Identifier Values for OBJID_QUERYCLASSNAMEIDX.
  • OBJID_SIZEGRIP
    Refers to the window's size grip, an optional frame component located at the lower right corner of the window frame.
  • OBJID_SOUND
    Refers to a sound object. Sound objects do not have screen locations or children, but do have name and state attributes. They are children of the application playing the sound.
  • OBJID_SYSMENU
    Refers to the window's system menu.
  • OBJID_TITLEBAR
    Refers to the window's title bar.
  • OBJID_VSCROLL
    Refers to the window's vertical scroll bar.
  • OBJID_WINDOW
    Refers to the window itself rather than a child object.