Jump to content

Recommended Posts

Posted (edited)

Thanks @UEZ

Is right ?.

Func _SetPicCtrl($iCtrlID, $myWidth, $myHeight, $ImgBinary)
    _GDIPlus_Startup()
    Local Const $STM_SETIMAGE = 0x0172
    Local $hTmp1 = _GDIPlus_BitmapCreateFromMemory($ImgBinary, True)
    Local $hTmp2 = _GDIPlus_ImageResize($hTmp1, $myWidth, $myHeight)
    Local Const $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hTmp2)
    _WinAPI_DeleteObject(GUICtrlSendMsg($iCtrlID, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap))
    _WinAPI_DeleteObject($hHBitmap)
    _GDIPlus_ImageDispose($hTmp1)
    _GDIPlus_ImageDispose($hTmp2)
EndFunc

After change to this code, it is show fatal error then exit app.

Edited by meoit

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...