- Timestamp:
- Dec 26, 1999, 6:32:14 PM (26 years ago)
- Location:
- trunk/src/comctl32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/header.c
r1762 r2205 1 /* $Id: header.c,v 1. 19 1999-11-17 17:06:22 cbratschi Exp $ */1 /* $Id: header.c,v 1.20 1999-12-26 17:32:12 cbratschi Exp $ */ 2 2 /* 3 3 * Header control … … 1077 1077 infoPtr->uNumItem = 0; 1078 1078 1079 InvalidateRect(hwnd,NULL, FALSE);1079 InvalidateRect(hwnd,NULL,TRUE); 1080 1080 } else 1081 1081 { … … 2495 2495 2496 2496 ZeroMemory (&wndClass, sizeof(WNDCLASSA)); 2497 wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS ;2497 wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; 2498 2498 wndClass.lpfnWndProc = (WNDPROC)HEADER_WindowProc; 2499 2499 wndClass.cbClsExtra = 0; -
trunk/src/comctl32/listview.c
r2184 r2205 1 /*$Id: listview.c,v 1. 19 1999-12-21 17:01:36cbratschi Exp $*/1 /*$Id: listview.c,v 1.20 1999-12-26 17:32:12 cbratschi Exp $*/ 2 2 /* 3 3 * Listview control … … 1650 1650 } 1651 1651 1652 InvalidateRect(hwnd, NULL, FALSE);1652 InvalidateRect(hwnd, NULL, TRUE); 1653 1653 } 1654 1654 } … … 1698 1698 } 1699 1699 1700 InvalidateRect(hwnd, NULL, FALSE);1700 InvalidateRect(hwnd, NULL, TRUE); 1701 1701 } 1702 1702 } … … 2574 2574 2575 2575 /* invalidate client area (optimization needed) */ 2576 InvalidateRect(hwnd, NULL, FALSE);2576 InvalidateRect(hwnd, NULL, TRUE); 2577 2577 } 2578 2578 … … 2612 2612 2613 2613 /* refresh client area */ 2614 InvalidateRect(hwnd, NULL, FALSE);2614 InvalidateRect(hwnd, NULL, TRUE); 2615 2615 } 2616 2616 } … … 2723 2723 2724 2724 /* refresh client area */ 2725 InvalidateRect(hwnd, NULL, FALSE);2725 InvalidateRect(hwnd, NULL, TRUE); 2726 2726 } 2727 2727 … … 3134 3134 } 3135 3135 3136 while ( 1)3136 while (TRUE) 3137 3137 { 3138 3138 while (nItem < nLast) … … 4825 4825 4826 4826 LISTVIEW_UpdateScroll(hwnd); 4827 InvalidateRect(hwnd, NULL, FALSE);4827 InvalidateRect(hwnd, NULL, TRUE); 4828 4828 } 4829 4829 … … 4936 4936 LISTVIEW_UpdateScroll(hwnd); 4937 4937 /* refresh client area */ 4938 InvalidateRect(hwnd, NULL, FALSE);4938 InvalidateRect(hwnd, NULL, TRUE); 4939 4939 } 4940 4940 } … … 4999 4999 { 5000 5000 /* bResult = */ 5001 InvalidateRect(hwnd, &rc, FALSE);5001 InvalidateRect(hwnd, &rc, TRUE); 5002 5002 } 5003 5003 } … … 5026 5026 5027 5027 infoPtr->clrBk = clrBk; 5028 InvalidateRect(hwnd, NULL, FALSE);5028 InvalidateRect(hwnd, NULL, TRUE); 5029 5029 5030 5030 return TRUE; … … 5234 5234 infoPtr->nItemWidth = LISTVIEW_GetItemWidth(hwnd); 5235 5235 5236 InvalidateRect(hwnd, NULL, FALSE); // force redraw of the listview5236 InvalidateRect(hwnd, NULL, TRUE); // force redraw of the listview 5237 5237 5238 5238 return lret; … … 5589 5589 5590 5590 infoPtr->clrTextBk = clrTextBk; 5591 InvalidateRect(hwnd, NULL, FALSE);5591 InvalidateRect(hwnd, NULL, TRUE); 5592 5592 5593 5593 return TRUE; … … 5611 5611 5612 5612 infoPtr->clrText = clrText; 5613 InvalidateRect(hwnd, NULL, FALSE);5613 InvalidateRect(hwnd, NULL, TRUE); 5614 5614 5615 5615 return TRUE; … … 5685 5685 for (i = 0; i < nCount; i++) 5686 5686 { 5687 if ((hdpaSubItems = (HDPA) DPA_GetPtr(infoPtr->hdpaItems, i))) 5688 if ((lpItem = (LISTVIEW_ITEM *) DPA_GetPtr(hdpaSubItems, 0))) 5689 DPA_InsertPtr(sortList, nCount + 1, lpItem); 5687 hdpaSubItems = (HDPA) DPA_GetPtr(infoPtr->hdpaItems, i); 5688 if (hdpaSubItems) 5689 { 5690 lpItem = (LISTVIEW_ITEM *) DPA_GetPtr(hdpaSubItems, 0); 5691 if (lpItem) 5692 DPA_InsertPtr(sortList, nCount + 1, lpItem); 5693 } 5690 5694 } 5691 5695 … … 5696 5700 for (i = 0; i < nCount; i++) 5697 5701 { 5698 if ((hdpaSubItems = (HDPA) DPA_GetPtr(infoPtr->hdpaItems, i)) && 5699 (lpItem = (LISTVIEW_ITEM *) DPA_GetPtr(sortList, i))) 5702 hdpaSubItems = (HDPA) DPA_GetPtr(infoPtr->hdpaItems, i); 5703 if (hdpaSubItems) 5704 { 5705 lpItem = (LISTVIEW_ITEM *) DPA_GetPtr(sortList, i); 5706 if (lpItem) 5700 5707 DPA_SetPtr(hdpaSubItems, 0, lpItem); 5708 } 5701 5709 } 5702 5710 … … 5743 5751 rc.left = LVIR_BOUNDS; 5744 5752 ListView_GetItemRect(hwnd, nItem, &rc); 5745 InvalidateRect(hwnd, &rc, FALSE);5753 InvalidateRect(hwnd, &rc, TRUE); 5746 5754 } 5747 5755 } … … 6172 6180 { 6173 6181 /* refresh client area */ 6174 InvalidateRect(hwnd, NULL, FALSE);6182 InvalidateRect(hwnd, NULL, TRUE); 6175 6183 UpdateWindow(hwnd); 6176 6184 } … … 6206 6214 6207 6215 /* NEED drawing optimization ; redraw the selected items */ 6208 InvalidateRect(hwnd, NULL, FALSE);6216 InvalidateRect(hwnd, NULL, TRUE); 6209 6217 6210 6218 return 0; … … 6718 6726 infoPtr->bFocus = TRUE; 6719 6727 6720 InvalidateRect(hwnd, NULL, FALSE);6728 InvalidateRect(hwnd, NULL, TRUE); 6721 6729 UpdateWindow(hwnd); 6722 6730 … … 6760 6768 6761 6769 /* invalidate listview control client area */ 6762 InvalidateRect(hwnd, NULL, FALSE);6770 InvalidateRect(hwnd, NULL, TRUE); 6763 6771 6764 6772 if (fRedraw != FALSE) … … 6807 6815 6808 6816 /* invalidate client area + erase background */ 6809 InvalidateRect(hwnd, NULL, FALSE);6817 InvalidateRect(hwnd, NULL, TRUE); 6810 6818 6811 6819 return 0; … … 6966 6974 6967 6975 /* invalidate client area + erase background */ 6968 InvalidateRect(hwnd, NULL, FALSE);6976 InvalidateRect(hwnd, NULL, TRUE); 6969 6977 6970 6978 /* print the list of unsupported window styles */ -
trunk/src/comctl32/status.c
r2190 r2205 1 /* $Id: status.c,v 1.1 6 1999-12-22 18:10:09cbratschi Exp $ */1 /* $Id: status.c,v 1.17 1999-12-26 17:32:13 cbratschi Exp $ */ 2 2 /* 3 3 * Interface code to StatusWindow widget/control … … 1000 1000 } 1001 1001 1002 static LRESULT STATUSBAR_WMSetCursor(HWND hwnd,WPARAM wParam,LPARAM lParam)1003 {1004 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);1005 1006 if (dwStyle & SBARS_SIZEGRIP)1007 {1008 RECT rect = STATUSBAR_GetSizeBox(hwnd);1009 POINT pt;1010 1011 GetCursorPos(&pt);1012 ScreenToClient(hwnd,&pt);1013 1014 if (PtInRect(&rect,pt))1015 {1016 SetCursor(LoadCursorA(0,IDC_SIZENWSEA));1017 return TRUE;1018 }1019 }1020 1021 return DefWindowProcA(hwnd,WM_SETCURSOR,wParam,lParam);1022 }1023 1024 1002 static LRESULT 1025 1003 STATUSBAR_WMMouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) … … 1057 1035 STATUSBAR_WMNCLButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) 1058 1036 { 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 1072 return 0;1073 }1074 1075 1037 PostMessageA (GetParent (hwnd), WM_NCLBUTTONDOWN, wParam, lParam); 1076 1038 return 0; … … 1312 1274 return STATUSBAR_SendNotify (hwnd, NM_RCLICK); 1313 1275 1314 case WM_SETCURSOR:1315 return STATUSBAR_WMSetCursor(hwnd,wParam,lParam);1316 1317 1276 case WM_SETFONT: 1318 1277 return STATUSBAR_WMSetFont (hwnd, wParam, lParam); -
trunk/src/comctl32/toolbar.c
r2184 r2205 1 /* $Id: toolbar.c,v 1.2 3 1999-12-21 17:01:37cbratschi Exp $ */1 /* $Id: toolbar.c,v 1.24 1999-12-26 17:32:13 cbratschi Exp $ */ 2 2 /* 3 3 * Toolbar control … … 3030 3030 } 3031 3031 3032 /* << TOOLBAR_InsertButton32W >> */3033 3032 /* << TOOLBAR_InsertMarkHitTest >> */ 3034 3033 -
trunk/src/comctl32/tooltips.c
r1664 r2205 1 /* $Id: tooltips.c,v 1.1 7 1999-11-09 14:38:01 achimhaExp $ */1 /* $Id: tooltips.c,v 1.18 1999-12-26 17:32:14 cbratschi Exp $ */ 2 2 /* 3 3 * Tool tip control … … 16 16 * hittest.exe, needtext.exe, newrect.exe, updtext.exe and winfrpt.exe. 17 17 */ 18 19 /* CB: Odin32 problems20 - WM_NCCREATE not handled first -> title bar visible if WS_POPUP wasn't set before21 - CS_SAVEBITS: window movements are slow, bug in Open32?22 */23 18 24 19 /* WINE 991031 level */ … … 262 257 263 258 if (infoPtr->nMaxTipWidth > -1) { 264 265 259 rc.right = infoPtr->nMaxTipWidth; 260 uFlags |= DT_WORDBREAK; 266 261 } 267 262 if (GetWindowLongA (hwnd, GWL_STYLE) & TTS_NOPREFIX) 268 263 uFlags |= DT_NOPREFIX; 269 264 // TRACE("\"%s\"\n", debugstr_w(infoPtr->szTipText)); 270 265 … … 275 270 ReleaseDC (hwnd, hdc); 276 271 277 lpSize->cx = rc.right - rc.left + 4 + 278 272 lpSize->cx = rc.right - rc.left + 4 + 273 infoPtr->rcMargin.left + infoPtr->rcMargin.right; 279 274 lpSize->cy = rc.bottom - rc.top + 4 + 280 275 infoPtr->rcMargin.bottom + infoPtr->rcMargin.top; 281 276 } 282 277 … … 291 286 292 287 if (infoPtr->nTool == -1) { 293 // 294 288 // TRACE("invalid tool (-1)!\n"); 289 return; 295 290 } 296 291 … … 302 297 303 298 if (infoPtr->szTipText[0] == L'\0') { 304 305 299 infoPtr->nCurrentTool = -1; 300 return; 306 301 } 307 302 … … 313 308 hdr.code = TTN_SHOW; 314 309 SendMessageA (toolPtr->hwnd, WM_NOTIFY, 315 310 (WPARAM)toolPtr->uId, (LPARAM)&hdr); 316 311 317 312 // TRACE("\"%s\"\n", debugstr_w(infoPtr->szTipText)); … … 321 316 322 317 if (toolPtr->uFlags & TTF_CENTERTIP) { 323 324 325 326 327 328 329 330 331 332 318 RECT rc; 319 320 if (toolPtr->uFlags & TTF_IDISHWND) 321 GetWindowRect ((HWND)toolPtr->uId, &rc); 322 else { 323 rc = toolPtr->rect; 324 MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2); 325 } 326 rect.left = (rc.left + rc.right - size.cx) / 2; 327 rect.top = rc.bottom + 2; 333 328 } 334 329 else { 335 336 330 GetCursorPos ((LPPOINT)&rect); 331 rect.top += 20; 337 332 } 338 333 … … 345 340 wndrect.right = GetSystemMetrics( SM_CXSCREEN ); 346 341 if( rect.right > wndrect.right ) { 347 348 342 rect.left -= rect.right - wndrect.right + 2; 343 rect.right = wndrect.right - 2; 349 344 } 350 345 wndrect.bottom = GetSystemMetrics( SM_CYSCREEN ); … … 352 347 RECT rc; 353 348 354 355 356 357 358 359 } 360 361 349 if (toolPtr->uFlags & TTF_IDISHWND) 350 GetWindowRect ((HWND)toolPtr->uId, &rc); 351 else { 352 rc = toolPtr->rect; 353 MapWindowPoints (toolPtr->hwnd, (HWND)0, (LPPOINT)&rc, 2); 354 } 355 rect.bottom = rc.top - 2; 356 rect.top = rect.bottom - size.cy; 362 357 } 363 358 364 359 AdjustWindowRectEx (&rect, GetWindowLongA (hwnd, GWL_STYLE), 365 360 FALSE, GetWindowLongA (hwnd, GWL_EXSTYLE)); 366 361 367 362 SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, 368 369 363 rect.right - rect.left, rect.bottom - rect.top, 364 SWP_SHOWWINDOW | SWP_NOACTIVATE); 370 365 371 366 /* repaint the tooltip */ … … 909 904 toolPtr = &infoPtr->tools[nTool]; 910 905 if ((toolPtr->hinst) && (toolPtr->lpszText)) { 911 912 906 if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) && 907 (HIWORD((INT)toolPtr->lpszText) != 0) ) 913 908 COMCTL32_Free (toolPtr->lpszText); 914 909 } … … 967 962 toolPtr = &infoPtr->tools[nTool]; 968 963 if ((toolPtr->hinst) && (toolPtr->lpszText)) { 969 970 964 if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) && 965 (HIWORD((INT)toolPtr->lpszText) != 0) ) 971 966 COMCTL32_Free (toolPtr->lpszText); 972 967 } … … 1650 1645 toolPtr->lpszText = LPSTR_TEXTCALLBACKW; 1651 1646 else { 1652 1653 1647 if ( (toolPtr->lpszText) && 1648 (HIWORD((INT)toolPtr->lpszText) != 0) ) { 1654 1649 COMCTL32_Free (toolPtr->lpszText); 1655 1650 toolPtr->lpszText = NULL; … … 1705 1700 toolPtr->lpszText = LPSTR_TEXTCALLBACKW; 1706 1701 else { 1707 1708 1702 if ( (toolPtr->lpszText) && 1703 (HIWORD((INT)toolPtr->lpszText) != 0) ) { 1709 1704 COMCTL32_Free (toolPtr->lpszText); 1710 1705 toolPtr->lpszText = NULL; … … 1798 1793 1799 1794 if (lpToolInfo == NULL) 1800 1795 return 0; 1801 1796 if (lpToolInfo->cbSize < TTTOOLINFO_V1_SIZEA) 1802 1797 return FALSE; 1803 1798 1804 1799 nTool = TOOLTIPS_GetToolFromInfoA (infoPtr, lpToolInfo); … … 1813 1808 1814 1809 if ((lpToolInfo->hinst) && (HIWORD((INT)lpToolInfo->lpszText) == 0)){ 1815 1810 toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText; 1816 1811 } 1817 1812 else if (lpToolInfo->lpszText) { 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1813 if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACKA) 1814 toolPtr->lpszText = LPSTR_TEXTCALLBACKW; 1815 else { 1816 if ( (toolPtr->lpszText) && 1817 (HIWORD((INT)toolPtr->lpszText) != 0) ) { 1818 COMCTL32_Free (toolPtr->lpszText); 1819 toolPtr->lpszText = NULL; 1820 } 1821 if (lpToolInfo->lpszText) { 1822 INT len = lstrlenA (lpToolInfo->lpszText); 1823 toolPtr->lpszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR)); 1824 lstrcpyAtoW (toolPtr->lpszText, lpToolInfo->lpszText); 1825 } 1826 } 1832 1827 } 1833 1828 1834 1829 /* force repaint */ 1835 1830 if (infoPtr->bActive) 1836 1831 TOOLTIPS_Show (hwnd, infoPtr); 1837 1832 else if (infoPtr->bTrackActive) 1838 1833 TOOLTIPS_TrackShow (hwnd, infoPtr); 1839 1834 1840 1835 return 0; … … 1851 1846 1852 1847 if (lpToolInfo == NULL) 1853 1848 return 0; 1854 1849 if (lpToolInfo->cbSize < TTTOOLINFO_V1_SIZEW) 1855 1850 return FALSE; 1856 1851 1857 1852 nTool = TOOLTIPS_GetToolFromInfoW (infoPtr, lpToolInfo); 1858 1853 if (nTool == -1) 1859 1854 return 0; 1860 1855 1861 1856 // TRACE("tool %d\n", nTool); … … 1867 1862 1868 1863 if ((lpToolInfo->hinst) && (HIWORD((INT)lpToolInfo->lpszText) == 0)){ 1869 1864 toolPtr->lpszText = lpToolInfo->lpszText; 1870 1865 } 1871 1866 else if (lpToolInfo->lpszText) { 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1867 if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACKW) 1868 toolPtr->lpszText = LPSTR_TEXTCALLBACKW; 1869 else { 1870 if ( (toolPtr->lpszText) && 1871 (HIWORD((INT)toolPtr->lpszText) != 0) ) { 1872 COMCTL32_Free (toolPtr->lpszText); 1873 toolPtr->lpszText = NULL; 1874 } 1875 if (lpToolInfo->lpszText) { 1876 INT len = lstrlenW (lpToolInfo->lpszText); 1877 toolPtr->lpszText = COMCTL32_Alloc ((len+1)*sizeof(WCHAR)); 1878 lstrcpyW (toolPtr->lpszText, lpToolInfo->lpszText); 1879 } 1880 } 1886 1881 } 1887 1882 1888 1883 /* force repaint */ 1889 1884 if (infoPtr->bActive) 1890 1885 TOOLTIPS_Show (hwnd, infoPtr); 1891 1886 else if (infoPtr->bTrackActive) 1892 1887 TOOLTIPS_TrackShow (hwnd, infoPtr); 1893 1888 1894 1889 return 0; … … 1964 1959 /* free tools */ 1965 1960 if (infoPtr->tools) { 1966 1967 1968 1969 1970 (HIWORD((INT)toolPtr->lpszText) != 0) ) 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1961 for (i = 0; i < infoPtr->uNumTools; i++) { 1962 toolPtr = &infoPtr->tools[i]; 1963 if ((toolPtr->hinst) && (toolPtr->lpszText)) { 1964 if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) && 1965 (HIWORD((INT)toolPtr->lpszText) != 0) ) 1966 { 1967 COMCTL32_Free (toolPtr->lpszText); 1968 toolPtr->lpszText = NULL; 1969 } 1970 } 1971 1972 /* remove subclassing */ 1973 if (toolPtr->uFlags & TTF_SUBCLASS) { 1974 LPTT_SUBCLASS_INFO lpttsi; 1975 1976 if (toolPtr->uFlags & TTF_IDISHWND) 1977 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA ((HWND)toolPtr->uId, COMCTL32_aSubclass); 1978 else 1979 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA (toolPtr->hwnd, COMCTL32_aSubclass); 1980 1981 if (lpttsi) { 1982 SetWindowLongA ((HWND)toolPtr->uId, GWL_WNDPROC, 1983 (LONG)lpttsi->wpOrigProc); 1984 RemovePropA ((HWND)toolPtr->uId, COMCTL32_aSubclass); 1985 COMCTL32_Free (&lpttsi); 1986 } 1987 } 1993 1988 } 1994 1989 COMCTL32_Free (infoPtr->tools);
Note:
See TracChangeset
for help on using the changeset viewer.