Sign in to follow this  
Followers 0
ludocus

Making a GUI on the taskbar?

5 posts in this topic

Hi!

I'd like to know how to make a little window that sticks to the taskbar, like iTunes has.

I know how to do it with WinSetOnTop en then just position it on the taskbar.

But that's not really how I want it. I want it...well....just like iTunes has ;).

Thnx in advance :)

Share this post


Link to post
Share on other sites



http://msdn.microsoft.com/en-us/library/bb776819%28VS.85%29.aspx

Scroll down just a little bit. They're called "Deskbands", maybe that will give you more hits at google.

Share this post


Link to post
Share on other sites

Good luck! I asked this some time ago and got a response pointing to someone who had asked the same thing, can't find it right now, but the conclusion is that it's not easy.

I'd try _WinApi_SetParent().

#include<WinApi.au3>
#include<WindowsConstants.au3>

Global $hTaskbar = WinGetHandle("[CLASS:Shell_TrayWnd]")
Global $aTaskbarSize = WinGetPos("[CLASS:Shell_TrayWnd]")
Global $hNotifyTray = ControlGetHandle($hTaskbar, "", "[CLASS:TrayNotifyWnd; INSTANCE:1]")
Global $aNotifyTraySize = ControlGetPos($hTaskbar, "", $hNotifyTray)

Local $nMyWidth = 100

$hGUI = GUICreate("test", 100, $aTaskbarSize[3] - 4, $aTaskbarSize[2] - $aNotifyTraySize[2] - $nMyWidth - 20, 2, $WS_POPUP, $WS_EX_TOOLWINDOW)

$hBtn = GUICtrlCreateButton("X", $nMyWidth - 24, 2, 20, 20)

GUISetState()

_WinAPI_SetParent($hGUI, $hTaskbar)

While 1
    Switch GUIGetMsg()
        Case -3, $hBtn
            ExitLoop
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0