Modify ↓
Opened 15 years ago
Closed 13 years ago
#1683 closed Feature Request (Rejected)
Displaying thumbnails of files in a GUI
Reported by: | Eric | Owned by: | Jon |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | Severity: | None | |
Keywords: | Cc: |
Description
It would be great to have a function who can get and display thumbnails of files in a GUI.
Not only JPG, BMP but PDF, DOC...
Thanks
Eric
Attachments (0)
Change History (7)
comment:1 Changed 15 years ago by anonymous
comment:2 Changed 15 years ago by Eric
GUICtrlCreateIcon works fine for icons but not for thumbnails.
comment:3 Changed 15 years ago by Jpm
Which API can be used to display thumbnails?
comment:4 Changed 15 years ago by Eric
I don't know but i have found a method who works for Windows XP but not for Windows 7.
comment:5 Changed 14 years ago by Jpm
- Owner set to Jon
- Status changed from new to assigned
comment:6 Changed 13 years ago by guinness
Your request can be achieved by using the following example.
#include <APIConstants.au3> ; Download from http://www.autoitscript.com/forum/topic/98712-winapiex-udf/ #include <Constants.au3> #include <GUIConstantsEx.au3> #include <WinAPIEx.au3> ; Download from http://www.autoitscript.com/forum/topic/98712-winapiex-udf/ Local $iIcon GUICreate("", 128, 128) $iIcon = GUICtrlCreateIcon("", 0, 48, 48, 32, 32) _Icon_Set($iIcon, @ScriptFullPath) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE Func _Icon_Clear($iControlID) Local Const $STM_SETIMAGE = 0x0172 If $iControlID = -1 Then $iControlID = _WinAPI_GetDlgCtrlID(GUICtrlGetHandle($iControlID)) EndIf Return GUICtrlSendMsg($iControlID, $STM_SETIMAGE, $IMAGE_ICON, 0) EndFunc ;==>_Icon_Clear Func _Icon_Set($iControlID, $sFilePath) ; Idea initially from Yashied. Local Const $STM_SETIMAGE = 0x0172 Local $hIcon, $tInfo If $iControlID = -1 Then $iControlID = _WinAPI_GetDlgCtrlID(GUICtrlGetHandle($iControlID)) EndIf $tInfo = DllStructCreate($tagSHFILEINFO) _WinAPI_ShellGetFileInfo($sFilePath, BitOR($SHGFI_ICON, $SHGFI_LARGEICON), 0, $tInfo) $hIcon = DllStructGetData($tInfo, 'hIcon') Return _WinAPI_DestroyIcon(GUICtrlSendMsg($iControlID, $STM_SETIMAGE, $IMAGE_ICON, $hIcon)) EndFunc ;==>_Icon_Set
comment:7 Changed 13 years ago by trancexx
- Resolution set to Rejected
- Status changed from assigned to closed
The accent is on using UDFs.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
GUICtrlCreateIcon() works just fine.
Search the forum for possible UDF's in this area.