Ignore:
Timestamp:
Nov 17, 1999, 6:06:23 PM (26 years ago)
Author:
cbratschi
Message:

cursor handling fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/status.c

    r1584 r1762  
    1 /* $Id: status.c,v 1.13 1999-11-03 22:05:23 cbratschi Exp $ */
     1/* $Id: status.c,v 1.14 1999-11-17 17:06:23 cbratschi Exp $ */
    22/*
    33 * Interface code to StatusWindow widget/control
     
    10201020}
    10211021
     1022static LRESULT STATUSBAR_WMSetCursor(HWND hwnd,WPARAM wParam,LPARAM lParam)
     1023{
     1024  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
     1025
     1026  if (dwStyle & SBARS_SIZEGRIP)
     1027  {
     1028    RECT rect = STATUSBAR_GetSizeBox(hwnd);
     1029    POINT pt;
     1030
     1031    GetCursorPos(&pt);
     1032    ScreenToClient(hwnd,&pt);
     1033
     1034    if (PtInRect(&rect,pt))
     1035    {
     1036      SetCursor(LoadCursorA(0,IDC_SIZENWSEA));
     1037      return TRUE;
     1038    }
     1039  }
     1040
     1041  return DefWindowProcA(hwnd,WM_SETCURSOR,wParam,lParam);
     1042}
    10221043
    10231044static LRESULT
     
    10251046{
    10261047    STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr(hwnd);
    1027     DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    1028 
    1029     if (dwStyle & SBARS_SIZEGRIP)
    1030     {
    1031       RECT rect = STATUSBAR_GetSizeBox(hwnd);
    1032       POINT point;
    1033 
    1034       point.x = (SHORT)LOWORD(lParam);
    1035       point.y = (SHORT)HIWORD(lParam);
    1036       if (PtInRect(&rect,point)) SetCursor(LoadCursorA(0,IDC_SIZENWSEA));
    1037     }
    10381048
    10391049    if (infoPtr->hwndToolTip)
     
    13111321            return STATUSBAR_SendNotify (hwnd, NM_RCLICK);
    13121322
     1323        case WM_SETCURSOR:
     1324            return STATUSBAR_WMSetCursor(hwnd,wParam,lParam);
     1325
    13131326        case WM_SETFONT:
    13141327            return STATUSBAR_WMSetFont (hwnd, wParam, lParam);
Note: See TracChangeset for help on using the changeset viewer.