Re: Programmatically query .inc definitions for object
Look at the WindowChildren function. It returns a list of declared child objects in the specified window. Unlike GetChildren, it grabs information from the declaration, not the actual window.
It seems to me there was some code either in the forums or in the downloads section that showed how to do pretty much what you are thinking. I haven't gotten that far, but this is on my to-do list too.