rootx Posted May 13, 2015 Share Posted May 13, 2015 (edited) I would like to know how to increase the resolution of the icons in the grid.$iColor = 5 is 32 bit DIB section.. but if I try with$Image = _GUIImageList_Create(48,48,5,1)the upscaling is very bad and pixelate, I have 32bit icon resolution with hight detail, how can I control or force the resolution of the icons ?Thanks Edited May 14, 2015 by rootx Link to comment Share on other sites More sharing options...
UEZ Posted May 13, 2015 Share Posted May 13, 2015 Can you please post a reproducer script? Thx. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
rootx Posted May 14, 2015 Author Share Posted May 14, 2015 #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Example() Func Example() Local $idListview, $hImage Local $iStylesEx = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES) GUICreate("ImageList Create", 400, 300) $idListview = GUICtrlCreateListView("", 2, 2, 394, 268, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($idListview, $iStylesEx) GUISetState(@SW_SHOW) ; Load images $hImage = _GUIImageList_Create(48, 48,5,1) _GUIImageList_Add($hImage, _GUIImageList_AddIcon($hImage,@ScriptDir&"\ico.ico")) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Items", 120) ; Add items _GUICtrlListView_AddItem($idListview, "Item 1", 0) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Link to comment Share on other sites More sharing options...
UEZ Posted May 14, 2015 Share Posted May 14, 2015 What about ico.ico? What is the dimension? Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
rootx Posted May 14, 2015 Author Share Posted May 14, 2015 This icon for example.Thanks for your attention empty.ico Link to comment Share on other sites More sharing options...
UEZ Posted May 14, 2015 Share Posted May 14, 2015 (edited) You have to upscale the icon manually and add it afterwards to the _GUIImageList_Create.expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> Example() Func Example() _GDIPlus_Startup() Local $idListview, $hImage Local $iStylesEx = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES) GUICreate("ImageList Create", 400, 300) $idListview = GUICtrlCreateListView("", 2, 2, 394, 268, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($idListview, $iStylesEx) GUISetState(@SW_SHOW) ; Load images $hImage = _GUIImageList_Create(48, 48, 5, 1) ;load icon and upscale the icon to 48x48 pixels Local $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\empty.ico") Local $hBitmap_scaled = _GDIPlus_ImageResize($hBitmap, 48, 48) Local $hBitmap_GDI = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_scaled) _GDIPlus_BitmapDispose($hBitmap_scaled) _GDIPlus_BitmapDispose($hBitmap) _GUIImageList_Add($hImage, $hBitmap_GDI) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Items", 120) ; Add items _GUICtrlListView_AddItem($idListview, "Item 1", 0) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() _WinAPI_DeleteObject($hBitmap_GDI) _GDIPlus_Shutdown() EndFunc ;==>Example Edited May 14, 2015 by UEZ rootx 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
rootx Posted May 14, 2015 Author Share Posted May 14, 2015 Perfect exampleThanks, I was really confused 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