lordicast Posted November 18, 2009 Share Posted November 18, 2009 Hello folks, Wondering if anyone had worked on anything to dock a Auto it Gui as a Windows Sidebar Gadget? Searched Gadget, Widget and docking onsite nothing that really matches up to nice anyone have any theories? [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Authenticity Posted November 18, 2009 Share Posted November 18, 2009 Franks Gadgets by AdmiralAlkex. Link to comment Share on other sites More sharing options...
lordicast Posted November 18, 2009 Author Share Posted November 18, 2009 Been there. Thats a whole new Windows docking system. Im just trying to write a add-on. [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Authenticity Posted November 18, 2009 Share Posted November 18, 2009 (edited) The main tasks to dock your GUI as a gadget is to use SystemParametersInfo with SPI_SETWORKAREA so maximizing another window won't be big as the entire screen hiding your gadget (or the taskbar for that matter). The rest is docking your window and disable it's default dragging support, title bar, etc..Edit: Example:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global Const $SPI_SETWORKAREA = 47 Global Const $SPI_GETWORKAREA = 48 Local $tRcWA = DllStructCreate($tagRECT) _WinAPI_SystemParametersInfo($SPI_GETWORKAREA, 0, DllStructGetPtr($tRcWA)) Local $iWidth = DllStructGetData($tRcWA, "Right")-DllStructGetData($tRcWA, "Left") Local $iHeight = DllStructGetData($tRcWA, "Bottom")-DllStructGetData($tRcWA, "Top") Local $hGUI = GUICreate("", 120, $iHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x101050) WinSetTrans($hGUI, 0, 170) Local $tRcNewWA = DllStructCreate($tagRECT) DllStructSetData($tRcNewWA, 1, 120) For $i = 2 To 4 DllStructSetData($tRcNewWA, $i, DllStructGetData($tRcWA, $i)) Next _WinAPI_SystemParametersInfo($SPI_SETWORKAREA, 0, DllStructGetPtr($tRcNewWA), 2) ; SPIF_SENDCHANGE GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() Exit Func OnAutoItExit() _WinAPI_SystemParametersInfo($SPI_SETWORKAREA, 0, DllStructGetPtr($tRcWA), 2) ; SPIF_SENDCHANGE EndFunc Edited November 18, 2009 by Authenticity Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 19, 2009 Share Posted November 19, 2009 (edited) Been there. Thats a whole new Windows docking system. Im just trying to write a add-on.If you want a "sidebar" then I recommend the Appbar UDF (that's the method used in Franks Gadget), but if you want to build a gadget for Windows Sidebar you need to learn HTML, Javascript and shit. Guide here. Edited November 19, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
lordicast Posted November 19, 2009 Author Share Posted November 19, 2009 @AA I kind of figured it would have to be html and java just trying to get around it. Damn O well thanks guys [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
zackrspv Posted January 18, 2010 Share Posted January 18, 2010 The main tasks to dock your GUI as a gadget is to use SystemParametersInfo with SPI_SETWORKAREA so maximizing another window won't be big as the entire screen hiding your gadget (or the taskbar for that matter). The rest is docking your window and disable it's default dragging support, title bar, etc.. Edit: Example: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global Const $SPI_SETWORKAREA = 47 Global Const $SPI_GETWORKAREA = 48 Local $tRcWA = DllStructCreate($tagRECT) _WinAPI_SystemParametersInfo($SPI_GETWORKAREA, 0, DllStructGetPtr($tRcWA)) Local $iWidth = DllStructGetData($tRcWA, "Right")-DllStructGetData($tRcWA, "Left") Local $iHeight = DllStructGetData($tRcWA, "Bottom")-DllStructGetData($tRcWA, "Top") Local $hGUI = GUICreate("", 120, $iHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x101050) WinSetTrans($hGUI, 0, 170) Local $tRcNewWA = DllStructCreate($tagRECT) DllStructSetData($tRcNewWA, 1, 120) For $i = 2 To 4 DllStructSetData($tRcNewWA, $i, DllStructGetData($tRcWA, $i)) Next _WinAPI_SystemParametersInfo($SPI_SETWORKAREA, 0, DllStructGetPtr($tRcNewWA), 2) ; SPIF_SENDCHANGE GUISetState() Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() Exit Func OnAutoItExit() _WinAPI_SystemParametersInfo($SPI_SETWORKAREA, 0, DllStructGetPtr($tRcWA), 2) ; SPIF_SENDCHANGE EndFunc Bravo, nice bit of example code there. Quick question, how does one get back the part of the desktop that the dock reserves. I had to force close it as it killed itself on my win7, and now that side of my desktop (left side) is kinda well empty, looks cool lol, but um, i'd like that space back -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now