meoit Posted December 12, 2016 Author Share Posted December 12, 2016 (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 December 12, 2016 by meoit Link to comment Share on other sites More sharing options...
meoit Posted December 12, 2016 Author Share Posted December 12, 2016 OK, i fixed. change to Local $hTmp1 = _GDIPlus_BitmapCreateFromMemory($ImgBinary, False) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now