tags:

views:

159

answers:

1

Hi,

We're planning to build some sort of single sign-on feature inside our app.

It's clear to me that I'll have to go depp with Windows API to achieve reading and writing from legacy applications controls, but as far as I've searched and tested that's not the hardest part of the job.

There's a point, however, that I couldn't figure out until now how to proceed with: how can I "hook" the system to be notified every time a new window pops up in the UI? By example: when I start my calculator or when, inside calc, the About window is open.

Is there a way to receive this kind of notification? If yes, how? If no, is there any workaround to achieve the same result?

Thank you in advance,

Filipe

+1  A: 

You need a windows system hook, specifically a WH_CBT hook, watching the HCBT_CREATEWND event. This stuff is a bit hairy, but possible.

Start here:

GalacticJello
Tks, I've not tested yet but clearly seems to be the right way.
jfneis
Now I tested it and worked just fine. Thank you again. :)
jfneis