Microsoft KB Archive/221579

{|
 * width="100%"|

BUG: Rebar Control Exposes Its Accessible Properties Incorrectly

 * }

Q221579

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * Microsoft Windows 98
 * Microsoft Windows 95
 * Microsoft Windows NT Server version 4.0 SP4
 * Microsoft Windows NT Workstation version 4.0 SP4

-

SYMPTOMS
The Rebar control returns the following error message when the Inspect Objects sample checks for the control's accessible properties:

invalid parameter

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Steps to Reproduce Behavior

 * 1) Launch the Inspect Objects sample from the Microsoft Active Accessibility group.
 * 2) Launch Windows Explorer.
 * 3) Point the cursor between the title bar and the menu bar of Explorer.

The Inspect Objects application calls AccessibleObjectFromPoint to get the object under the cursor. As a result, the OLEACC.DLL hittesting moves down to the Rebar window with a point that is on the Rebar control's 1-pixel-wide border. The control responds to the WM_NCHITTEST message with HT_CLIENT instead of HT_BORDER.

The OLEACC.DLL then takes this HT_CLIENT result and drills down and hittests the client area. It is confused when it notices that the given point, on the border, is outside of the client area. Consequently, the CClient::HitTest function returns a FALSE with VT_EMPTY. AccessibleObjectFromPoint misses the S_FALSE by using SUCCEEDED and returns VT_EMPTY and S_OK. The Inspect Objects application fails to notice the VT_EMPTY value and uses random data for the child IVal. Finally, the OLEACC.DLL rejects this random value for the child ID and sends the "invalid parameter" message.