wrapped by maul.esel
Some of these functions require Windows Vista or even Windows7 (tested on Windows 7 32bit). All functions require AHK_L (tested with Unicode version) or the COM standard library by Sean.
ITaskbar functions | wrapped by maul.esel |
general | |
ITaskbarList_Finish() | releases all ITaskbarList interfaces. |
ITaskbarList | minimum required OS: Windows 2000 Professional, Windows XP, Windows 2000 Server |
ITaskbarList_AddTab() | adds an item to the taskbar. |
ITaskbarList_DeleteTab() | deletes an item from the taskbar. |
ITaskbarList_ActivateTab() | Activates an item on the taskbar. |
ITaskbarList_SetActiveAlt() | Marks a taskbar item as active but does not visually activate it. |
ITaskbarList2 | minimum required OS: Windows XP, Windows Server 2003 |
ITaskbarList_MarkFullscreen() | Marks a window as full-screen. |
ITaskBarList3 | minimum required OS: Windows 7, Windows Server 2008 R2 |
ITaskbarList_SetProgressValue() | set the current value of a taskbar progressbar |
ITaskbarList_SetProgressState() | sets the current state and thus the color of a taskbar progressbar |
ITaskbarList_RegisterTab() | Informs the taskbar that a new tab or document thumbnail has been provided for display in an application’s taskbar group flyout. |
ITaskbarList_UnRegisterTab() | Removes a thumbnail from an application’s preview group when that tab or document is closed in the application. |
ITaskbarList_SetTabOrder() | Inserts a new thumbnail into an application’s group flyout or moves an existing thumbnail to a new position in the application’s group. |
ITaskbarList_SetTabActive() | Informs the taskbar that a tab or document window has been made the active window. |
ITaskbarList_ThumbBarAddButtons() | extensive support for all thumbbutton functions coming soon... |
ITaskbarList_SetOverlayIcon() | set the overlay icon for a taskbar button |
ITaskbarList_SetThumbnailTooltip() | set a custom tooltip for your thumbnail |
ITaskbarList_SetThumbnailClip() | limit the taskbar thumbnail of a gui to a specified size instead of the whole window |
ITaskbarList4 | minimum required OS: Windows 7, Windows Server 2008 R2 |
ITaskbarList_SetTabProperties() | Allows a tab to specify whether the main application frame window or the tab window should be used as a thumbnail or in the peek feature. |
private functions | |
ITaskbarList() | returns a ITaskbarList object and initializes it. |
code | This section is only for those that don’t understand at all what’s going on in this code! |
ITaskbarList_ActivateTab( hWin )
Activates an item on the taskbar.
handle hWin | the handle to the window whose item should be activated. |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetActiveAlt( hWin )
Marks a taskbar item as active but does not visually activate it.
handle hWin | the handle to the window that should be marked as active. |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetProgressState( hGui, State )
sets the current state and thus the color of a taskbar progressbar
handle hGui | the window handle of your gui |
variant state | the state to set |
0 or S | stop displaying progress |
1 or I | indeterminate (similar to progress style PBS_MARQUEE), green |
2 or N | normal, by default green |
4 or E | error, by default red |
8 or P | paused, by default yellow |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_RegisterTab( hTab, hWin )
Informs the taskbar that a new tab or document thumbnail has been provided for display in an application’s taskbar group flyout.
handle hTab | the handle to the windo to be registered as a tab |
handle hWin | the handle to thew window to hold the tab. |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_UnRegisterTab( hTab )
Removes a thumbnail from an application’s preview group when that tab or document is closed in the application.
handle hTab | the handle to the window whose thumbnail gonna be removed. |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetTabOrder( hTab, hBefore = 0 )
Inserts a new thumbnail into an application’s group flyout or moves an existing thumbnail to a new position in the application’s group.
handle hTab | the handle to the window to be inserted or moved. |
handle hBefore | the handle of the tab window whose thumbnail that hwndTab is inserted to the left of. |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetTabActive( hTab, hWin )
Informs the taskbar that a tab or document window has been made the active window.
handle hTab | the handle to the tab to become active. |
handle hWin | the handle to the window holding that tab. |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetOverlayIcon( hGui, Icon )
set the overlay icon for a taskbar button
handle hGui | the window handle of your gui |
hIcon Icon | handle to an icon |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetThumbnailClip( hGui, x, y, w, h )
limit the taskbar thumbnail of a gui to a specified size instead of the whole window
handle hGui | the window handle of your gui |
int x | the x-coordinate of the area to show in the taskbar thumbnail |
int y | the y-coordinate of the area to show in the taskbar thumbnail |
int w | the width of the area to show in the taskbar thumbnail |
int h | the heigth of the area to show in the taskbar thumbnail |
HRESULT success | S_OK (0x000) on success, error code otherwise |
ITaskbarList_SetTabProperties( hTab, properties )
Allows a tab to specify whether the main application frame window or the tab window should be used as a thumbnail or in the peek feature.
handle hTab | the handle of the tab to work on. |
int properties | the properties to set. |
0 | none |
1 | use the thumbnail provided by the main application frame window. |
2 | use the thumbnail of the tab except when it is active. |
3 | use the peek image provided by the main application frame window. |
4 | use the peek image of the tab except when it is active. |
properties := 1|4
However, first lookup this page (http://msdn.microsoft.com
HRESULT success | S_OK (0x000) on success, error code otherwise |
This section is only for those that don’t understand at all what’s going on in this code!
When reading the code you will find lines like this:
return DllCall(NumGet(NumGet(ITaskbarList(3)+0)+19 * (A_PtrSize ? A_PtrSize : 4)), "uint", ITaskbarList(3), "UInt", hGui, "str", Tooltip)
Not a long time ago, I wouldn’t have understood this either. I’ll try to explain it a bit, as far as I understand it myself.
NumGet(ITaskbarList(3)+0)
The function call to ITaskbarList() gives us a pointer to the ITaskbarList3 interface. By using NumGet(), we actually get the interface itself.
NumGet(NumGet(ITaskbarList(3)+0)+19 * (A_PtrSize ? A_PtrSize : 4))
This is quite strange. In fact, the “interface” we got from the inner braces is a location in memory. It is the location of the objects “vtable” in memory. We now modify this location to get to a specific function in it.
The NumGet() gives us a pointer to the function itself.
DllCall(NumGet(NumGet(ITaskbarList(3)+0)+19 * (A_PtrSize ? A_PtrSize : 4)), "uint", ITaskbarList(3), "UInt", hGui, "str", Tooltip)
As you might notice, we not actually call a dll here, but a function in the memory. That’s what the help says about dllcall():
"In v1.0.46.08+, this parameter may also consist solely of an an integer, which is interpreted as the address of the function to call."
You might know AHK_L object syntax:
Object.Function() ; equivalent to: Function(Object)
In our case, it’s quite the same as the second one: We give the object itself as first parameter.
I don’t understand a lot of these things, too, so maybe there are several mistakes in that rubbish ;-) Corrections are always welcome :D
releases all ITaskbarList interfaces.
ITaskbarList_Finish( Interface = "all" )
adds an item to the taskbar.
ITaskbarList_AddTab( hWin )
deletes an item from the taskbar.
ITaskbarList_DeleteTab( hWin )
Activates an item on the taskbar.
ITaskbarList_ActivateTab( hWin )
Marks a taskbar item as active but does not visually activate it.
ITaskbarList_SetActiveAlt( hWin )
Marks a window as full-screen.
ITaskbarList_MarkFullscreen( hGui, ApplyRemove )
set the current value of a taskbar progressbar
ITaskbarList_SetProgressValue( hGui, Value )
sets the current state and thus the color of a taskbar progressbar
ITaskbarList_SetProgressState( hGui, State )
Informs the taskbar that a new tab or document thumbnail has been provided for display in an application’s taskbar group flyout.
ITaskbarList_RegisterTab( hTab, hWin )
Removes a thumbnail from an application’s preview group when that tab or document is closed in the application.
ITaskbarList_UnRegisterTab( hTab )
Inserts a new thumbnail into an application’s group flyout or moves an existing thumbnail to a new position in the application’s group.
ITaskbarList_SetTabOrder( hTab, hBefore = 0 )
Informs the taskbar that a tab or document window has been made the active window.
ITaskbarList_SetTabActive( hTab, hWin )
set the overlay icon for a taskbar button
ITaskbarList_SetOverlayIcon( hGui, Icon )
set a custom tooltip for your thumbnail
ITaskbarList_SetThumbnailTooltip( hGui, Tooltip )
limit the taskbar thumbnail of a gui to a specified size instead of the whole window
ITaskbarList_SetThumbnailClip( hGui, x, y, w, h )
Allows a tab to specify whether the main application frame window or the tab window should be used as a thumbnail or in the peek feature.
ITaskbarList_SetTabProperties( hTab, properties )
returns a ITaskbarList object and initializes it.
ITaskbarList( Interface )