Skip to content

Commit

Permalink
Update ResourcesEx.au3
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl committed Jun 17, 2023
1 parent aa410e2 commit 6afda35
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions sources/LiLi/ResourcesEx.au3
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <StaticConstants.au3>
#include <WinAPIMisc.au3>
#include <WinAPIRes.au3>
#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>

; Call once the script has ended to tidy up the used resources
Expand Down Expand Up @@ -56,7 +57,7 @@ _GDIPlus_Startup()
Fixed: @error and @extended not be passed back in nested functions e.g. _Resource_GetAsRaw()
2014/07/19
Added: _Resource_SetBitmapToCtrlID() formely known as _Resource_SetImageToCtrlID()
Added: _Resource_SetBitmapToCtrlID() formerly known as _Resource_SetImageToCtrlID()
Added: Note about using #AutoIt3Wrapper_Res_Icon_Add to the example. (Thanks Zedna)
Added: Passing a blank string to _Resource_SetToCtrlID() through the $sResNameOrID parameter, will delete the image and previous handle
Changed: _Resource_SetImageToCtrlID() now accepts a hBitmap not a HBITMAP object
Expand All @@ -68,7 +69,7 @@ _GDIPlus_Startup()
Fixed: Regression from loading the current of external module. (Thanks UEZ)
2014/07/17
Added: Additonal checks to destroy cursors and icons
Added: Additional checks to destroy cursors and icons
Added: Checking if the dll or exe filepath has a valid extension
Added: Example of using an icon and image on a button control
Fixed: Icons and cursors (finally) being re-sized to a control
Expand Down Expand Up @@ -128,10 +129,10 @@ _GDIPlus_Startup()
Changed: Re-size the storage array when destroyed or on shutdown
Fixed: _Resource_GetAsString() with default encoding of ANSI
Fixed: Calltips API referencing Resources.au3 and not ResourcesEx.au3
Removed: _Resource_Shudown() due to the addition of _Resource_Destroy() and _Resource_DestroyAll()
Removed: _Resource_Shutdown() due to the addition of _Resource_Destroy() and _Resource_DestroyAll()
2014/07/06:
Added: _Resource_Shudown() to free up those resources which aren't loaded using _WinAPI_LockResource(). UnlockResource is obsolete
Added: _Resource_Shutdown() to free up those resources which aren't loaded using _WinAPI_LockResource(). UnlockResource is obsolete
Added: Support for using $RT_STRING
Changed: _Resource_GetAsString() now works correctly for most encodings. (Thanks Jos)
Changed: _Resource_GetAsString() will now load as a string if the resource type requested is $RT_STRING
Expand Down Expand Up @@ -244,7 +245,7 @@ EndFunc ;==>_Resource_Destroy

; #FUNCTION# ====================================================================================================================
; Name ..........: _Resource_DestroyAll
; Description ...: Destroy all resources
; Description ...: Destroy all resources
; Syntax ........: _Resource_DestroyAll()
; Parameters ....: None
; Return values .: Success - True
Expand Down Expand Up @@ -784,7 +785,7 @@ Func _Resource_SetToCtrlID($iCtrlID, $sResNameOrID, $iResType = $RT_RCDATA, $sDl
$iError = @error

If $bReturn Then
If $__WINVER >= 0x0600 Then
If _WinAPI_GetVersion() >= 0x0600 Then
$bReturn = _WinAPI_DeleteObject($hHBITMAP) > 0 ; Delete if Vista or above
$vReturn = $bReturn
Else
Expand Down

0 comments on commit 6afda35

Please sign in to comment.