Changeset 2190 for trunk/src


Ignore:
Timestamp:
Dec 22, 1999, 7:10:09 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

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

    r1804 r2190  
    1 /* $Id: status.c,v 1.15 1999-11-21 18:13:44 cbratschi Exp $ */
     1/* $Id: status.c,v 1.16 1999-12-22 18:10:09 cbratschi Exp $ */
    22/*
    33 * Interface code to StatusWindow widget/control
     
    3030
    3131/* CB: Odin problems
    32  - DrawText: DT_VCENTER doesn't work
     32 - DrawText: DT_VCENTER doesn't work (DT_SINGLELINE bug?)
    3333*/
    3434
     
    3838#define HORZ_BORDER 0
    3939#define VERT_BORDER 2
    40 #define VERT_SPACE  2 //space between boder and text
     40#define VERT_SPACE  2 //space between border and text
    4141#define HORZ_GAP    2
    4242#define TOP_MARGIN  2
     
    497497    STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd);
    498498    return infoPtr->bUnicode;
    499 }
    500 
    501 static LRESULT
    502 STATUSBAR_WMLButtonDown(HWND hwnd,WPARAM wParam,LPARAM lParam)
    503 {
    504   DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    505 
    506   if (dwStyle & SBARS_SIZEGRIP && !(dwStyle & CCS_TOP))
    507   {
    508     RECT rect = STATUSBAR_GetSizeBox(hwnd);
    509     POINT point;
    510 
    511     point.x = (SHORT)LOWORD(lParam);
    512     point.y = (SHORT)HIWORD(lParam);
    513     if (PtInRect(&rect,point)) TrackWin32Window(GetParent(hwnd),FALSE);
    514 
    515     return 0;
    516   }
    517 
    518   return DefWindowProcA(hwnd,WM_LBUTTONDOWN,wParam,lParam);
    519499}
    520500
     
    10571037STATUSBAR_WMNCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam)
    10581038{
    1059     if (GetWindowLongA (hwnd, GWL_STYLE) & SBARS_SIZEGRIP) {
    1060         RECT  rect;
    1061         POINT pt;
    1062 
    1063         GetClientRect (hwnd, &rect);
    1064 
    1065         pt.x = (INT)LOWORD(lParam);
    1066         pt.y = (INT)HIWORD(lParam);
    1067         ScreenToClient (hwnd, &pt);
    1068 
    1069         rect.left = rect.right - 13;
    1070         rect.top += 2;
    1071 
    1072         if (PtInRect (&rect, pt))
    1073             return HTBOTTOMRIGHT;
    1074     }
    1075 
    1076     return DefWindowProcA (hwnd, WM_NCHITTEST, wParam, lParam);
     1039  if (GetWindowLongA (hwnd,GWL_STYLE) & SBARS_SIZEGRIP)
     1040  {
     1041    RECT rect = STATUSBAR_GetSizeBox(hwnd);
     1042    POINT pt;
     1043
     1044    pt.x = (SHORT)LOWORD(lParam);
     1045    pt.y = (SHORT)HIWORD(lParam);
     1046    ScreenToClient(hwnd,&pt);
     1047
     1048    if (PtInRect(&rect,pt))
     1049      return HTBOTTOMRIGHT;
     1050  }
     1051
     1052  return DefWindowProcA (hwnd, WM_NCHITTEST, wParam, lParam);
    10771053}
    10781054
     
    10811057STATUSBAR_WMNCLButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
    10821058{
    1083     PostMessageA (GetParent (hwnd), WM_NCLBUTTONDOWN, wParam, lParam);
     1059  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
     1060
     1061  if (dwStyle & SBARS_SIZEGRIP && !(dwStyle & CCS_TOP))
     1062  {
     1063    RECT rect = STATUSBAR_GetSizeBox(hwnd);
     1064    POINT point;
     1065
     1066    point.x = (SHORT)LOWORD(lParam);
     1067    point.y = (SHORT)HIWORD(lParam);
     1068    ScreenToClient(hwnd,&point);
     1069
     1070    if (PtInRect(&rect,point)) TrackWin32Window(GetParent(hwnd),FALSE);
     1071
    10841072    return 0;
     1073  }
     1074
     1075  PostMessageA (GetParent (hwnd), WM_NCLBUTTONDOWN, wParam, lParam);
     1076  return 0;
    10851077}
    10861078
     
    12961288            return STATUSBAR_SendNotify (hwnd, NM_DBLCLK);
    12971289
    1298         case WM_LBUTTONDOWN:
    1299             return STATUSBAR_WMLButtonDown(hwnd,wParam,lParam);
    1300 
    13011290        case WM_LBUTTONUP:
    13021291            return STATUSBAR_SendNotify (hwnd, NM_CLICK);
     
    13601349
    13611350    ZeroMemory (&wndClass, sizeof(WNDCLASSA));
    1362     wndClass.style         = CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW;
     1351    wndClass.style         = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW;
    13631352    wndClass.lpfnWndProc   = (WNDPROC)StatusWindowProc;
    13641353    wndClass.cbClsExtra    = 0;
Note: See TracChangeset for help on using the changeset viewer.