ReaImDown Posted March 7, 2008 Share Posted March 7, 2008 is it possible to get the height + width of the picture, then make the height and width of the icon using GUICtrlCreateIcon change accordingly? CODE#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 447, 193, 125) $Pic1 = GUICtrlCreateIcon("3DX.dll", 1, 128, 32, @IconHeight, @IconWidth, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $i =0 While 1 sleep(1000) GUICtrlSetImage($Pic1, "3DX.dll",$i) $i+=1 if $i = 12 then Exit WEnd btw, yes, I know @IconHeight, @IconWidth dont exist, but just as an example of what I am looking for... [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 7, 2008 Share Posted March 7, 2008 is it possible to get the height + width of the picture, then make the height and width of the icon using GUICtrlCreateIcon change accordingly?CODE#include <GUIConstantsEx.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>Opt("GUIOnEventMode", 1)#Region ### START Koda GUI section ### Form=$Form1 = GUICreate("Form1", 633, 447, 193, 125)$Pic1 = GUICtrlCreateIcon("3DX.dll", 1, 128, 32, @IconHeight, @IconWidth, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###$i =0While 1sleep(1000)GUICtrlSetImage($Pic1, "3DX.dll",$i)$i+=1if $i = 12 then ExitWEndbtw, yes, I know @IconHeight, @IconWidth dont exist, but just as an example of what I am looking for...Icons have standard sizes. The default for GuiCtrlCreateIcon() is 32x32. What size do you want? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
ReaImDown Posted March 7, 2008 Author Share Posted March 7, 2008 Icons have standard sizes. The default for GuiCtrlCreateIcon() is 32x32. What size do you want?I actually just figured it out its -1,-1because I have different sizes, I needed it to change. thank you for your help [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
ReaImDown Posted March 7, 2008 Author Share Posted March 7, 2008 I actually just figured it out its -1,-1because I have different sizes, I needed it to change. thank you for your help I lied, -1,-1 doesnt change the size [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 7, 2008 Share Posted March 7, 2008 I lied, -1,-1 doesnt change the size That brings us back to my previous question. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
ReaImDown Posted March 7, 2008 Author Share Posted March 7, 2008 That brings us back to my previous question.the size changes 1 is 170x3151 is 300x3001 is 240x240theres a list. [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 7, 2008 Share Posted March 7, 2008 the size changes 1 is 170x3151 is 300x3001 is 240x240theres a list.Weird, non-standard sizes. What size would you prefer?$Ico = GUICtrlCreateIcon("File.ico", -1, 240, 240)GUICtrlSetImage($File2.ico, -1) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
ReaImDown Posted March 7, 2008 Author Share Posted March 7, 2008 Weird, non-standard sizes. What size would you prefer?$Ico = GUICtrlCreateIcon("File.ico", -1, 240, 240)GUICtrlSetImage($File2.ico, -1)so then there is no way to change the picture size according to the size of the photo? [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 8, 2008 Share Posted March 8, 2008 so then there is no way to change the picture size according to the size of the photo?Not that I'm aware of. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
ReaImDown Posted March 8, 2008 Author Share Posted March 8, 2008 Not that I'm aware of.anyone anywhere have an idea? I cant figure it out [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 8, 2008 Share Posted March 8, 2008 Re-create your icons all the same size. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Valuater Posted March 8, 2008 Share Posted March 8, 2008 as GEO stated icons "generally" have standard sizes seems to that you are mixing "icons" and "pics" (bmp, jpg, etc) ??? 8) Link to comment Share on other sites More sharing options...
GEOSoft Posted March 8, 2008 Share Posted March 8, 2008 as GEO stated icons "generally" have standard sizesseems to that you are mixing "icons" and "pics" (bmp, jpg, etc)???8)I think what he did was take some images and simply use an app to convert them to icons with no regard for size. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Info Posted March 8, 2008 Share Posted March 8, 2008 If you wanna to know the normal size of the picture so you can add it normally to your GUI, Open MSPaint --->Picture--->Propeties---> Height and Weight sizes will be there... EndIf Link to comment Share on other sites More sharing options...
Kip Posted March 8, 2008 Share Posted March 8, 2008 (edited) _GDIPlus_ImageGetWidth()_GDIPlus_ImageGetHeight()I dont know if that works for icons too.Edit: Doesnt work Edited March 8, 2008 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
GEOSoft Posted March 8, 2008 Share Posted March 8, 2008 @All Please read the thread. This is about icons. Icons can ( and should ) contain more than one image of varying sizes. He needs to create the icons so that they all have the same size for what he is trying to do. And the size he chooses doesn't really matter within reason. I think Vista can handle up to 256x256 but I'm not positive. It may even be higher. For XP, I don't know the size limit. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Kip Posted March 8, 2008 Share Posted March 8, 2008 (edited) He needs to create the icons so that they all have the same size for what he is trying to do. And the size he chooses doesn't really matter within reason. is it possible to get the height + width of the picture, then make the height and width of the icon using GUICtrlCreateIcon change accordingly? [...] btw, yes, I know @IconHeight, @IconWidth dont exist, but just as an example of what I am looking for... GEOSoft: I dont think he wants to have the icons all at the same size. He wants to get the width an height of the icons, and change the size of GuictrlcreateIcon to the width and height of the file. But icons arent images. Maybe you can rename the name of the icons to their size: "240x240.ico" and read the size from there??? Edited March 8, 2008 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
GEOSoft Posted March 9, 2008 Share Posted March 9, 2008 GEOSoft: I dont think he wants to have the icons all at the same size. He wants to get the width an height of the icons, and change the size of GuictrlcreateIcon to the width and height of the file.But icons arent images. Maybe you can rename the name of the icons to their size: "240x240.ico" and read the size from there???That might work.I still think having the icons all the same size is better. That doesn't mean that the image for the Icon has to use all of the space that's available. Remember that icons usually have a transparent background. If he created for example all of his Icons at 300x300 then centered the image from the current 240x240 icon in that, the 240x240 would still apear that size but it would be in a 300x300 container. See what I'm saying? There is one that is outside the 300 range but it's so close that I'm sure it could be resized to fit. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
therks Posted March 9, 2008 Share Posted March 9, 2008 From his code example it would seem to me that he's trying to create some kind of viewer for looking at icons in a dll file. That could be where the problem of not knowing the icon sizes stems from. I imagine there must be some way of examining icon libraries for the formats their icons are in, I know that Microangelo (an icon editing suite) comes with an application specially for viewing libraries and their icons within, I wouldn't know where to start though, and I wouldn't be surprised if it's not something the WinAPI covers. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
ReaImDown Posted May 30, 2008 Author Share Posted May 30, 2008 From his code example it would seem to me that he's trying to create some kind of viewer for looking at icons in a dll file. That could be where the problem of not knowing the icon sizes stems from. I imagine there must be some way of examining icon libraries for the formats their icons are in, I know that Microangelo (an icon editing suite) comes with an application specially for viewing libraries and their icons within, I wouldn't know where to start though, and I wouldn't be surprised if it's not something the WinAPI covers.I am still trying to inquire about this problem, any takers? lol [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] 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