- Timestamp:
- Dec 22, 1999, 7:10:09 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/status.c
r1804 r2190 1 /* $Id: status.c,v 1.1 5 1999-11-21 18:13:44cbratschi Exp $ */1 /* $Id: status.c,v 1.16 1999-12-22 18:10:09 cbratschi Exp $ */ 2 2 /* 3 3 * Interface code to StatusWindow widget/control … … 30 30 31 31 /* CB: Odin problems 32 - DrawText: DT_VCENTER doesn't work 32 - DrawText: DT_VCENTER doesn't work (DT_SINGLELINE bug?) 33 33 */ 34 34 … … 38 38 #define HORZ_BORDER 0 39 39 #define VERT_BORDER 2 40 #define VERT_SPACE 2 //space between bo der and text40 #define VERT_SPACE 2 //space between border and text 41 41 #define HORZ_GAP 2 42 42 #define TOP_MARGIN 2 … … 497 497 STATUSWINDOWINFO *infoPtr = STATUSBAR_GetInfoPtr (hwnd); 498 498 return infoPtr->bUnicode; 499 }500 501 static LRESULT502 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);519 499 } 520 500 … … 1057 1037 STATUSBAR_WMNCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam) 1058 1038 { 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); 1077 1053 } 1078 1054 … … 1081 1057 STATUSBAR_WMNCLButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) 1082 1058 { 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 1084 1072 return 0; 1073 } 1074 1075 PostMessageA (GetParent (hwnd), WM_NCLBUTTONDOWN, wParam, lParam); 1076 return 0; 1085 1077 } 1086 1078 … … 1296 1288 return STATUSBAR_SendNotify (hwnd, NM_DBLCLK); 1297 1289 1298 case WM_LBUTTONDOWN:1299 return STATUSBAR_WMLButtonDown(hwnd,wParam,lParam);1300 1301 1290 case WM_LBUTTONUP: 1302 1291 return STATUSBAR_SendNotify (hwnd, NM_CLICK); … … 1360 1349 1361 1350 ZeroMemory (&wndClass, sizeof(WNDCLASSA)); 1362 wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_ VREDRAW;1351 wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW; 1363 1352 wndClass.lpfnWndProc = (WNDPROC)StatusWindowProc; 1364 1353 wndClass.cbClsExtra = 0;
Note:
See TracChangeset
for help on using the changeset viewer.