--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> This is an example of reverse engineering the task bar to recognize 
> that it uses the Windows built-in Toolbar control and using a 
> standard message to manipulate that control.  But if you want to 
> automate the re-arrangement of buttons, I think you have to go 
> deeper and reverse engineer how the Taskbar associates the window 
> handle of the active window to the toolbar button.

> I did this at one point and had a taskbar sort working for older 
> versions of Windows.  But it was sometimes unreliable.  And MS 
> changed the internal data structures used by the taskbar with XP so 
> it broke.

Is it because MS changed the control from SysTabControl32 to
ToolbarWindow 32? Anyway, I think the user himself can do it in a
script way using dll plugin, if he is desparate enough. It seems to me
just a more complicated adaptation of the statusbar script I wrote before:
http://tech.groups.yahoo.com/group/power-pro/message/28208

OTOH, I just found this article:

http://www.codeproject.com/csharp/taskbarsorter.asp

All procedures up to Button-Rearrange are similar to what I expected.
It uses ShowWindow to rearrange the buttons. This is actually what I
intended to do originally: first, get all the buttons texts via
MiscPlugin's Get_WindowText, then obtain the corresponding window's
handles assuming the button texts are part of the captions. Then,
hide/show to rearrange. However, Get_WindowText didn't work in my
current system (:IIRC, it used to work in XP. I don't know why...
Broken by MS in SP2 or maybe because I triggered the explorer shell as
System account?) Anyway, I think using TB_MOVEBUTTON is more elegant.

BTW, this article clarifies why TB_BUTTONCOUNT outputs more number
than actually visible buttons: Grouping of buttons in XP.

Sean




Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to