Schaue mal hier -> http://www.autoitscript.com/forum/index.php?showtopic=97159, ob dir das weiterhilft!
Gruß,
UEZ
Schaue mal hier -> http://www.autoitscript.com/forum/index.php?showtopic=97159, ob dir das weiterhilft!
Gruß,
UEZ
Auch von mir Happy Birthday und alles Gute!
Gruß,
UEZ
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=e:\meine programme\test\auto reg\form1.kxf
$Form1_1 = GUICreate("Auto-Reg", 633, 454, 192, 114)
$Radio1 = GUICtrlCreateRadio("Radio1", 16, 48, 17, 25)
GUICtrlSetColor(-1, 0xFFFFE1)
$Label1 = GUICtrlCreateLabel("S/ EP", 48, 46, 120, 34)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Black")
GUICtrlSetColor(-1, 0x0A246A)
$Radio2 = GUICtrlCreateRadio("Radio2", 16, 120, 17, 25)
GUICtrlSetColor(-1, 0xFFFFE1)
$Label2 = GUICtrlCreateLabel("C", 48, 118, 120, 34)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Black")
GUICtrlSetColor(-1, 0x0A246A)
$Radio3 = GUICtrlCreateRadio("Radio3", 16, 192, 17, 25)
GUICtrlSetColor(-1, 0xFFFFE1)
$Label3 = GUICtrlCreateLabel("AD", 49, 191, 120, 34)
GUICtrlSetFont(-1, 13, 400, 0, "Arial Black")
GUICtrlSetColor(-1, 0x0A246A)
$buttonA = GUICtrlCreateButton("A", 200, 48)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonB = GUICtrlCreateButton("B", 250, 48)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonC = GUICtrlCreateButton("C", 300, 48)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonD = GUICtrlCreateButton("D", 200, 120)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonE = GUICtrlCreateButton("E", 250, 120)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonF = GUICtrlCreateButton("F", 300, 120)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonG = GUICtrlCreateButton("G", 200, 192)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonH = GUICtrlCreateButton("H", 250, 192)
GUICtrlSetState(-1, $GUI_HIDE)
$buttonI = GUICtrlCreateButton("I", 300, 192)
GUICtrlSetState(-1, $GUI_HIDE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
GUICtrlSetState($buttonA, $GUI_SHOW)
GUICtrlSetState($buttonB, $GUI_SHOW)
GUICtrlSetState($buttonC, $GUI_SHOW)
GUICtrlSetState($buttonD, $GUI_HIDE)
GUICtrlSetState($buttonE, $GUI_HIDE)
GUICtrlSetState($buttonF, $GUI_HIDE)
GUICtrlSetState($buttonG, $GUI_HIDE)
GUICtrlSetState($buttonH, $GUI_HIDE)
GUICtrlSetState($buttonI, $GUI_HIDE)
Case $Radio2
GUICtrlSetState($buttonA, $GUI_HIDE)
GUICtrlSetState($buttonB, $GUI_HIDE)
GUICtrlSetState($buttonC, $GUI_HIDE)
GUICtrlSetState($buttonD, $GUI_SHOW)
GUICtrlSetState($buttonE, $GUI_SHOW)
GUICtrlSetState($buttonF, $GUI_SHOW)
GUICtrlSetState($buttonG, $GUI_HIDE)
GUICtrlSetState($buttonH, $GUI_HIDE)
GUICtrlSetState($buttonI, $GUI_HIDE)
Case $Radio3
GUICtrlSetState($buttonA, $GUI_HIDE)
GUICtrlSetState($buttonB, $GUI_HIDE)
GUICtrlSetState($buttonC, $GUI_HIDE)
GUICtrlSetState($buttonD, $GUI_HIDE)
GUICtrlSetState($buttonE, $GUI_HIDE)
GUICtrlSetState($buttonF, $GUI_HIDE)
GUICtrlSetState($buttonG, $GUI_SHOW)
GUICtrlSetState($buttonH, $GUI_SHOW)
GUICtrlSetState($buttonI, $GUI_SHOW)
EndSwitch
WEnd
So vielleicht?
Gruß,
UEZ
PS: Friede sei mit dir 
Alles Gute zum Geburtstag wünscht euch UEZ 
Eine Exe in SCR umbenennen macht daraus nicht umbedingt einen richtigen Screensaver - das ist ein wenig komplizierter ![]()
Anonsonsten sieht es gut aus ![]()
Gruß,
UEZ
Hier was aus dem engl. Forum: FAF Archive format
Slm,
UEZ
name22, du entwickelst dich ganz gut in Sachen GDI+
Weiter so ![]()
Btw, ich hatte auch mal so was ähnliches geschrieben - > Particle Explosions
In meinem Kopf schwirrt immer noch die Implementierung eines Feuerwerks rum :wacko: Mal sehen, wann ich es umsetzen kann...
Gruß,
UEZ
UEZ
hast du nicht noch ne idee wie man das ganze transparent machen kann?also das die zeit dann aufm desktop ist und man die dortrumwerfen kann?
Also, mein Desktop hat die Auflösung 1920x1200 -> kann langsam werden, wenn man "double buffering" benutzt!
Ja, ich hatte doch mal was mit "Rotating Letters Transparent" veröffentlicht! Dort werden die Buchstaben transparent auf den Desktop dargestellt (nur eine Illusion)!
Schau' mal in meiner Signatur.
Gruß,
UEZ
Nimm doch anstelle der Uhr eine Kugel, die du in der GUI "rumwerfen" kannst, natürlich mit Gravitation. ![]()
Gruß,
UEZ
Sollte mit dieser Funktion sollte es so funktionieren, wie du es willst oder?
[autoit]
...
Func _MenuShow()
_Time("stop")
HotKeySet("{PAUSE}")
Local $iWidth = 200
Local $iHeight = 300
Local $iRadius = 30
Local $iOffset = 3
GUISetState(@SW_DISABLE, $hGui)
Opt("GUIOnEventMode", 0)
$hGuiMenu = GUICreate("Menü", $iWidth + 6, $iHeight + 6, -1, -1, 0, $WS_EX_LAYERED)
$hGuiMenu1 = GUICreate("", 80, 25, -1, -1, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOPMOST, $hGuiMenu)
GUISetBkColor(0xF0F0F0)
$hContinue = GUICtrlCreateButton("Weiter", 0, 0, 80, 25)
GUISetState(@SW_SHOW, $hGuiMenu1)
GUISetState(@SW_SHOW, $hGuiMenu)
_WinAPI_SetLayeredWindowAttributes($hGuiMenu1, 0xF0F0F0)
WinSetTrans ($hGuiMenu1, "", 0xC0)
$hGraphicMenu = _GDIPlus_GraphicsCreateFromHWND($hGuiMenu)
$hBitmapMenu = _GDIPlus_BitmapCreateFromGraphics($iWidth + 6, $iHeight + 6, $hGraphicMenu)
$hBufferMenu = _GDIPlus_ImageGetGraphicsContext($hBitmapMenu)
#region
$ScreenDc = _WinAPI_GetDC($hGuiMenu)
$gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmapMenu)
$dc = _WinAPI_CreateCompatibleDC($ScreenDc)
_WinAPI_SelectObject($dc, $gdibitmap)
; _WinAPI_UpdateLayeredWindow parameters
$tSize = DllStructCreate($tagSIZE)
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", $iWidth + 6)
DllStructSetData($tSize, "Y", $iHeight + 6)
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate($tagBLENDFUNCTION)
$pBlend = DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha", 0xF0)
DllStructSetData($tBlend, "Format", 1)
$tPoint = DllStructCreate($tagPOINT)
$pPoint = DllStructGetPtr($tPoint)
DllStructSetData($tPoint, "X", 0)
DllStructSetData($tPoint, "Y", 0)
$Brush_BG = _GDIPlus_BrushCreateSolid(0xAAFFA500)
$Pen_BG_Line = _GDIPlus_PenCreate(0xFF000000, 3)
$Pen_BG_Arc = _GDIPlus_PenCreate(0xFF000000, 3)
_GDIPlus_GraphicsFillRect($hBufferMenu, $iOffset, $iRadius + $iOffset, $iRadius, $iHeight - $iRadius * 2, $Brush_BG)
_GDIPlus_GraphicsFillPie($hBufferMenu, $iOffset, $iOffset, $iRadius * 2, $iRadius * 2, 180, 90, $Brush_BG)
_GDIPlus_GraphicsFillRect($hBufferMenu, $iRadius + $iOffset, $iOffset, $iWidth - $iRadius * 2, $iRadius, $Brush_BG)
_GDIPlus_GraphicsFillPie($hBufferMenu, $iWidth - $iRadius * 2 + $iOffset, $iOffset, $iRadius * 2, $iRadius * 2, 270, 90, $Brush_BG)
_GDIPlus_GraphicsFillRect($hBufferMenu, $iWidth - $iRadius + $iOffset, $iRadius + $iOffset, $iRadius, $iHeight - $iRadius * 2, $Brush_BG)
_GDIPlus_GraphicsFillPie($hBufferMenu, $iWidth - $iRadius * 2 + $iOffset, $iHeight - $iRadius * 2 + $iOffset, $iRadius * 2, $iRadius * 2, 0, 90, $Brush_BG)
_GDIPlus_GraphicsFillRect($hBufferMenu, $iRadius + $iOffset, $iHeight - $iRadius + $iOffset, $iWidth - $iRadius * 2, $iRadius, $Brush_BG)
_GDIPlus_GraphicsFillPie($hBufferMenu, $iOffset, $iHeight - $iRadius * 2 + $iOffset, $iRadius * 2, $iRadius * 2, 90, 90, $Brush_BG)
_GDIPlus_GraphicsFillRect($hBufferMenu, $iRadius + $iOffset, $iRadius + $iOffset, $iWidth - $iRadius * 2, $iHeight - $iRadius * 2, $Brush_BG)
_GDIPlus_GraphicsSetSmoothingMode($hBufferMenu, 2)
_GDIPlus_GraphicsDrawLine($hBufferMenu, $iOffset, $iHeight - $iRadius + $iOffset, $iOffset, $iRadius + $iOffset, $Pen_BG_Line)
_GDIPlus_GraphicsDrawArc($hBufferMenu, $iOffset, $iOffset, $iRadius * 2, $iRadius * 2, 180, 90, $Pen_BG_Arc)
_GDIPlus_GraphicsDrawLine($hBufferMenu, $iRadius + $iOffset, $iOffset, $iWidth - $iRadius + $iOffset, $iOffset, $Pen_BG_Line)
_GDIPlus_GraphicsDrawArc($hBufferMenu, $iWidth - $iRadius * 2 + $iOffset, $iOffset, $iRadius * 2, $iRadius * 2, 270, 90, $Pen_BG_Arc)
_GDIPlus_GraphicsDrawLine($hBufferMenu, $iWidth + $iOffset, $iRadius + $iOffset, $iWidth + $iOffset, $iHeight - $iRadius + $iOffset, $Pen_BG_Line)
_GDIPlus_GraphicsDrawArc($hBufferMenu, $iWidth - $iRadius * 2 + $iOffset, $iHeight - $iRadius * 2 + $iOffset, $iRadius * 2, $iRadius * 2, 0, 90, $Pen_BG_Arc)
_GDIPlus_GraphicsDrawLine($hBufferMenu, $iRadius + $iOffset, $iHeight + $iOffset, $iWidth - $iRadius + $iOffset, $iHeight + $iOffset, $Pen_BG_Line)
_GDIPlus_GraphicsDrawArc($hBufferMenu, $iOffset, $iHeight - $iRadius * 2 + $iOffset, $iRadius * 2, $iRadius * 2, 90, 90, $Pen_BG_Arc)
_GDIPlus_GraphicsSetSmoothingMode($hBufferMenu, 2)
$gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmapMenu)
_WinAPI_SelectObject($dc, $gdibitmap)
_WinAPI_UpdateLayeredWindow($hGuiMenu, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, 2)
_WinAPI_DeleteObject($gdibitmap)
;~ _GDIPlus_GraphicsDrawImageRect($hGraphicMenu, $hBitmapMenu, 0, 0, $iWidth + 6, $iHeight + 6)
#endregion
While 1
Switch GUIGetMsg()
Case $hContinue
_GDIPlus_PenDispose($Pen_BG_Line)
_GDIPlus_PenDispose($Pen_BG_Arc)
_GDIPlus_BrushDispose($Brush_BG)
_WinAPI_DeleteDC($dc)
_WinAPI_ReleaseDC($hGuiMenu, $ScreenDc)
_GDIPlus_GraphicsDispose($hBufferMenu)
_GDIPlus_BitmapDispose($hBitmapMenu)
$tSize = ""
$tSource = ""
$tBlend = ""
$tPoint = ""
GUISetState(@SW_ENABLE, $hGui)
GUIDelete($hGuiMenu)
GUIDelete($hGuiMenu1)
Opt("GUIOnEventMode", 1)
HotKeySet("{PAUSE}", "_MenuShow")
_Time("start")
Return
EndSwitch
WEnd
EndFunc
...
Gruß,
UEZ
Füge in der Funktion _MenuShow() _WinAPI_SetLayeredWindowAttributes($hGuiMenu, 0xf0f0f0) ein.
[autoit]
...
$hGuiMenu = GUICreate("Menü", $iWidth + 6, $iHeight + 6, Default, Default, $WS_POPUP, $WS_EX_LAYERED, $hGui)
$hContinue = GUICtrlCreateButton("Weiter", 40, 40, 80, 25)
_WinAPI_SetLayeredWindowAttributes($hGuiMenu, 0xf0f0f0)
GUISetState()
...
Dann sollte die GUI transparent sein.
Gruß,
UEZ
Alles anzeigenHi,
habe mal einen Bitmap2HTML gebastelt.
Ein Screenshot wird erstellt, dessen Pixel ausgelesen werden und als HTML-Datei dann abgespeichert werden...Bei der Darstellung des "Bildes" sollte man STRG+Mausradrollen betätigen, und fleissig "Zoomen"^^Spoiler anzeigen
[autoit]#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GDIPlusConstants.au3>
#include <ScreenCapture.au3>$BMPfile = "test.jpg"
[/autoit] [autoit][/autoit] [autoit]
_ScreenCapture_Capture($BMPfile)$t = TimerInit()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$htmlfile = _BMP2HTML($BMPfile, 1, 1, 198, 99) ;
$m = TimerDiff($t)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $m = ' & $m & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
FileDelete($BMPfile)
ShellExecute("pic.html")Func _BMP2HTML($BMPfile, $startX, $startY, $endX, $endY) ;Bitmapfiles, 32BBP
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_Startup()
$pBitmap = _GDIPlus_BitmapCreateFromFile($BMPfile)
If @error Then MsgBox(0, "Fehler Modul _BMP2HTML", "Error BitmapCreateFromFile")
$BitmapData = _GDIPlus_BitmapLockBits($pBitmap, 0, 0, _GDIPlus_ImageGetWidth($pBitmap), _GDIPlus_ImageGetHeight($pBitmap), $GDIP_ILMREAD, $GDIP_PXF32RGB)
If @error Then MsgBox(0, "Fehler Modul _BMP2HTML", "Error BitmapLockBits" & @error)
$stride = DllStructGetData($BitmapData, "Stride") ;Anzahl der Bytes in einer Scanline (Zeile) bei 32 Bit ist Stride=4*Breite (ein Pixel =4 Bytes BBGGRRAA
$Width = DllStructGetData($BitmapData, "Width") ;BMP Breite
$Height = DllStructGetData($BitmapData, "Height") ;BMP Höhe
$ptr = DllStructGetData($BitmapData, "Scan0") ;Scan0 - Pointer zom ersten Pixel in der Bitmap$data = ""
[/autoit] [autoit][/autoit] [autoit]For $y = $startY - 1 To $endY - 1
[/autoit]
For $x = $startX - 1 To $endX - 1
$struct = DllStructCreate("dword", $ptr + $stride * $y + 4 * $x) ; 4 bytes BBGGRRXX, little endian lesen
$color = Hex(DllStructGetData($struct, 1), 6) ;nur die letzten 3 Byte RGB
$data &= '<font color="#' & $color & '">' & Chr(64) & '</font>'
Next
$data &= "<br>"
Next
FileDelete("pic.html")
FileWrite("pic.html", $data)
_GDIPlus_BitmapUnlockBits($pBitmap, $BitmapData)
_GDIPlus_ImageDispose($pBitmap)
_GDIPlus_Shutdown()
Return "pic.html"
EndFunc ;==>_BMP2HTML
Cooool ![]()
Gruß,
UEZ
PS: AAAAAAAAAAAAAAAMMMMMMMMMMMMMMMMMMMMIIIIIIIIIIIIIIIIIIIIIIGGGGGGGGGGGGGGGGGGGGGAAAAAAAAAAAAAAAAAAAAAAAAAA
Ich habe das mal so gemacht,
[autoit]
#include <GuiConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
[/autoit][autoit][/autoit][autoit]$Debug_IP = False ; Check ClassName being passed to IPAddress functions, set to True and use a handle to another control to see it work
[/autoit][autoit][/autoit][autoit]Local $hgui, $hIPAddress
[/autoit][autoit][/autoit][autoit]$hgui = GUICreate("IP Address Control Get (String) Example", 400, 300)
$hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10, 125, 25, BitOR($WS_TABSTOP,$WS_VISIBLE,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]Local $tRECT = DllStructCreate($tagRect)
DllStructSetData($tRECT, "Left", 0)
DllStructSetData($tRECT, "Top", 0)
DllStructSetData($tRECT, "Right", 125)
DllStructSetData($tRECT, "Bottom", 25)
Local $hBrush = _WinAPI_CreateSolidBrush(0x0000FF) ;BGR
Local $hDC = _WinAPI_GetDC($hIPAddress)
_WinAPI_FillRect($hDC, DllStructGetPtr($tRect), $hBrush)
;~ Local $sFaceName = "Arial", $iFontSize = 12, $iFontWeight = 400, $fFontItalic = False
;~ Local $lfHeight = 14
;~ Local $tfont = DllStructCreate($tagLOGFONT)
;~ DllStructSetData($tfont, "Height", $lfHeight)
;~ DllStructSetData($tfont, "Weight", $iFontWeight)
;~ DllStructSetData($tfont, "Italic", $fFontItalic)
;~ DllStructSetData($tfont, "Underline", False) ; font underline
;~ DllStructSetData($tfont, "Strikeout", False) ; font strikethru
;~ DllStructSetData($tfont, "Quality", $__IPADDRESSCONSTANT_PROOF_QUALITY)
;~ DllStructSetData($tfont, "FaceName", $sFaceName)
;~ Local $font = _WinAPI_CreateFontIndirect($tfont)
;~ _WinAPI_SetFont($hIPAddress, $font)
;~ _GUICtrlIpAddress_Set ($hIPAddress, "24.168.2.128")
;~ _WinAPI_SetTextColor($hDC, 0x00)
;~ _WinAPI_SetBkColor($hDC, 0x0000FF)
;~ _WinAPI_SetBkMode($hDC, $TRANSPARENT)
;~ __EnumChild($hIPAddress)
GUIRegisterMsg(0x0138, "_WM_CTLCOLORSTATIC")
[/autoit][autoit][/autoit][autoit]; Wait for user to close GUI
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
$tRECT = ""
_WinAPI_ReleaseDC(0, $hDC)
_WinAPI_DeleteObject($hBrush)
GUIDelete($hgui)
Exit
Func _WM_CTLCOLORSTATIC($hWnd, $Msg, $wParam, $lParam)
ConsoleWrite("Test" & @CRLF)
Local $hDC = _WinAPI_GetDC($wParam)
_WinAPI_SetTextColor($hDC, 0x00FF00)
_WinAPI_SetBkColor($hDC, 0x0000FF)
_WinAPI_SetBkMode($hDC, $TRANSPARENT)
_WinAPI_ReleaseDC(0, $hDC)
Return "GUI_RUNDEFMSG"
EndFunc
;~ Func __EnumChild($hWnd, $lParam = 0)
;~ Local $hFunc = DllCallbackRegister("__EnumChildProc", "bool", "hwnd;lparam")
;~ DllCall("user32.dll", "bool", "EnumChildWindows", "hwnd", $hWnd, "ptr", DllCallbackGetPtr($hFunc), "lparam", $lParam)
;~ DllCallbackFree($hFunc)
;~ EndFunc ;==>__EnumChild
;~ Func __EnumChildProc($hWnd, $lParam)
;~ ConsoleWrite("child: " & $hWnd & @CRLF)
;~ WinSetTitle($hWnd, 0, "XXX")
;~ GUISetBkColor (0x0000FF, $hWnd)
;~ _WinAPI_SetTextColor($hDC, 0x00FF00)
;~ _WinAPI_SetBkColor($hDC, 0x0000FF)
;~ _WinAPI_SetBkMode($hDC, $TRANSPARENT)
;~ ;_WinAPI_SetBkColor...
;~ ;_SendMessage...
;~ Return 1
;~ EndFunc ;==>__EnumChildProc
aber vielleicht ist das ja so falsch!
Gruß,
UEZ
Hat jemand noch eine Idee, wie man die Hintergrundfarbe eines GUI IP Address Control Feldes ändern kann?
[autoit]
#include <GuiConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
[/autoit][autoit][/autoit][autoit]$Debug_IP = False ; Check ClassName being passed to IPAddress functions, set to True and use a handle to another control to see it work
[/autoit][autoit][/autoit][autoit]_Main()
[/autoit][autoit][/autoit][autoit]Func _Main()
Local $hgui, $hIPAddress
$hgui = GUICreate("IP Address Control Get (String) Example", 400, 300)
$hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10, 125, 25, BitOR($WS_TABSTOP,$WS_VISIBLE,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]Local $tRECT = DllStructCreate($tagRect)
DllStructSetData($tRECT, "Left", 0)
DllStructSetData($tRECT, "Top", 0)
DllStructSetData($tRECT, "Right", 125)
DllStructSetData($tRECT, "Bottom", 25)
Local $hBrush = _WinAPI_CreateSolidBrush(0x0000FF) ;BGR
Local $hDC = _WinAPI_GetDC($hIPAddress)
_WinAPI_FillRect($hDC, DllStructGetPtr($tRect), $hBrush)
;~ _GUICtrlIpAddress_Set ($hIPAddress, "24.168.2.128")
_WinAPI_SetTextColor($hDC, 0x00)
_WinAPI_SetBkColor($hDC, 0x0000FF)
_WinAPI_SetBkMode($hDC, $TRANSPARENT)
; Wait for user to close GUI
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
$tRECT = ""
_WinAPI_ReleaseDC(0, $hDC)
_WinAPI_DeleteObject($hBrush)
GUIDelete($hgui)
Exit
EndFunc ;==>_Main
Sobald man was einträgt, überschreibt der Font den Hintergrund wieder...
Oder vielleicht doch einen anderen Lösungsweg? ![]()
Gruß,
UEZ
Suche mal in der Hilfe nach "WM_COMMAND". Dort sind einige Beispiele angegeben.
Oder schaue mal hier: Integer <=> Binary Converter v1.0 Build 2010-01-15 (Schleichwerbung
)
Gruß,
UEZ
Probiere es mal mit dem $WM_COMMAND -> z.B. GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND')
Gruß,
UEZ
PS: ich habe es eben auch gebraucht, um zu prüfen, ob ein Input Feld nicht leer ist. Man muss ja nicht gleich den Teufel an die Wand malen...
Scheint eine ganz nette Info Seite zu sein: http://wiki.hydrogenaudio.org/index.php?title=Topic_Index
Ich benutze i.d.R. Lame mit der --alt-preset standard Einstellung.
Gruß,
UEZ
PS: ohne die Codecs können wir nicht testen ![]()
Hier mein Lösungsvorschlag!
Gruß,
UEZ
PS: auf die Schnelle erstellt!
Gut aufgepasst ![]()
Jetzt wo du es sagt, kann ich das auch sehen, wenn ich leicht versetzt auf den Schirm schaue..
Danke,
UEZ
So sollte es gehen:
#include <GDIPlus.au3>
#include <Misc.au3>
#include <WinAPI.au3>
;~ $col = _ChooseColor (2)
$col = 0x22B14C
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$Gui = GUICreate("")
;~ $Graphic = GUICtrlCreateGraphic(0, 0, 100, 32)
GUISetState()
;~ $hDC = _WinAPI_GetDC(GUICtrlGetHandle($Graphic))
;~ ConsoleWrite($hDC & @CRLF)
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(100, 32, $hGraphic)
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hFontFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFontFamily, 20)
$tLayout = _GDIPlus_RectFCreate(0, 0, 100, 32)
$hFormat = _GDIPlus_StringFormatCreate()
$hBrush = _GDIPlus_BrushCreateSolid(0xff000000 + $col)
For $x = 0 To 9
_GDIPlus_GraphicsFillRect($hBackbuffer, 0, 0, 90, 32)
_GDIPlus_GraphicsDrawStringEx($hBackbuffer, AddZero($x, 5), $hFont, $tLayout, $hFormat, $hBrush)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, 100, 32)
$ret = _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\1\" & $x & ".bmp")
ConsoleWrite($ret & @CRLF)
[/autoit] [autoit][/autoit] [autoit]Sleep(10)
Next
Do
Until GUIGetMsg() = -3
Func AddZero($nZahl, $EndLen)
While 1
If StringLen($nZahl) >= $EndLen Then
Return $nZahl
Else
$nZahl = "0" & $nZahl
EndIf
WEnd
EndFunc ;==>AddZero
_GDIPlus_FontFamilyDispose($hFontFamily)
_GDIPlus_FontDispose($hFont)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
Gruß,
UEZ