Browse - programming tips - set the cursor for a specific windowDate: 2010apr8 Platform: Windows Q. How can I change the cursor for a specific window? A. Use SetClassLong, like this: void SetWindowCursor(HWND hwnd, const HCURSOR hCursor) { SetClassLong(hwnd, GCL_HCURSOR, PtrToLong(hCursor)); } void exampleUse(HWND hwnd) { SetWindowCursor(hwnd, LoadCursor(NULL, IDC_HAND)); }
Add a commentSign in to add a comment | Advertisements:
|