Jump to content

[solved] How to write a icon handle to a file?


Exit
 Share

Recommended Posts

I want to extract a icon from shell32.dll and write it to a new file.

Here my non-working script:

#include <WinAPIIcons.au3>
$hIcon = _WinAPI_LoadShell32Icon(71)
; the next statement writes only a hexalue (e.g. 0x01CB07C9)to the file
; how to write the icon to the file?
FileWrite(@ScriptFullPath & ".ico", $hIcon)
_WinAPI_DestroyIcon($hIcon)

How to create the file?

got it myself: :thumbsup:

#include <WinAPIGdi.au3>
$hIcon = _WinAPI_LoadShell32Icon(71)
_WinAPI_SaveHICONToFile(@ScriptFullPath & ".ico", $hIcon)
_WinAPI_DestroyIcon($hIcon)

 

Edited by Exit

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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