=?Utf-8?B?Z2FiZQ==?= <ga**@discussions.microsoft.com> wrote in
news:DA**********************************@microsof t.com:
I'm working with twain and would like to work around a probem i have
where some twain drivers that pop up windows to display errors. this
is somewhat problematic as my twain app is running as a service
without a user to click OK.
I think what I'm looking for is a system wide hook to check for a
known window titles, then when a window is opening and then send a
message to that window. Seems like this will involve some heavy
interop that that doesn't bother me nearly as much as these pop up
error messages. Anybody have an idea of what messages I'm looking to
process?
Or if you have a better/alternate solution I'd love to hear it.
thanks tons,
gabe
I've done quite a bit of this type of development. You should use API
calls for this. Unless someone has a better solution, you would poll the
window list and see if your window is open, then enumerate the child
windows on the dialog and send a BM_CLICK message to it using the api
POSTMESSAGE or SENDMESSAGE. DO a search for GetWordWindow on Google for
an example of how to get a window handle from it's name or a substring.
There are a lot of ways to do this. I would be interested to know if
there is a sink or callback that can be used instead of polling the
window list... Any guru's out there?
--
*~!NumbLock!~*