-3

I want to change the mouse cursor for only one label. If I use SetClassLong the cursor for all labels is changed, I was told that I should use SetWindowLong as it is stated [here][1] but for some reason the mouse cursor doesn't change.

I am using a simple DialogBox.

Edit:

Sorry, if I didn't include my code. It was late and I was tired. As recommended I will post the answer below.

lmiguelmh
  • 3,074
  • 1
  • 37
  • 53

1 Answers1

0

Thanks to @Potter. I somewhat found the answer for changing the cursor for a win32 label control:

  1. Do as the answer to this question says, you will have something like this.

    case WM_SETCURSOR:
        if((HWND)wParam == GetDlgItem( hWnd, 1014)) {
            SetCursor(LoadCursor(NULL, IDC_HAND)); 
            SetWindowLongPtr(hWnd, DWLP_MSGRESULT, TRUE);
            return TRUE;
        }
    
  2. In the properties of the control, make sure to set Notify to True.

static text label properties win32 notify property

Community
  • 1
  • 1
lmiguelmh
  • 3,074
  • 1
  • 37
  • 53