hi
so far im setting an PNG to the control with this workaround a direct loading like the gif / jpg wont work??
$image_pic = GUICtrlCreatePic("", 16, 424, 305, 265)
Switch $type
Case "JPG"
GUICtrlSetImage($image_pic, $path)
Case "GIF"
GUICtrlSetImage($image_pic, $path)
Case "PNG"
_GDIPlus_Startup()
Local $hImage
$hImage = _GDIPlus_ImageLoadFromFile($path)
_GDIPlus_ImageSaveToFile($hImage, @ScriptDir & "\temp.jpg")
_GDIPlus_ImageDispose($hImage)
_GDIP
Yes,i forgot about that.Try it now:
FUnc _GUICtrlStatic_SetPicture($Control,Const $File,Const $SizeX,Const $SizeY,Const $KeepRatio = False)
Local Const $STM_SETIMAGE = 0x0172
Local Const $IMAGE_BITMAP = 0
IF NOT FileExists($File) Then Return SetError(1)
_GDIPlus_Startup()
Local $hResizedBitmap = _CreateBitmap($SizeX, $SizeY)
Local $hResizedImage = _GDIPlus_BitmapCreateFromHBITMAP($hResizedBitmap)
Local $hOrigImage = _GDIPlus_ImageLoadFromFile($File)
Local $hGraphics = _GDIP