HOWTO: Expose Owner-drawn List Boxes by Active Accessibility

ID: Q196205

The information in this article applies to:

SUMMARY

You can use Active Accessibility tools to obtain information from owner- drawn list boxes. When you create an owner-drawn list box, use the LBS_HASSTRINGS style. Use the LB_ADDSTRING message to add the text that is exposed to Active Accessibility clients. This text must not be the owner- drawn data. Use the LB_SETITEMDATA message to attach owner-drawn data to the list box.

This method allows for both the owner-drawn data and the text string to co-exist in the list box. If you need to change the code, you only need to change LB_GETTEXT to LB_GETITEMDATA to get the owner-drawn data.

MORE INFORMATION

Important Notes:

This information applies only to Windows 95, Windows 98, and Windows NT 4.0 Service Pack 4 and later versions.

REFERENCES

Microsoft Active Accessibility

Additional query words:

Keywords          : kbAAcc kbClient kbNavigation kbNTOS400 kbSDKPlatform kbWinOS95 kbWinOS98 
Issue type        : kbhowto

Last Reviewed: November 24, 1998