Holy cow, I wrote a book!
and then there's
RealGetWindowClass more real?
Recall from last time that
the Real... functions were added to support
The goal with RealGetWindowClass is to help
accessibility tools identify what kind of window it is working with,
even if the application did a little disguising in the form of
If you ask
RealGetWindowClass for the class name of a window,
it digs through all the superclassing and returns the name of the
base class (if the base class is one of the standard window manager classes).
For example, if your application superclassed the button
a call to GetClassName would return
but a call to
RealGetWindowClass would return button.
Returning the underlying window class allows accessibility tools
to know that the user is interacting with some type of button control
(albeit a customized one),
so that it can adjust the interaction to something appropriate
the accessibility tool would just see AwesomeButton,
and it would probably shrug and say,
"I have no idea what a AwesomeButton is."
(I guess you could have the accessibility tool do a
strstr for button,
but then it would be faked out by classes like
ButtonBar or applications which superclass
a button but call it something completely different like
If you read the winuser.h header file,
you can see a comment next to the
* This gets the name of the window TYPE, not class. This allows us to
* recognize ThunderButton32 et al.
What is ThunderButton32?
the code name for Visual Basic 1.0.
Visual Basic superclassed all the standard Windows controls
and called its superclassed version ThunderWhatever.