
finding my window's taskbar button
Paul,
Quote:
>Does anyone know of a VB6 way of finding the top and left values of my
>current window's taskbar button when minimised?
One way or another you'd have to inject code in the Shell process
space, and then use the Toolbar API to get that information. Because
the taskbar buttons are actually buttons in a Toolbar control.
The easiest way to get code to execute in the shell process is
probably to put it in an COM component, and then call the SHLoadInProc
API. Then you'd have to use some IPC mechanism to get the information
back to your app.
The problem is that on some Windows versions (I don't know if it's the
same on all), the Toolbar buttons are ownerdrawn, and you can probably
not get the button text with a TB_GETBUTTONTEXT message. So I don't
know how you can determine exactly which button belongs to your
window. Maybe the lParam member of the TBBUTTONINFO structure contains
something interesting, like the window handle.
Mattias
____________________________________________
http://hem.spray.se/mattias.sjogren/