Copyright © 1998-2006 MultiMedia Soft 
Return to index  
 
SetCursorFromHandle method 
 
Remarks 
Changes at run-time the cursor associated with the button. 
 
Syntax 
Visual Basic 
control.SetCursorFromHandle (hCursor as long) as boolean 
 
Visual C++ 
BOOL control.SetCursorFromHandle (OLE_HANDLE hCursor)
 
Parameter
Description
 
 
hCursor
Handle of the new cursor.
 
 
Visual Basic example 
 
BtnEnh1.SetCursorFromHandle 0, LoadResPicture(xxx, vbResCursor).Handle 
With this code the Cursor property will be changed using a cursor identified by xxx (contained in a .RES file). 
 
Visual C++ example 
 
HCURSOR hCursor = LoadCursorFromFile ("yourcursor.cur"); 
BtnEnh1.SetCursorFromHandle (0, (OLE_HANDLE) hCursor); 
With this code the Cursor property will be changed using an handle to a cursor previously loaded in memory. 
 
Return value 
 
Value
Meaning
 
 
FALSE
The operation failed
TRUE
The operation was successful
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Copyright © 1998-2006 MultiMedia Soft 
Return to index