Hallo:
In diesem .rar hier findet ihr ein png Bild und das Script.
http://www.box.net/shared/2z98a50mhi
Im GUI soll dieses PNG angezeigt werden - klappt auch.
Wenn man jetzt allerdings das GUI aus dem Desktop rausschiebt,
und dann wieder reinzieht, wird die ganze Grafik irgendwie "kantig."
Vorher:
autoit.de/wcf/attachment/8078/
Nachher:
autoit.de/wcf/attachment/8079/
Als ob GDI die Kantenglättung ausschaltet.
Kann mir einer sagen warum das so ist?
Hier nochmal das Script, falls jemand das .rar nicht runterladen möchte:
Spoiler anzeigen
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("DescribeIt Installer", 470, 260, -1, -1)
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\describeit.png")
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$idDestination = GUICtrlCreateGroup("Destination path", 16, 96, 433, 49)
$idPath = GUICtrlCreateInput("", 24, 112, 321, 21)
$id_browse = GUICtrlCreateButton("Browse...", 352, 112, 89, 25, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$idText = GUICtrlCreateLabel( _
"Setup will now install DescribeIt on your computer. Please your installation directory below." & @CRLF & _
"If the selected directory does not exist, it will be created.", 16, 152, 427, 50)
$idInstall = GUICtrlCreateButton("Start Installation", 304, 216, 145, 33, $WS_GROUP)
$idExit = GUICtrlCreateButton("Exit Installation", 16, 216, 137, 33, $WS_GROUP)
GUIRegisterMsg($WM_PAINT, "MY_WM_PAINT")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
; Clean up resources
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
Exit
EndSwitch
WEnd
; Draw PNG image
Func MY_WM_PAINT($hWnd, $Msg, $wParam, $lParam)
_WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_UPDATENOW)
_GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 10,-40)
_WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_VALIDATE)
Return $GUI_RUNDEFMSG
EndFunc ;==>MY_WM_PAINT
<- Vista 32 Bit.