Hallo, ich hab ein script wo die chackbox transparent ist (von Greenhorn) aber ich bruache das für ein Editfeld, kann mir jemadn sagen wie ddas geht?
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
; Dies ist der erste Streich ...
GUIRegisterMsg($WM_CTLCOLORSTATIC, 'WM_CTLCOLORSTATIC')
$hWndMain = GUICreate("My CheckBox Button with Transparency", 300, 200, _
-1, -1, _
$WS_OVERLAPPEDWINDOW)
GUISetBkColor(0x00ff00)
[/autoit] [autoit][/autoit] [autoit]$pic = GUICtrlCreatePic(@SystemDir & '\oobe\images\wpaback.jpg', 0, 0, 300, 200)
GUICtrlSetState(-1, $GUI_DISABLE)
$btnCheckBox = GUICtrlCreateCheckbox('Checkbox', 100, 90, 100, 20)
; ... und der zweite folgt sogleich. ![]()
DllCall('UxTheme.dll', 'int', 'SetWindowTheme', 'hwnd', GUICtrlGetHandle(-1), 'wstr', ' ', 'wstr', ' ')
$btnPushButton = GUICtrlCreateButton('PushButton', 110, 150, 80, 20)
[/autoit] [autoit][/autoit] [autoit]GUISetState()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While True
[/autoit] [autoit][/autoit] [autoit]Switch GUIGetMsg()
Case - 3
Exit
EndSwitch
WEnd
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit];========================================================================================
; WM_CTLCOLORSTATIC ($hDC, $hCtrl)
;========================================================================================
Func WM_CTLCOLORSTATIC($hWnd, $Msg, $wParam, $lParam)
Local $hDC = $wParam
[/autoit] [autoit][/autoit] [autoit]SetBkMode($hDC, $TRANSPARENT)
Return _WinAPI_GetStockObject(5) ; 5 = NULL_BRUSH/HOLLOW_BRUSH
EndFunc ;==>WM_CTLCOLORSTATIC
[/autoit] [autoit][/autoit] [autoit];========================================================================================
; Func SetBkMode ()
;========================================================================================
Func SetBkMode($hDC, $flag = 0)
If ($flag < 0 Or $flag > 1) Then Return SetError(1)
[/autoit] [autoit][/autoit] [autoit]DllCall('gdi32.dll', 'int', 'SetBkMode', _
'hwnd', $hDC, _ ; handle to Decive Context
'int', $flag) ; $flag: 1 = TRANSPARENT, 0 = OPAQUE
EndFunc ;==>SetBkMode
[/autoit]