Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identify cursor on text field
#1
Can QM identify, if the mouse pointer is on a text field?

I am not sure, what sort of cursors are meant in "wait for cursor". I believe, a cursor, like "I" on a text field is called "text". But there is no option in qm for any text.
I don't want qm to wait for any cursor. I just want, that qm does the first thing, if the cursor is on a text field (input field), (when Cursor is TEXT form), - and if not, (if cursor is ALL OTHER forms), do the second thing. The mouse pointer, which is mooving, not the blinking text cursor, which is fixed, I mean!
any idea?
#2
In programming, 'cursor' is mouse pointer. That blinking thing in focused text is 'caret'.

Function IsMouseCursor
Code:
Copy      Help
;/
function# cursor ;;cursor: one of IDC_x constants

;Returns 1 if cursor matches the current mouse cursor (pointer), or 0 if not.

;cursor - one of system cursor constants:
,;IDC_APPSTARTING - Standard arrow and small hourglass
,;IDC_ARROW - Standard arrow
,;IDC_CROSS - Crosshair
,;IDC_HAND - Hand
,;IDC_HELP - Arrow and question mark
,;IDC_IBEAM - I-beam
,;IDC_NO - Slashed circle
,;IDC_SIZEALL - Four-pointed arrow pointing north, south, east, and west
,;IDC_SIZENESW - Double-pointed arrow pointing northeast and southwest
,;IDC_SIZENS - Double-pointed arrow pointing north and south
,;IDC_SIZENWSE - Double-pointed arrow pointing northwest and southeast
,;IDC_SIZEWE - Double-pointed arrow pointing west and east
,;IDC_UPARROW - Vertical arrow
,;IDC_WAIT - Hourglass

;EXAMPLE
;if(IsMouseCursor(IDC_ARROW))

,;out "arrow"
;else if(IsMouseCursor(IDC_IBEAM))

,;out "I beam"
;else out "other"



cursor=LoadCursor(0 +(cursor&0xffff)); if(!cursor) ret

CURSORINFO ci.cbSize=sizeof(CURSORINFO)
if(!GetCursorInfo(&ci)) ret
ret cursor=ci.hCursor


Forum Jump:


Users browsing this thread: 1 Guest(s)