These set cursor to hand no matter where it is. Return DefWindowProc( hWnd, msg, lParam, wParam ) MY EFFORTS TO SOLVE PROBLEM:īellow are the code snippets that I have tried, but they all failed: I work on Windows XP, using MS Visual Studio C++ and pure Win32 API. If additional code snippets are required, ask and I will edit my post, but for now, they are omitted to keep the post short and concise. If cursor hovers above static control, then my handler changes it to hand, else sets it to default cursor ( arrow ).īellow is the picture I have sketched in Paint that displays the desired look of the cursor when it hovers above static control, it is on the client area, and when user resizes window. If( (HWND)wParam = GetDlgItem( hwnd, 4000 ) ) This is my old WM_CURSOR handler ( code is simplified for clarity purposes ): case WM_SETCURSOR: HCursorArrow = LoadCursor( NULL, IDC_ARROW ) HCursorHand = LoadCursor( NULL, IDC_HAND ) This means that my handler for WM_SETCURSOR must be rewritten to reflect newly introduced changes.Ĭursors are loaded in WM_CREATE, and I have defined class cursor, like this: // cursors My initial application was in full screen mode, but recently terms have changed and it must have a resizable window. I have made an application that needs to change the look of a cursor into hand when mouse hovers above the static control, but resets it to a normal cursor otherwise.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |