Veli-Pekka Tatila
2004-08-30 09:17:10 UTC
Hi,
I'm really new to Windows programming having just read some of the basics in
the Petzold book but I do know some C and C++. I'm doing a little esay on
Windows programming and have chosen accessibility in the Win32 API, as I'm
also visually impaired and planning to write a free screen reader for
Windows some day.
Anyway, my goal is to do a very simple proof-of-concept console app that
would demonstrate accessibility in Win32. A screne reader program turns the
GUI into a textual representation that's usually output through speech or
braille. In other words, it follows focus changes and reads the types and
states of the various GUI widgets out there. The closest "ordinary"
equivalent I can think of is a program that lists class names and other info
regarding a given window.
I've been browsing through MSDN and found out there's no direct support for
accessibility in the WIN32 API apart from a screen reader flag and built-in
Windows accessibility. However, it would seem to me that hooks might be the
answer here. Could anyone shed some light on or provide links regarding
hooks? A real small, basic example would be fine.
Regarding the actual implementation of my console app. If I only got the
window handle for the currently active window, I could start recursively
querying info on child windows, I suppose. Which messages notify me of
active window changes?
There are quite a number of hooks in the API and I don't fully understand
there differences. Which hooks would you recommend for getting info out of
dialogs, windows and child-windows aka widgets? Also, should I use global or
thread specific hooks? I know next to nothing about DLLs and as far as I can
tell, most screen readres only follow changes in the active window. So I
guess following a single thread of execution would probably be better and
more efficient, too.
Finally, a silly question. I've been mostly programming in object-oriented
languages like C++ and Java. If the WIn32 API was some kind of an object
hierarchy, I suppose i would handle everything through a pointer to some
window ABC, letting polymorphism take kcare of the details at runtime.
What's the equivalent of such polymorphism in a procedural language, that is
are there certain function calls that will work with all windows? Finally,
what does sub-classing mean in C and how does it work? Surely we are not
talking about actual C++ classes here but function pointers and structs.
Any help greatly appreciated.
PS: On a side note, Windows datatype names are pretty horrible with speech,
oh well <smiley>.
I'm really new to Windows programming having just read some of the basics in
the Petzold book but I do know some C and C++. I'm doing a little esay on
Windows programming and have chosen accessibility in the Win32 API, as I'm
also visually impaired and planning to write a free screen reader for
Windows some day.
Anyway, my goal is to do a very simple proof-of-concept console app that
would demonstrate accessibility in Win32. A screne reader program turns the
GUI into a textual representation that's usually output through speech or
braille. In other words, it follows focus changes and reads the types and
states of the various GUI widgets out there. The closest "ordinary"
equivalent I can think of is a program that lists class names and other info
regarding a given window.
I've been browsing through MSDN and found out there's no direct support for
accessibility in the WIN32 API apart from a screen reader flag and built-in
Windows accessibility. However, it would seem to me that hooks might be the
answer here. Could anyone shed some light on or provide links regarding
hooks? A real small, basic example would be fine.
Regarding the actual implementation of my console app. If I only got the
window handle for the currently active window, I could start recursively
querying info on child windows, I suppose. Which messages notify me of
active window changes?
There are quite a number of hooks in the API and I don't fully understand
there differences. Which hooks would you recommend for getting info out of
dialogs, windows and child-windows aka widgets? Also, should I use global or
thread specific hooks? I know next to nothing about DLLs and as far as I can
tell, most screen readres only follow changes in the active window. So I
guess following a single thread of execution would probably be better and
more efficient, too.
Finally, a silly question. I've been mostly programming in object-oriented
languages like C++ and Java. If the WIn32 API was some kind of an object
hierarchy, I suppose i would handle everything through a pointer to some
window ABC, letting polymorphism take kcare of the details at runtime.
What's the equivalent of such polymorphism in a procedural language, that is
are there certain function calls that will work with all windows? Finally,
what does sub-classing mean in C and how does it work? Surely we are not
talking about actual C++ classes here but function pointers and structs.
Any help greatly appreciated.
PS: On a side note, Windows datatype names are pretty horrible with speech,
oh well <smiley>.
--
With kind regards Veli-Pekka Tätilä (***@mail.student.oulu.fi)
Accessibility, game music, synthesizers and more:
http://www.student.oulu.fi/~vtatila
With kind regards Veli-Pekka Tätilä (***@mail.student.oulu.fi)
Accessibility, game music, synthesizers and more:
http://www.student.oulu.fi/~vtatila