- Timestamp:
- Nov 19, 1999, 6:59:35 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/combo.cpp
r1764 r1781 1 /* $Id: combo.cpp,v 1.1 4 1999-11-17 21:32:41cbratschi Exp $ */1 /* $Id: combo.cpp,v 1.15 1999-11-19 17:59:33 cbratschi Exp $ */ 2 2 /* 3 3 * Combo controls … … 10 10 * WINE version: 991031 11 11 */ 12 13 /* CB: bugs 14 - problems with focus handling (Win32 <-> OS/2) 15 will be fixed soon 16 */ 12 17 13 18 #include <string.h> … … 90 95 * COMBO_NCCreate 91 96 */ 92 static LRESULT COMBO_NCCreate(HWND hwnd, 97 static LRESULT COMBO_NCCreate(HWND hwnd,WPARAM wParam,LPARAM lParam) 93 98 { 94 99 LPHEADCOMBO lphc; … … 125 130 // (UINT)lphc, lphc->dwStyle ); 126 131 127 return (LRESULT)(UINT)hwnd;132 return TRUE; 128 133 } 129 return (LRESULT)FALSE;134 return FALSE; 130 135 } 131 136 … … 133 138 * COMBO_NCDestroy 134 139 */ 135 static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc ) 136 { 140 static LRESULT COMBO_NCDestroy(HWND hwnd,WPARAM wParam,LPARAM lParam) 141 { 142 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 137 143 138 144 if( lphc ) … … 148 154 SetInfoPtr(hwnd,0); 149 155 } 150 return 0; 156 157 return DefWindowProcA(hwnd,WM_NCDESTROY,wParam,lParam); 151 158 } 152 159 … … 423 430 * COMBO_WindowPosChanging 424 431 */ 425 static LRESULT COMBO_WindowPosChanging( 426 HWND hwnd, 427 LPHEADCOMBO lphc ,428 WINDOWPOS * posChanging)429 { 432 static LRESULT COMBO_WindowPosChanging(HWND hwnd,WPARAM wParam,LPARAM lParam) 433 { 434 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 435 WINDOWPOS *posChanging = (WINDOWPOS*)lParam; 436 430 437 dprintf(("COMBO_WindowPosChanging")); 431 438 … … 466 473 * COMBO_Create 467 474 */ 468 static LRESULT COMBO_Create( LPHEADCOMBO lphc, HWND hwnd,LPARAM lParam)475 static LRESULT COMBO_Create(HWND hwnd,WPARAM wParam,LPARAM lParam) 469 476 { 470 477 static char clbName[] = "ComboLBox"; 471 478 static char editName[] = "Edit"; 479 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 472 480 473 481 LPCREATESTRUCTA lpcs = (CREATESTRUCTA*)lParam; … … 884 892 * COMBO_EraseBackground 885 893 */ 886 static LRESULT COMBO_EraseBackground( 887 HWND hwnd, 888 LPHEADCOMBO lphc, 889 HDC hParamDC) 890 { 894 static LRESULT COMBO_EraseBackground(HWND hwnd,WPARAM wParam,LPARAM lParam) 895 { 896 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 891 897 HBRUSH hBkgBrush; 892 898 RECT clientRect; 893 899 HDC hDC; 894 900 895 hDC = (hParamDC) ? hParamDC 896 : GetDC(hwnd); 901 hDC = (wParam) ? (HDC)wParam:GetDC(hwnd); 897 902 898 903 /* … … 917 922 FillRect(hDC, &clientRect, hBkgBrush); 918 923 919 if (! hParamDC)924 if (!wParam) 920 925 ReleaseDC(hwnd, hDC); 921 926 … … 923 928 } 924 929 930 static LRESULT COMBO_GetDlgCode(HWND hwnd,WPARAM wParam,LPARAM lParam) 931 { 932 return DLGC_WANTARROWS | DLGC_WANTCHARS; 933 } 934 925 935 /*********************************************************************** 926 936 * COMBO_Paint 927 937 */ 928 static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC) 929 { 938 static LRESULT COMBO_Paint(HWND hwnd,WPARAM wParam,LPARAM lParam) 939 { 940 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 930 941 PAINTSTRUCT ps; 931 942 HDC hDC; 932 943 933 hDC = (hParamDC) ? hParamDC 934 : BeginPaint( lphc->hwndself, &ps); 944 hDC = (wParam) ? (HDC)wParam:BeginPaint( lphc->hwndself, &ps); 935 945 936 946 … … 970 980 } 971 981 972 if( !hParamDC ) 973 EndPaint(lphc->hwndself, &ps); 982 if(!wParam) EndPaint(lphc->hwndself, &ps); 974 983 975 984 return 0; 985 } 986 987 static LRESULT COMBO_PrintClient(HWND hwnd,WPARAM wParam,LPARAM lParam) 988 { 989 if (lParam & PRF_ERASEBKGND) COMBO_EraseBackground(hwnd,wParam,lParam); 990 991 return COMBO_Paint(hwnd,wParam,lParam); 976 992 } 977 993 … … 1236 1252 HWND COMBO_GetLBWindow( HWND hwnd ) 1237 1253 { 1238 LPHEADCOMBO lphc = NULL; 1239 LONG ptr = GetInfoPtr(hwnd); 1240 if(ptr) 1241 { 1242 lphc = (LPHEADCOMBO )ptr; 1243 if( lphc ) return lphc->hWndLBox; 1244 } 1245 return 0; 1254 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1255 1256 return lphc ? lphc->hWndLBox:0; 1246 1257 } 1247 1258 … … 1256 1267 } 1257 1268 1269 static VOID COMBO_EditSetFocus(LPHEADCOMBO lphc) 1270 { 1271 if(!(lphc->wState & CBF_FOCUSED)) 1272 { 1273 if( CB_GETTYPE(lphc) == CBS_DROPDOWNLIST ) 1274 SendMessageA( lphc->hWndLBox, LB_CARETON, 0, 0 ); 1275 1276 if( lphc->wState & CBF_EDIT ) 1277 SendMessageA( lphc->hWndEdit, EM_SETSEL, 0, (LPARAM)(-1) ); 1278 lphc->wState |= CBF_FOCUSED; 1279 if( !(lphc->wState & CBF_EDIT) ) 1280 { 1281 InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE); 1282 } 1283 1284 CB_NOTIFY( lphc, CBN_SETFOCUS ); 1285 } 1286 } 1287 1258 1288 /*********************************************************************** 1259 1289 * COMBO_SetFocus 1260 1290 */ 1261 static void COMBO_SetFocus( LPHEADCOMBO lphc ) 1262 { 1263 if( !(lphc->wState & CBF_FOCUSED) ) 1264 { 1265 if( CB_GETTYPE(lphc) == CBS_DROPDOWNLIST ) 1266 SendMessageA( lphc->hWndLBox, LB_CARETON, 0, 0 ); 1267 1268 if( lphc->wState & CBF_EDIT ) 1269 SendMessageA( lphc->hWndEdit, EM_SETSEL, 0, (LPARAM)(-1) ); 1270 lphc->wState |= CBF_FOCUSED; 1271 if( !(lphc->wState & CBF_EDIT) ) 1272 { 1273 InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE); 1274 } 1275 1276 CB_NOTIFY( lphc, CBN_SETFOCUS ); 1277 } 1291 static LRESULT COMBO_SetFocus(HWND hwnd,WPARAM wParam,LPARAM lParam) 1292 { 1293 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1294 1295 if(lphc->wState & CBF_EDIT) 1296 SetFocus(lphc->hWndEdit); 1297 else 1298 COMBO_EditSetFocus(lphc); 1299 1300 return 0; 1301 } 1302 1303 static VOID COMBO_EditKillFocus(LPHEADCOMBO lphc) 1304 { 1305 if( lphc->wState & CBF_FOCUSED ) 1306 { 1307 SendMessageA( lphc->hwndself, WM_LBUTTONUP, 0, (LPARAM)(-1) ); 1308 1309 CBRollUp( lphc, FALSE, TRUE ); 1310 if( IsWindow( lphc->hwndself ) ) 1311 { 1312 if( CB_GETTYPE(lphc) == CBS_DROPDOWNLIST ) 1313 SendMessageA( lphc->hWndLBox, LB_CARETOFF, 0, 0 ); 1314 1315 lphc->wState &= ~CBF_FOCUSED; 1316 1317 /* redraw text */ 1318 if( lphc->wState & CBF_EDIT ) 1319 SendMessageA( lphc->hWndEdit, EM_SETSEL, (WPARAM)(-1), 0 ); 1320 else 1321 { 1322 InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE); 1323 } 1324 1325 CB_NOTIFY( lphc, CBN_KILLFOCUS ); 1326 } 1327 } 1278 1328 } 1279 1329 … … 1281 1331 * COMBO_KillFocus 1282 1332 */ 1283 static void COMBO_KillFocus( LPHEADCOMBO lphc ) 1284 { 1285 HWND hWnd = lphc->hwndself; 1286 1287 if( lphc->wState & CBF_FOCUSED ) 1288 { 1289 SendMessageA( hWnd, WM_LBUTTONUP, 0, (LPARAM)(-1) ); 1290 1291 CBRollUp( lphc, FALSE, TRUE ); 1292 if( IsWindow( hWnd ) ) 1293 { 1294 if( CB_GETTYPE(lphc) == CBS_DROPDOWNLIST ) 1295 SendMessageA( lphc->hWndLBox, LB_CARETOFF, 0, 0 ); 1296 1297 lphc->wState &= ~CBF_FOCUSED; 1298 1299 /* redraw text */ 1300 if( lphc->wState & CBF_EDIT ) 1301 SendMessageA( lphc->hWndEdit, EM_SETSEL, (WPARAM)(-1), 0 ); 1302 else 1303 { 1304 InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE); 1305 } 1306 1307 CB_NOTIFY( lphc, CBN_KILLFOCUS ); 1308 } 1309 } 1333 static LRESULT COMBO_KillFocus(HWND hwnd,WPARAM wParam,LPARAM lParam) 1334 { 1335 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1336 1337 if(!wParam || (wParam != lphc->hWndEdit && wParam != lphc->hWndLBox )) 1338 { 1339 COMBO_EditKillFocus(lphc); 1340 } 1341 1342 return 0; 1310 1343 } 1311 1344 … … 1313 1346 * COMBO_Command 1314 1347 */ 1315 static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd ) 1316 { 1317 if ( lphc->wState & CBF_EDIT && lphc->hWndEdit == hWnd ) 1348 static LRESULT COMBO_Command(HWND hwnd,WPARAM wParam,LPARAM lParam) 1349 { 1350 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1351 1352 if ( lphc->wState & CBF_EDIT && lphc->hWndEdit == hwnd ) 1318 1353 { 1319 1354 /* ">> 8" makes gcc generate jump-table instead of cmp ladder */ … … 1326 1361 // CB_HWND(lphc), lphc->hWndEdit ); 1327 1362 1328 if( !(lphc->wState & CBF_FOCUSED) ) COMBO_ SetFocus( lphc);1363 if( !(lphc->wState & CBF_FOCUSED) ) COMBO_EditSetFocus(lphc); 1329 1364 break; 1330 1365 … … 1340 1375 */ 1341 1376 1342 COMBO_ KillFocus( lphc);1377 COMBO_EditKillFocus(lphc); 1343 1378 break; 1344 1379 … … 1372 1407 } 1373 1408 } 1374 else if( lphc->hWndLBox == h Wnd )1409 else if( lphc->hWndLBox == hwnd ) 1375 1410 { 1376 1411 switch( HIWORD(wParam) ) … … 1453 1488 * COMBO_GetText 1454 1489 */ 1455 static LRESULT COMBO_GetText( LPHEADCOMBO lphc, UINT N, LPSTR lpText) 1456 { 1490 static LRESULT COMBO_GetText(HWND hwnd,WPARAM wParam,LPARAM lParam) 1491 { 1492 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1493 1457 1494 if( lphc->wState & CBF_EDIT ) 1458 1495 return SendMessageA( lphc->hWndEdit, WM_GETTEXT, 1459 (WPARAM)N, (LPARAM)lpText);1496 wParam,lParam); 1460 1497 1461 1498 /* get it from the listbox */ … … 1471 1508 1472 1509 /* 'length' is without the terminating character */ 1473 if( length >= N)1510 if( length >= (UINT)wParam ) 1474 1511 lpBuffer = (LPSTR) HeapAlloc( GetProcessHeap(), 0, length + 1 ); 1475 1512 else 1476 lpBuffer = lpText;1513 lpBuffer = (LPSTR)lParam; 1477 1514 1478 1515 if( lpBuffer ) … … 1483 1520 /* truncate if buffer is too short */ 1484 1521 1485 if( length >= N)1522 if( length >= (UINT)wParam ) 1486 1523 { 1487 if ( N && lpText) {1488 if( n != LB_ERR ) memcpy( lpText, lpBuffer, (N>n) ? n+1 : N-1 );1489 lpText[N- 1] = '\0';1524 if ((UINT)wParam && lParam) { 1525 if( n != LB_ERR ) memcpy( (LPSTR)lParam, lpBuffer, ((UINT)wParam>n) ? n+1 : (UINT)wParam-1 ); 1526 ((LPSTR)lParam)[(UINT)wParam - 1] = '\0'; 1490 1527 } 1491 1528 HeapFree( GetProcessHeap(), 0, lpBuffer ); … … 1547 1584 * COMBO_Size 1548 1585 */ 1549 static void COMBO_Size( LPHEADCOMBO lphc ) 1550 { 1586 static LRESULT COMBO_Size(HWND hwnd,WPARAM wParam,LPARAM lParam) 1587 { 1588 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1589 1551 1590 dprintf(("COMBO_Size")); 1552 CBCalcPlacement(lphc->hwndself, 1553 lphc, 1554 &lphc->textRect, 1555 &lphc->buttonRect, 1556 &lphc->droppedRect); 1557 1558 CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE ); 1559 } 1560 1561 1562 /*********************************************************************** 1563 * COMBO_Font 1564 */ 1565 static void COMBO_Font( LPHEADCOMBO lphc, HFONT hFont, BOOL bRedraw ) 1566 { 1567 /* 1568 * Set the font 1569 */ 1570 lphc->hFont = hFont; 1571 1572 /* 1573 * Propagate to owned windows. 1574 */ 1575 if( lphc->wState & CBF_EDIT ) 1576 SendMessageA( lphc->hWndEdit, WM_SETFONT, (WPARAM)hFont, bRedraw ); 1577 SendMessageA( lphc->hWndLBox, WM_SETFONT, (WPARAM)hFont, bRedraw ); 1578 1579 /* 1580 * Redo the layout of the control. 1581 */ 1582 if ( CB_GETTYPE(lphc) == CBS_SIMPLE) 1591 1592 if(lphc->hWndLBox && !(lphc->wState & CBF_NORESIZE)) 1583 1593 { 1584 1594 CBCalcPlacement(lphc->hwndself, … … 1590 1600 CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE ); 1591 1601 } 1602 1603 return 0; 1604 } 1605 1606 1607 /*********************************************************************** 1608 * COMBO_Font 1609 */ 1610 static LRESULT COMBO_SetFont(HWND hwnd,WPARAM wParam,LPARAM lParam) 1611 { 1612 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1613 1614 /* 1615 * Set the font 1616 */ 1617 lphc->hFont = wParam; 1618 1619 /* 1620 * Propagate to owned windows. 1621 */ 1622 if( lphc->wState & CBF_EDIT ) 1623 SendMessageA(lphc->hWndEdit,WM_SETFONT,wParam,lParam); 1624 SendMessageA(lphc->hWndLBox,WM_SETFONT,wParam,lParam); 1625 1626 /* 1627 * Redo the layout of the control. 1628 */ 1629 if ( CB_GETTYPE(lphc) == CBS_SIMPLE) 1630 { 1631 CBCalcPlacement(lphc->hwndself, 1632 lphc, 1633 &lphc->textRect, 1634 &lphc->buttonRect, 1635 &lphc->droppedRect); 1636 1637 CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE ); 1638 } 1592 1639 else 1593 1640 { 1594 1641 CBForceDummyResize(lphc); 1595 1642 } 1643 1644 return 0; 1645 } 1646 1647 static LRESULT COMBO_GetFont(HWND hwnd,WPARAM wParam,LPARAM lParam) 1648 { 1649 LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd); 1650 1651 return lphc->hFont; 1596 1652 } 1597 1653 … … 1791 1847 1792 1848 case WM_NCCREATE: 1793 return COMBO_NCCreate(hwnd, lParam); 1849 return COMBO_NCCreate(hwnd,wParam,lParam); 1850 1794 1851 case WM_NCDESTROY: 1795 COMBO_NCDestroy(lphc); 1796 break;/* -> DefWindowProc */ 1852 return COMBO_NCDestroy(hwnd,wParam,lParam); 1797 1853 1798 1854 case WM_CREATE: 1799 return COMBO_Create(lphc, hwnd,lParam);1855 return COMBO_Create(hwnd,wParam,lParam); 1800 1856 1801 1857 case WM_PRINTCLIENT: 1802 if (lParam & PRF_ERASEBKGND) 1803 COMBO_EraseBackground(hwnd, lphc, wParam); 1804 1805 /* Fallthrough */ 1858 return COMBO_PrintClient(hwnd,wParam,lParam); 1859 1806 1860 case WM_PAINT: 1807 /* wParam may contain a valid HDC! */1808 return COMBO_Paint(lphc, wParam); 1861 return COMBO_Paint(hwnd,wParam,lParam); 1862 1809 1863 case WM_ERASEBKGND: 1810 return COMBO_EraseBackground(hwnd, lphc, wParam); 1864 return COMBO_EraseBackground(hwnd,wParam,lParam); 1865 1811 1866 case WM_GETDLGCODE: 1812 return (LRESULT)(DLGC_WANTARROWS | DLGC_WANTCHARS); 1867 return COMBO_GetDlgCode(hwnd,wParam,lParam); 1868 1813 1869 case WM_WINDOWPOSCHANGING: 1814 return COMBO_WindowPosChanging(hwnd, lphc, (LPWINDOWPOS)lParam); 1870 return COMBO_WindowPosChanging(hwnd,wParam,lParam); 1871 1815 1872 case WM_SIZE: 1816 if( lphc->hWndLBox && 1817 !(lphc->wState & CBF_NORESIZE) ) COMBO_Size( lphc ); 1818 return TRUE; 1873 return COMBO_Size(hwnd,wParam,lParam); 1874 1819 1875 case WM_SETFONT: 1820 COMBO_Font( lphc, (HFONT)wParam, (BOOL)lParam);1821 return TRUE; 1876 return COMBO_SetFont(hwnd,wParam,lParam); 1877 1822 1878 case WM_GETFONT: 1823 return (LRESULT)lphc->hFont; 1879 return COMBO_GetFont(hwnd,wParam,lParam); 1880 1824 1881 case WM_SETFOCUS: 1825 if( lphc->wState & CBF_EDIT ) 1826 SetFocus( lphc->hWndEdit ); 1827 else 1828 COMBO_SetFocus( lphc ); 1829 return TRUE; 1882 return COMBO_SetFocus(hwnd,wParam,lParam); 1883 1830 1884 case WM_KILLFOCUS: 1831 #define hwndFocus ((HWND)wParam) 1832 if( !hwndFocus || 1833 (hwndFocus != lphc->hWndEdit && hwndFocus != lphc->hWndLBox )) 1834 COMBO_KillFocus( lphc ); 1835 #undef hwndFocus 1836 return TRUE; 1885 return COMBO_KillFocus(hwnd,wParam,lParam); 1886 1837 1887 case WM_COMMAND: 1838 return COMBO_Command( lphc, wParam, (HWND)lParam ); 1888 return COMBO_Command(hwnd,wParam,lParam); 1889 1839 1890 case WM_GETTEXT: 1840 return COMBO_GetText( lphc, (UINT)wParam, (LPSTR)lParam ); 1891 return COMBO_GetText(hwnd,wParam,lParam); 1892 //CB: 1841 1893 case WM_SETTEXT: 1842 1894 case WM_GETTEXTLENGTH: -
trunk/src/user32/scroll.cpp
r1762 r1781 1 /* $Id: scroll.cpp,v 1.2 3 1999-11-17 17:04:54 cbratschi Exp $ */1 /* $Id: scroll.cpp,v 1.24 1999-11-19 17:59:34 cbratschi Exp $ */ 2 2 /* 3 3 * Scrollbar control … … 1474 1474 { 1475 1475 SCROLLBAR_INFO *infoPtr; 1476 HWND hwndScroll; 1476 1477 1477 1478 dprintf(("USER32: GetScrollInfo")); 1478 1479 1479 if (!(infoPtr = SCROLL_GetInfoPtr(SCROLL_GetScrollHandle(hwnd,nBar),nBar))) return FALSE; 1480 hwndScroll = SCROLL_GetScrollHandle(hwnd,nBar); 1481 if (!hwndScroll || !(infoPtr = SCROLL_GetInfoPtr(hwndScroll,nBar))) return FALSE; 1480 1482 if (info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)) return FALSE; 1481 1483 if ((info->cbSize != sizeof(*info)) && … … 1485 1487 if (info->fMask & SIF_POS) info->nPos = infoPtr->CurVal; 1486 1488 if ((info->fMask & SIF_TRACKPOS) && (info->cbSize == sizeof(*info))) 1487 info->nTrackPos = (SCROLL_TrackingWin==hwnd) ? SCROLL_TrackingVal : infoPtr->CurVal; 1489 info->nTrackPos = (SCROLL_MovingThumb && SCROLL_TrackingWin == hwndScroll && SCROLL_TrackingBar == nBar) ? SCROLL_TrackingVal:infoPtr->CurVal; 1490 1488 1491 if (info->fMask & SIF_RANGE) 1489 1492 { … … 1548 1551 } 1549 1552 1550 // CB: functions to get 32bit SB_THUMBTRACK position, for internal use (controls)1551 // not supported by Windows, Windows only delivers the 16bit value1552 1553 BOOL IsScrollBarTracking(HWND hwnd,INT nBar)1554 {1555 HWND hwndScroll = SCROLL_GetScrollHandle(hwnd,nBar);1556 1557 return (SCROLL_MovingThumb && SCROLL_TrackingWin == hwnd && SCROLL_TrackingBar == nBar);1558 }1559 1560 INT WINAPI GetScrollTrackPos(HWND hwnd,INT nBar)1561 {1562 SCROLLBAR_INFO *infoPtr;1563 1564 infoPtr = SCROLL_GetInfoPtr(SCROLL_GetScrollHandle(hwnd,nBar),nBar);1565 if (!infoPtr) return 0;1566 1567 return (SCROLL_MovingThumb && SCROLL_TrackingWin == hwnd && SCROLL_TrackingBar == nBar) ? SCROLL_TrackingVal:infoPtr->CurVal;1568 }1569 1570 1553 /************************************************************************* 1571 1554 * SetScrollRange (USER32.503) -
trunk/src/user32/uitools.cpp
r1667 r1781 1 /* $Id: uitools.cpp,v 1.1 6 1999-11-09 17:07:23cbratschi Exp $ */1 /* $Id: uitools.cpp,v 1.17 1999-11-19 17:59:35 cbratschi Exp $ */ 2 2 /* 3 3 * User Interface Functions … … 1902 1902 //****************************************************************************** 1903 1903 //****************************************************************************** 1904 int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT arg5)1905 { 1906 char *astring = UnicodeToAsciiString((LPWSTR) arg2);1904 int WIN32API DrawTextW( HDC hDC, LPCWSTR lpString, int nCount, PRECT lpRect, UINT nFormat) 1905 { 1906 char *astring = UnicodeToAsciiString((LPWSTR)lpString); 1907 1907 int rc; 1908 1908 … … 1910 1910 WriteLog("USER32: DrawTextW %s\n", astring); 1911 1911 #endif 1912 rc = O32_DrawText( arg1, astring, arg3, arg4, arg5);1912 rc = O32_DrawText(hDC,astring,nCount,lpRect,nFormat); 1913 1913 FreeAsciiString(astring); 1914 1914 return(rc); … … 1916 1916 //****************************************************************************** 1917 1917 //****************************************************************************** 1918 int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)1918 int WIN32API DrawTextA(HDC hDC, LPCSTR lpString, int nCount, PRECT lpRect, UINT nFormat) 1919 1919 { 1920 1920 #ifdef DEBUG 1921 WriteLog("USER32: DrawTextA %s ", arg2);1921 WriteLog("USER32: DrawTextA %s %d", lpString,nCount); 1922 1922 #endif 1923 return O32_DrawText( arg1, arg2, arg3, arg4, arg5);1923 return O32_DrawText(hDC,lpString,nCount,lpRect,nFormat); 1924 1924 } 1925 1925 /*****************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.