Changeset 8377 for trunk/src/user32/listbox.cpp
- Timestamp:
- May 7, 2002, 3:28:13 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/listbox.cpp
r8301 r8377 1 /* $Id: listbox.cpp,v 1.2 8 2002-04-24 08:56:16sandervl Exp $ */1 /* $Id: listbox.cpp,v 1.29 2002-05-07 13:28:12 sandervl Exp $ */ 2 2 /* 3 3 * Listbox controls … … 1771 1771 1772 1772 if (descr->style & LBS_MULTICOLUMN) return 0; 1773 dprintf(("We are handling scroll")); 1773 1774 switch(LOWORD(wParam)) 1774 1775 { … … 2038 2039 if (!PtInRect(&screenRect,screenMousePos)) 2039 2040 { 2041 dprintf(("Scrollbar hittest - plain branch")); 2040 2042 ReleaseCapture(); 2043 LISTBOX_SetCaretIndex( hwnd, pDescr, pDescr->lphc->droppedIndex, FALSE ); 2041 2044 LISTBOX_SetSelection( hwnd, pDescr, pDescr->lphc->droppedIndex, FALSE, FALSE ); 2042 2045 #ifdef __WIN32OS2__ 2043 2046 COMBO_RollupListbox(pDescr->lphc); 2044 2047 2045 /* @@PF Previous code is all wrong here. Here we are supposed to close2048 /* @@PF Previous code is all wrong here. Here we are supposed to close 2046 2049 and only close dropdown, instead flip, flips it. This happens because 2047 2050 previous code did not pay attention to the fact that combobox can be … … 2052 2055 #endif 2053 2056 return 0; 2054 } else 2057 } 2058 else 2055 2059 { 2056 /* Check to see the NC is a scrollbar */ 2057 INT nHitTestType = SendMessageA(hwnd,WM_NCHITTEST,0,MAKELONG(screenMousePos.x,screenMousePos.y)); 2058 2059 /* Windows sends this message when a scrollbar is clicked 2060 */ 2061 if (nHitTestType != HTCLIENT) 2062 { 2063 SendMessageA(hwnd,(msg == WM_LBUTTONDOWN) ? WM_NCLBUTTONDOWN:WM_NCLBUTTONDBLCLK,nHitTestType,MAKELONG(screenMousePos.x,screenMousePos.y)); 2064 } 2065 2066 /* Resume the Capture after scrolling is complete 2067 */ 2068 if (hWndOldCapture) 2069 { 2070 SetCapture(hWndOldCapture); 2071 } 2060 INT nHitTestType=0; 2061 LONG style = GetWindowLongA( hwnd, GWL_STYLE ); 2062 /* Check Vertical scroll bar */ 2063 if (style & WS_VSCROLL) 2064 { 2065 clientRect.right += GetSystemMetrics(SM_CXVSCROLL); 2066 if (PtInRect( &clientRect, mousePos )) 2067 { 2068 nHitTestType = HTVSCROLL; 2069 } 2070 } 2071 /* Check horizontal scroll bar */ 2072 if (style & WS_HSCROLL) 2073 { 2074 clientRect.bottom += GetSystemMetrics(SM_CYHSCROLL); 2075 if (PtInRect( &clientRect, mousePos )) 2076 { 2077 nHitTestType = HTHSCROLL; 2078 } 2079 } 2080 /* Windows sends this message when a scrollbar is clicked 2081 */ 2082 2083 if(nHitTestType != 0) 2084 { 2085 SendMessageW(hwnd, WM_NCLBUTTONDOWN, nHitTestType, 2086 MAKELONG(screenMousePos.x, screenMousePos.y)); 2087 } 2088 /* Resume the Capture after scrolling is complete 2089 */ 2090 if(hWndOldCapture != 0) 2091 { 2092 SetCapture(hWndOldCapture); 2093 } 2094 2072 2095 } 2073 2096 }
Note:
See TracChangeset
for help on using the changeset viewer.