Hallo,
gibt es eine möglichkeit Eigene Buttons in der Titelleiste hinzuzufügen?
wäre nicht schlecht, wenn der button dann in jeder aktiven titelleiste vorhanden wäre.
gruß gmmg
Hallo,
gibt es eine möglichkeit Eigene Buttons in der Titelleiste hinzuzufügen?
wäre nicht schlecht, wenn der button dann in jeder aktiven titelleiste vorhanden wäre.
gruß gmmg
Das ist das Grundgerüst:
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Constants.au3>
#region - GUI Create
DllCall("UxTheme.dll","int","SetThemeAppProperties","dword",0)
$GUI = GUICreate('PopUp',20,20,-1,-1,$WS_POPUP,$WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
GUISetBkColor(_WinAPI_GetSysColor($COLOR_ACTIVEBORDER))
$Button = GUICtrlCreateButton("2",0,0,20,20,$BS_CENTER)
GUICtrlSetFont(-1,12,400,0,"Wingdings")
DllCall("UxTheme.dll","int","SetThemeAppProperties","dword",3)
GUISetState(@SW_SHOWNOACTIVATE)
#endregion
$hwnd = -1
$w = 0
CheckWin()
AdlibEnable("CheckWin",100)
#region - GUI SelectLoop
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $Button
MsgBox(0, '', "hi")
WinActivate($hwnd)
Case $hwnd <> $GUI And WinExists($hwnd)
$pos = WinGetPos($hwnd)
WinMove($GUI,"",$pos[0]+$pos[2]-$w,$pos[1]+4)
EndSelect
WEnd
#endregion
Func CheckWin()
Local $hwnd1 = WinGetHandle("")
If $hwnd1 <> $GUI And $hwnd <> $hwnd1 Then
Global $hwnd = $hwnd1
$Style = _WinAPI_GetWindowLong($hwnd,$GWL_STYLE)
$w = 5
If BitAND($Style,$WS_MINIMIZEBOX) Then $w += 30
If BitAND($Style,$WS_SYSMENU) Then $w += 70
If BitAND($Style,$WS_MAXIMIZEBOX) Then $w += 30
EndIf
EndFunc
hi progandy,
danke erstmal
das ist genau die lösung...
gruß gmmg