Sign in to follow this  
Followers 0
eynstyne

$GUI_WS_EX_PARENTDRAG

3 posts in this topic

#1 ·  Posted (edited)

Can I use this style on an icon control? I tried, but maybe I'm doing this wrong. When I use a Picture control the whole GUI window drags otherwise.

I simply want the icon to move when I hold the mouse down and move the mouse. How would I do this?

(Similar to dragging icons on a desktop)

Also, how would I be able to check whether the mouse button is held down.

Thanks in advance...

:D

Edited by eynstyne

F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]

Share this post


Link to post
Share on other sites



I believe this is possible. (This idea is assuming you are using "OnEventMode", but you cold use it with polling also im sure)

so you set the icon to a function when it is clicked, then use larry's mousehook ( http://www.autoitscript.com/forum/index.php?showtopic=23173 ) and do somthing like -

pseudocode

While MouseClickIsDown
         guictrlsetpos($ICON,MouseGetPos(0),MouseGetPos(1))
wend

Just an idea...

Share this post


Link to post
Share on other sites

Using GUIGetCursoInfo you will get the state of the left mouse-button as

well as the ID for the control the mouse is hovering over. Use that info

together with GUICtrlSetPos and things should start to move...

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