About Mouse Icon
-
Hi All How can i get the Cursor(Which pointer is used like Pointer or Hand or Help ect) of the Mouse? Any help will be highly appriceated. Thanks in advance
Manish Patel. B.E. - Information Technology.
-
Hi All How can i get the Cursor(Which pointer is used like Pointer or Hand or Help ect) of the Mouse? Any help will be highly appriceated. Thanks in advance
Manish Patel. B.E. - Information Technology.
I have
HCURSOR
handle usingGetCursorInfo
function. now how can i extract information of mouse icon from this handle?Manish Patel. B.E. - Information Technology.
-
I have
HCURSOR
handle usingGetCursorInfo
function. now how can i extract information of mouse icon from this handle?Manish Patel. B.E. - Information Technology.
Do you want to set the Mouse Cursor in your application to hand/hourglass etc? See SetCursor with IDC_HAND etc
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Do you want to set the Mouse Cursor in your application to hand/hourglass etc? See SetCursor with IDC_HAND etc
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
Thanks for your reply But i don't want to set Cursor, i want to get it. i.e. Whenever the Cursor changes from one type to another then my application should come to know that now cursor is changed and with which type. Is this possible?
Manish Patel. B.E. - Information Technology.
-
Thanks for your reply But i don't want to set Cursor, i want to get it. i.e. Whenever the Cursor changes from one type to another then my application should come to know that now cursor is changed and with which type. Is this possible?
Manish Patel. B.E. - Information Technology.
I think the handle to system cursor return from LoadCursor(IDC_WAIT/...) return the unique same value everytime for the same cursor. u can compare the handle to the handle returned from GetCursor. and also i think u can compare that at WM_SETCURSOR notification. but why u need to know the state of app from the cursor, normally u will be setting the cursor for ur application, then u are able to know the current cursor without quering from the cursor.
-
I think the handle to system cursor return from LoadCursor(IDC_WAIT/...) return the unique same value everytime for the same cursor. u can compare the handle to the handle returned from GetCursor. and also i think u can compare that at WM_SETCURSOR notification. but why u need to know the state of app from the cursor, normally u will be setting the cursor for ur application, then u are able to know the current cursor without quering from the cursor.
No this is not the case. I am developing application for screen sharing. In that i want to pass the type of mouse cursor just like (HAND, HELP, WAIT,...) I can also get the HCURSOR handle and by comparing it with inbuilt type i am getting cursor, but problem is with application that uses custom cursors like flash uses. So is there any other alternative then this one?
CURSORINFO cInfo; cInfo.cbSize = sizeof(cInfo); if(cInfo.hCursor == LoadCursor(NULL, IDC_HAND)) { // For Hand Cursor }
This works fine when cursor is of system type Now it will broken when i use it with flash because flash uses custom cursor socInfo.hCursor
will give some long values. Now i think you should understand my problem. If is there a way to know the type of cursor just like this is a cursor of type hand Thanks for your kind reply please help me on this. ThanksManish Patel. B.E. - Information Technology.
-
I think the handle to system cursor return from LoadCursor(IDC_WAIT/...) return the unique same value everytime for the same cursor. u can compare the handle to the handle returned from GetCursor. and also i think u can compare that at WM_SETCURSOR notification. but why u need to know the state of app from the cursor, normally u will be setting the cursor for ur application, then u are able to know the current cursor without quering from the cursor.
Is there any Event fire when mouse cursor change?
Manish Patel. B.E. - Information Technology.
-
No this is not the case. I am developing application for screen sharing. In that i want to pass the type of mouse cursor just like (HAND, HELP, WAIT,...) I can also get the HCURSOR handle and by comparing it with inbuilt type i am getting cursor, but problem is with application that uses custom cursors like flash uses. So is there any other alternative then this one?
CURSORINFO cInfo; cInfo.cbSize = sizeof(cInfo); if(cInfo.hCursor == LoadCursor(NULL, IDC_HAND)) { // For Hand Cursor }
This works fine when cursor is of system type Now it will broken when i use it with flash because flash uses custom cursor socInfo.hCursor
will give some long values. Now i think you should understand my problem. If is there a way to know the type of cursor just like this is a cursor of type hand Thanks for your kind reply please help me on this. ThanksManish Patel. B.E. - Information Technology.
I would like to know why u need the type of cursor, if u want to use the same cursor on different process, use the handle, it is shareable among process [^], to use on different machine u can pass the image of cursor (for once). if u want to identify the type of cursor and there by determine the state of application, it is upto the application, for instance i can use WAIT cursor to indicate the purpose HAND.