Changeset 1781 for trunk/src


Ignore:
Timestamp:
Nov 19, 1999, 6:59:35 PM (26 years ago)
Author:
cbratschi
Message:

fixed listbox scrolling, first work on combo code

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/combo.cpp

    r1764 r1781  
    1 /* $Id: combo.cpp,v 1.14 1999-11-17 21:32:41 cbratschi Exp $ */
     1/* $Id: combo.cpp,v 1.15 1999-11-19 17:59:33 cbratschi Exp $ */
    22/*
    33 * Combo controls
     
    1010 * WINE version: 991031
    1111 */
     12
     13/* CB: bugs
     14 - problems with focus handling (Win32 <-> OS/2)
     15   will be fixed soon
     16*/
    1217
    1318#include <string.h>
     
    9095 *           COMBO_NCCreate
    9196 */
    92 static LRESULT COMBO_NCCreate(HWND hwnd, LPARAM lParam)
     97static LRESULT COMBO_NCCreate(HWND hwnd,WPARAM wParam,LPARAM lParam)
    9398{
    9499   LPHEADCOMBO          lphc;
     
    125130        //             (UINT)lphc, lphc->dwStyle );
    126131
    127         return (LRESULT)(UINT)hwnd;
     132        return TRUE;
    128133    }
    129     return (LRESULT)FALSE;
     134    return FALSE;
    130135}
    131136
     
    133138 *           COMBO_NCDestroy
    134139 */
    135 static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc )
    136 {
     140static LRESULT COMBO_NCDestroy(HWND hwnd,WPARAM wParam,LPARAM lParam)
     141{
     142   LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
    137143
    138144   if( lphc )
     
    148154       SetInfoPtr(hwnd,0);
    149155   }
    150    return 0;
     156
     157   return DefWindowProcA(hwnd,WM_NCDESTROY,wParam,lParam);
    151158}
    152159
     
    423430 *           COMBO_WindowPosChanging
    424431 */
    425 static LRESULT COMBO_WindowPosChanging(
    426   HWND        hwnd,
    427   LPHEADCOMBO lphc,
    428   WINDOWPOS*  posChanging)
    429 {
     432static LRESULT COMBO_WindowPosChanging(HWND hwnd,WPARAM wParam,LPARAM lParam)
     433{
     434  LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
     435  WINDOWPOS *posChanging = (WINDOWPOS*)lParam;
     436
    430437  dprintf(("COMBO_WindowPosChanging"));
    431438
     
    466473 *           COMBO_Create
    467474 */
    468 static LRESULT COMBO_Create( LPHEADCOMBO lphc, HWND hwnd, LPARAM lParam)
     475static LRESULT COMBO_Create(HWND hwnd,WPARAM wParam,LPARAM lParam)
    469476{
    470477  static char clbName[] = "ComboLBox";
    471478  static char editName[] = "Edit";
     479  LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
    472480
    473481  LPCREATESTRUCTA  lpcs = (CREATESTRUCTA*)lParam;
     
    884892 *           COMBO_EraseBackground
    885893 */
    886 static LRESULT COMBO_EraseBackground(
    887   HWND        hwnd,
    888   LPHEADCOMBO lphc,
    889   HDC         hParamDC)
    890 {
     894static LRESULT COMBO_EraseBackground(HWND hwnd,WPARAM wParam,LPARAM lParam)
     895{
     896  LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
    891897  HBRUSH  hBkgBrush;
    892898  RECT    clientRect;
    893899  HDC     hDC;
    894900
    895   hDC = (hParamDC) ? hParamDC
    896                    : GetDC(hwnd);
     901  hDC = (wParam) ? (HDC)wParam:GetDC(hwnd);
    897902
    898903  /*
     
    917922  FillRect(hDC, &clientRect, hBkgBrush);
    918923
    919   if (!hParamDC)
     924  if (!wParam)
    920925    ReleaseDC(hwnd, hDC);
    921926
     
    923928}
    924929
     930static LRESULT COMBO_GetDlgCode(HWND hwnd,WPARAM wParam,LPARAM lParam)
     931{
     932  return DLGC_WANTARROWS | DLGC_WANTCHARS;
     933}
     934
    925935/***********************************************************************
    926936 *           COMBO_Paint
    927937 */
    928 static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
    929 {
     938static LRESULT COMBO_Paint(HWND hwnd,WPARAM wParam,LPARAM lParam)
     939{
     940  LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
    930941  PAINTSTRUCT ps;
    931942  HDC   hDC;
    932943
    933   hDC = (hParamDC) ? hParamDC
    934                    : BeginPaint( lphc->hwndself, &ps);
     944  hDC = (wParam) ? (HDC)wParam:BeginPaint( lphc->hwndself, &ps);
    935945
    936946
     
    970980  }
    971981
    972   if( !hParamDC )
    973     EndPaint(lphc->hwndself, &ps);
     982  if(!wParam) EndPaint(lphc->hwndself, &ps);
    974983
    975984  return 0;
     985}
     986
     987static 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);
    976992}
    977993
     
    12361252HWND COMBO_GetLBWindow( HWND hwnd )
    12371253{
    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;
    12461257}
    12471258
     
    12561267}
    12571268
     1269static 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
    12581288/***********************************************************************
    12591289 *           COMBO_SetFocus
    12601290 */
    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    }
     1291static 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
     1303static 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  }
    12781328}
    12791329
     
    12811331 *           COMBO_KillFocus
    12821332 */
    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    }
     1333static 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;
    13101343}
    13111344
     
    13131346 *           COMBO_Command
    13141347 */
    1315 static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
    1316 {
    1317    if ( lphc->wState & CBF_EDIT && lphc->hWndEdit == hWnd )
     1348static 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 )
    13181353   {
    13191354       /* ">> 8" makes gcc generate jump-table instead of cmp ladder */
     
    13261361                //             CB_HWND(lphc), lphc->hWndEdit );
    13271362
    1328                 if( !(lphc->wState & CBF_FOCUSED) ) COMBO_SetFocus( lphc );
     1363                if( !(lphc->wState & CBF_FOCUSED) ) COMBO_EditSetFocus(lphc);
    13291364                break;
    13301365
     
    13401375                 */
    13411376
    1342                 COMBO_KillFocus( lphc );
     1377                COMBO_EditKillFocus(lphc);
    13431378                break;
    13441379
     
    13721407       }
    13731408   }
    1374    else if( lphc->hWndLBox == hWnd )
     1409   else if( lphc->hWndLBox == hwnd )
    13751410   {
    13761411       switch( HIWORD(wParam) )
     
    14531488 *           COMBO_GetText
    14541489 */
    1455 static LRESULT COMBO_GetText( LPHEADCOMBO lphc, UINT N, LPSTR lpText)
    1456 {
     1490static LRESULT COMBO_GetText(HWND hwnd,WPARAM wParam,LPARAM lParam)
     1491{
     1492   LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
     1493
    14571494   if( lphc->wState & CBF_EDIT )
    14581495       return SendMessageA( lphc->hWndEdit, WM_GETTEXT,
    1459                              (WPARAM)N, (LPARAM)lpText );
     1496                             wParam,lParam);
    14601497
    14611498   /* get it from the listbox */
     
    14711508
    14721509           /* 'length' is without the terminating character */
    1473            if( length >= N )
     1510           if( length >= (UINT)wParam )
    14741511               lpBuffer = (LPSTR) HeapAlloc( GetProcessHeap(), 0, length + 1 );
    14751512           else
    1476                lpBuffer = lpText;
     1513               lpBuffer = (LPSTR)lParam;
    14771514
    14781515           if( lpBuffer )
     
    14831520               /* truncate if buffer is too short */
    14841521
    1485                if( length >= N )
     1522               if( length >= (UINT)wParam )
    14861523               {
    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';
    14901527                   }
    14911528                   HeapFree( GetProcessHeap(), 0, lpBuffer );
     
    15471584 *           COMBO_Size
    15481585 */
    1549 static void COMBO_Size( LPHEADCOMBO lphc )
    1550   {
     1586static LRESULT COMBO_Size(HWND hwnd,WPARAM wParam,LPARAM lParam)
     1587{
     1588  LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
     1589
    15511590  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))
    15831593  {
    15841594    CBCalcPlacement(lphc->hwndself,
     
    15901600    CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE );
    15911601  }
     1602
     1603  return 0;
     1604}
     1605
     1606
     1607/***********************************************************************
     1608 *           COMBO_Font
     1609 */
     1610static 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  }
    15921639  else
    15931640  {
    15941641    CBForceDummyResize(lphc);
    15951642  }
     1643
     1644  return 0;
     1645}
     1646
     1647static LRESULT COMBO_GetFont(HWND hwnd,WPARAM wParam,LPARAM lParam)
     1648{
     1649  LPHEADCOMBO lphc = (LPHEADCOMBO)GetInfoPtr(hwnd);
     1650
     1651  return lphc->hFont;
    15961652}
    15971653
     
    17911847
    17921848        case WM_NCCREATE:
    1793                 return COMBO_NCCreate(hwnd, lParam);
     1849          return COMBO_NCCreate(hwnd,wParam,lParam);
     1850
    17941851        case WM_NCDESTROY:
    1795                 COMBO_NCDestroy(lphc);
    1796                 break;/* -> DefWindowProc */
     1852          return COMBO_NCDestroy(hwnd,wParam,lParam);
    17971853
    17981854        case WM_CREATE:
    1799                 return COMBO_Create(lphc, hwnd, lParam);
     1855          return COMBO_Create(hwnd,wParam,lParam);
    18001856
    18011857        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
    18061860        case WM_PAINT:
    1807                 /* wParam may contain a valid HDC! */
    1808                 return  COMBO_Paint(lphc, wParam);
     1861          return COMBO_Paint(hwnd,wParam,lParam);
     1862
    18091863        case WM_ERASEBKGND:
    1810                 return  COMBO_EraseBackground(hwnd, lphc, wParam);
     1864          return COMBO_EraseBackground(hwnd,wParam,lParam);
     1865
    18111866        case WM_GETDLGCODE:
    1812                 return  (LRESULT)(DLGC_WANTARROWS | DLGC_WANTCHARS);
     1867          return COMBO_GetDlgCode(hwnd,wParam,lParam);
     1868
    18131869        case WM_WINDOWPOSCHANGING:
    1814                 return  COMBO_WindowPosChanging(hwnd, lphc, (LPWINDOWPOS)lParam);
     1870          return COMBO_WindowPosChanging(hwnd,wParam,lParam);
     1871
    18151872        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
    18191875        case WM_SETFONT:
    1820                 COMBO_Font( lphc, (HFONT)wParam, (BOOL)lParam );
    1821                 return  TRUE;
     1876          return COMBO_SetFont(hwnd,wParam,lParam);
     1877
    18221878        case WM_GETFONT:
    1823                 return  (LRESULT)lphc->hFont;
     1879          return COMBO_GetFont(hwnd,wParam,lParam);
     1880
    18241881        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
    18301884        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
    18371887        case WM_COMMAND:
    1838                 return  COMBO_Command( lphc, wParam, (HWND)lParam );
     1888          return COMBO_Command(hwnd,wParam,lParam);
     1889
    18391890        case WM_GETTEXT:
    1840                 return  COMBO_GetText( lphc, (UINT)wParam, (LPSTR)lParam );
     1891          return COMBO_GetText(hwnd,wParam,lParam);
     1892//CB:
    18411893        case WM_SETTEXT:
    18421894        case WM_GETTEXTLENGTH:
  • trunk/src/user32/scroll.cpp

    r1762 r1781  
    1 /* $Id: scroll.cpp,v 1.23 1999-11-17 17:04:54 cbratschi Exp $ */
     1/* $Id: scroll.cpp,v 1.24 1999-11-19 17:59:34 cbratschi Exp $ */
    22/*
    33 * Scrollbar control
     
    14741474{
    14751475  SCROLLBAR_INFO *infoPtr;
     1476  HWND hwndScroll;
    14761477
    14771478    dprintf(("USER32: GetScrollInfo"));
    14781479
    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;
    14801482    if (info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)) return FALSE;
    14811483    if ((info->cbSize != sizeof(*info)) &&
     
    14851487    if (info->fMask & SIF_POS) info->nPos = infoPtr->CurVal;
    14861488    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
    14881491    if (info->fMask & SIF_RANGE)
    14891492    {
     
    15481551}
    15491552
    1550 // CB: functions to get 32bit SB_THUMBTRACK position, for internal use (controls)
    1551 //     not supported by Windows, Windows only delivers the 16bit value
    1552 
    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 
    15701553/*************************************************************************
    15711554 *           SetScrollRange   (USER32.503)
  • trunk/src/user32/uitools.cpp

    r1667 r1781  
    1 /* $Id: uitools.cpp,v 1.16 1999-11-09 17:07:23 cbratschi Exp $ */
     1/* $Id: uitools.cpp,v 1.17 1999-11-19 17:59:35 cbratschi Exp $ */
    22/*
    33 * User Interface Functions
     
    19021902//******************************************************************************
    19031903//******************************************************************************
    1904 int WIN32API DrawTextW( HDC arg1, LPCWSTR arg2, int arg3, PRECT arg4, UINT  arg5)
    1905 {
    1906  char *astring = UnicodeToAsciiString((LPWSTR)arg2);
     1904int WIN32API DrawTextW( HDC hDC, LPCWSTR lpString, int nCount, PRECT lpRect, UINT nFormat)
     1905{
     1906 char *astring = UnicodeToAsciiString((LPWSTR)lpString);
    19071907 int   rc;
    19081908
     
    19101910    WriteLog("USER32:  DrawTextW %s\n", astring);
    19111911#endif
    1912     rc = O32_DrawText(arg1, astring, arg3, arg4, arg5);
     1912    rc = O32_DrawText(hDC,astring,nCount,lpRect,nFormat);
    19131913    FreeAsciiString(astring);
    19141914    return(rc);
     
    19161916//******************************************************************************
    19171917//******************************************************************************
    1918 int WIN32API DrawTextA(HDC arg1, LPCSTR arg2, int arg3, PRECT arg4, UINT arg5)
     1918int WIN32API DrawTextA(HDC hDC, LPCSTR lpString, int nCount, PRECT lpRect, UINT nFormat)
    19191919{
    19201920#ifdef DEBUG
    1921     WriteLog("USER32: DrawTextA %s", arg2);
     1921    WriteLog("USER32: DrawTextA %s %d", lpString,nCount);
    19221922#endif
    1923     return O32_DrawText(arg1, arg2, arg3, arg4, arg5);
     1923    return O32_DrawText(hDC,lpString,nCount,lpRect,nFormat);
    19241924}
    19251925/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.