Hi,
This is really just a theoretical question for my own interest, and not for
any nefarious purpose... :-)
Say we have three applications running - Notepad, Wordpad and Excel - and
each window is in its "normal" state i.e. not maximised, and not minimised
to the taskbar.
We click each of the three taskbar buttons in turn and, of course, the three
applications receive focus one after the other... We click on the Notepad
taskbar button, and Notepad receives focus. Obviously!
Similarly, if we click each of the applications in turn, their associated
taskbar button appears indented, i.e. as if it has been clicked.
My question is, how does Windows relate an application to its associated
taskbar button? I.e. when you click on Notepad, how does Windows "know"
which of the taskbar buttons to indent? I'm assuming it must use a hWnd...?
Assuming it does, is there any way to discover an application's taskbar
button's hWnd from the hWnd of the application itself?
Any assistance gratefully received.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net