Owner-Drawn Controls

Owner-drawn controls can be accessible as long as care is taken in their use. Although owner-drawn controls behave like standard controls, they have a customized appearance. Some applications use custom controls to change the appearance of a control, but owner-drawn controls are also an acceptable, and more accessible, option. For example, an application using an owner-drawn control might display a check box with an actual check mark instead of an X or label a push button with a picture instead of a word. Using a standard Windows control with the owner-drawn style makes the control appear normal to accessibility aids, but still allows the application to give control elements a customized appearance.

You should define the label for an owner-drawn control, even if the label text will not be visible on the screen. If you create an owner-drawn control in which the normal caption will not be visible (for example, a button with a graphic face) and leave the caption as a blank string, the accessibility aid will not be able to query the caption with a WM_GETTEXT message and use it to identify the control. You should make sure that your owner-drawn control handles all the other class-specific text retrieval messages, such as CB_GETKBTEXT, LB_GETTEXT, and so on, and set the appropriate style bits (such as LBS_HASSTRINGS) to indicate that the owner-drawn control supports those messages.