Sign in to follow this  
Followers 0
navajo

pulling the Size of a GuiCtrlCreateGraphic() object?

5 posts in this topic

Is is possible to pull the the dimensions( or size) of a GuiCtrlCreateGraphic() that has been created? :lmao:

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

never tried this one with a graphic control... but

ControlGetPos() in help...

Success: Returns an array containing the control's position and size relative to it's window:

$array[0] = X position

$array[1] = Y position

$array[2] = Width

$array[3] = Height

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

I guess I should specify, from the within the application that created the GuiCtrlCreateGraphic() object, is it possible to access what commands where given to create the object?

:lmao: Navajo

Share this post


Link to post
Share on other sites

You will have to be more specific. What do you mean access the commands? Do you mean set the size of the image?


Who else would I be?

Share this post


Link to post
Share on other sites

Sorry about the convoluted description here.

I've been asked to build up a few udfs for my work lab to help other build small testing scripts. One of the functions I've been asked to do is put together a function call to clear/blank out a window created with a GuiCtrlCreateGraphic() object. All I am supplied with (manager request) is the variable assigned to the GuiCtrlCreateGraphic() upon creation, and the color they would like it cleared to.

How my manager would like the function written,

func clearcanvas($canvas, $color= 0x000000 ) ;  
;------------------------------------------------------------
;  Clear passed GuiCtrlCreateGraphic() object to 
;  requested color
;    $canvas  = GuiCtrlCreateGraphic() object
;    $color     = color to clear canvas to, def is black
;------------------------------------------------------------

Problems I am having is I have no idea what dimensions the GuiCtrlCreateGraphic() object has. My first thought was 'just lay out a 100000x100000 rectangle and color it' LOL

You will have to be more specific. What do you mean access the commands? Do you mean set the size of the image?

Share this post


Link to post
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
Sign in to follow this  
Followers 0