Ignore:
Timestamp:
Jul 16, 1999, 7:50:10 PM (26 years ago)
Author:
cbratschi
Message:

Button from WINE, first user32.cpp work

File:
1 edited

Legend:

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

    r300 r317  
    1 /* $Id: user32.cpp,v 1.1 1999-07-14 08:35:36 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.2 1999-07-16 17:50:10 cbratschi Exp $ */
    22
    33/*
     
    189189    WriteLog("USER32:  MessageBeep\n");
    190190#endif
     191/*
     192    switch (arg1)
     193    {
     194      case 0xFFFFFFFF:
     195        DosBeep(500,50);
     196        return TRUE;
     197      case MB_ICONASTERISK:
     198        return WinAlarm(HWND_DESKTOP,WA_ERROR);
     199      case MB_ICONEXCLAMATION:
     200        return WinAlaram(HWND_DESKTOP,WA_WARNING);
     201      case MB_ICONHAND:
     202      case MB_ICONQUESTION:
     203      case MB_OK:
     204        return WinAlaram(HWND_DESKTOP,WA_NOTE);
     205      default:
     206        return WinAlarm(HWND_DESKTOP,WA_ERROR); //CB: should be right
     207    }
     208*/
    191209    return O32_MessageBeep(arg1);
    192210}
    193211//******************************************************************************
    194 // Not implemented by Open32 (31-5-99 Christoph Bratschi)
    195212//******************************************************************************
    196213BOOL WIN32API IsDlgButtonChecked( HWND arg1, UINT  arg2)
     
    199216    WriteLog("USER32:  IsDlgButtonChecked\n");
    200217#endif
    201 //    return O32_IsDlgButtonChecked(arg1, arg2);
     218    //CB: get button state
    202219    return (BOOL)SendDlgItemMessageA(arg1,arg2,BM_GETCHECK,0,0);
    203220}
     
    207224{
    208225    dprintf(("USER32:  GetWindowTextLength\n"));
     226    //return WinQueryWindowTextLength(arg1);
    209227    return O32_GetWindowTextLength(arg1);
    210228}
     
    214232{
    215233    dprintf(("USER32:  GetWindowTextA\n"));
     234    //return WinQueryWindowText(arg1,arg3,arg2);
    216235    return O32_GetWindowText(arg1, arg2, arg3);
    217236}
     
    254273{
    255274//    dprintf(("USER32:  GetFocus\n"));
     275    //return WinQueryFocus(HWND_DESKTOP);
    256276    return O32_GetFocus();
    257277}
     
    278298{
    279299    dprintf(("USER32:  GetDesktopWindow\n"));
     300    //return HWND_DESKTOP //CB: WinQueryDesktopWindow();, hab and hdc not available!
    280301    return O32_GetDesktopWindow();
    281302}
     
    310331////    WriteLog("USER32:  OffsetRect\n");
    311332#endif
     333    //CB: inc values
     334    // todo
    312335    return O32_OffsetRect(arg1, arg2, arg3);
    313336}
     
    317340{
    318341//    ddprintf(("USER32:  CopyRect\n"));
     342    //memcpy();
    319343    return O32_CopyRect(arg1, arg2);
    320344}
     
    335359{
    336360    dprintf(("USER32:  SetFocus\n"));
     361    //return WinSetFocus(HWND_DESKTOP,arg1);
    337362    return O32_SetFocus(arg1);
    338363}
     
    344369    WriteLog("USER32:  ReleaseDC\n");
    345370#endif
     371    //return WinReleasePS(arg2);
    346372    return O32_ReleaseDC(arg1, arg2);
    347373}
     
    355381    else    WriteLog("USER32:  InvalidateRect for window %X NULL, %d\n", arg1, arg3);
    356382#endif
     383    //return WinInvalidateRect(arg1,arg2,arg3);
    357384    return O32_InvalidateRect(arg1, arg2, arg3);
    358385}
     
    372399 HDC hdc;
    373400
     401   //hdc = WinGetPS(arg1);
    374402   hdc = O32_GetDC(arg1);
    375403#ifdef DEBUG
     
    385413    WriteLog("USER32:  GetDCEx\n");
    386414#endif
     415    //return GetDC(arg1);
     416    //change values
    387417    return O32_GetDCEx(arg1, arg2, arg3);
    388418}
     
    394424    WriteLog("USER32:  EndPaint\n");
    395425#endif
     426    //return WinEndPaint(arg2->hdc);
    396427    return O32_EndPaint(arg1, arg2);
    397428}
     
    403434{
    404435    dprintf(("USER32: BeginPaint %X\n", arg2));
     436    //return WinBeginPaint(arg1,);
     437    //CB: emulate
    405438    return O32_BeginPaint(arg1, arg2);
    406439}
     
    413446   switch(arg1) {
    414447    case SM_CXICONSPACING: //TODO: size of grid cell for large icons
     448        //rc = WinQuerySysValue(HWND_DESKTOP,SV_CXICON);
     449        //CB: better: return standard windows icon size
     450        //rc = 32;
    415451        rc = O32_GetSystemMetrics(SM_CXICON);
    416452        break;
     
    765801}
    766802//******************************************************************************
    767 // Not implemented by Open32 (5-31-99 Christoph Bratschi)
    768803//******************************************************************************
    769804BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT  arg4)
     
    772807    WriteLog("USER32:  CheckRadioButton\n");
    773808#endif
    774 //    return O32_CheckRadioButton(arg1, arg2, arg3, arg4);
     809    //CB: check radio buttons in interval
    775810    if (arg2 > arg3) return (FALSE);
    776811    for (UINT x=arg2;x <= arg3;x++)
Note: See TracChangeset for help on using the changeset viewer.