YellowLab Posted July 2, 2008 Posted July 2, 2008 (edited) I have a list of Pic files that I am pulling into controls using this command: $control[$i] = GUICtrlCreatePic($sImageLocation & "mypict.gif", $x, $y, 0, 0) The last two zeros allow the control to be sized exactly to the height and width of the file; however, when the control is clicked, the size needs to change based on what the original size was. Is there a way to retrieve the "height" and "width" of the control[$i]? I have tried _GDIPlus_ImageGetWidth($control[$i]) but this causes the script to crash. Is there another way that I am missing? Thanks, Bob Edited July 2, 2008 by YellowLab You can't see a rainbow without first experiencing the rain.
AdmiralAlkex Posted July 2, 2008 Posted July 2, 2008 (edited) You can only use _GDIPlus_ImageGetWidth() for images loaded with another _GDIPlus_...() function, for controls use ControlGetPos() Edit:Clarified it some... Edited July 2, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
YellowLab Posted July 2, 2008 Author Posted July 2, 2008 Doh! *Slaps Forehead* So focused on GUI commands forgot to look through windows commands. Thanks! Bob You can't see a rainbow without first experiencing the rain.
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