AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing the mouse cursor
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Icarus



Joined: 24 Nov 2005
Posts: 824

PostPosted: Tue Aug 14, 2007 2:16 pm    Post subject: Reply with quote

I would like to propose a slightly different alternative which may be more useful when you have a window with many controls.

Simply make sure that the variable for each control contains a certain keyword (for example "button" )

In this example, I changed added vUrl1 and vUrl2 to the gui add parameters.

Also, replaced the global hCur with a static one

Code:
WM_MOUSEMOVE(wParam,lParam)
{
  If( A_Gui <> 1 )
   Return

  Static hCurs = 0
  If( hCurs = 0 )
   hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
 
  ; Only change controls with Button or Url in their variable.
  If( InStr( A_GuiControl, "Button" ) ) or ( InStr( A_GuiControl, "Url" ) )
    DllCall("SetCursor","UInt",hCurs)
  Return
}
Back to top
View user's profile Send private message Visit poster's website
tic



Joined: 22 Apr 2007
Posts: 1458

PostPosted: Sun Aug 19, 2007 3:33 am    Post subject: Reply with quote

But is there a way to do this so that the cursor is always a hand when the script is running, without using WM_MOUSEMOVE and not needing a gui??
Back to top
View user's profile Send private message
CursorGuy
Guest





PostPosted: Mon May 26, 2008 9:35 am    Post subject: Reply with quote

Hi, can someone please show me any ways to make a custom cursor I design in photoshop to replace the standard mouse-cursor Arrow? Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group