Ignore:
Timestamp:
Sep 4, 1999, 9:42:30 PM (26 years ago)
Author:
sandervl
Message:

Dialog changes

File:
1 edited

Legend:

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

    r760 r821  
    1 /* $Id: window.cpp,v 1.21 1999-08-31 17:14:52 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.22 1999-09-04 19:42:30 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    558558    }
    559559    dprintf(("GetWindowTextLength %x", hwnd));
    560     return window->GetWindowTextLengthA();
     560    return window->GetWindowTextLength();
    561561}
    562562//******************************************************************************
     
    565565{
    566566   Win32BaseWindow *window;
     567   int rc;
    567568
    568569    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     
    571572        return 0;
    572573    }
    573     dprintf(("GetWindowTextA %x", hwnd));
    574     return window->GetWindowTextA(lpsz, cch);
     574    rc = window->GetWindowText(lpsz, cch);
     575    dprintf(("GetWindowTextA %x %s", hwnd, lpsz));
     576    return rc;
    575577}
    576578//******************************************************************************
     
    585587int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch)
    586588{
    587  char title[128];
    588  int  rc;
    589 
    590    rc = O32_GetWindowText(hwnd, title, sizeof(title));
    591 #ifdef DEBUG
    592    WriteLog("USER32:  GetWindowTextW returned %s\n", title);
    593 #endif
    594    if(rc > cch) {
    595     title[cch-1] = 0;
    596     rc = cch;
    597    }
    598    AsciiToUnicode(title, lpsz);
    599    return(rc);
     589   Win32BaseWindow *window;
     590
     591    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     592    if(!window) {
     593        dprintf(("GetWindowTextW, window %x not found", hwnd));
     594        return 0;
     595    }
     596    dprintf(("GetWindowTextW %x", hwnd));
     597    return window->GetWindowText((LPSTR)lpsz, cch);
    600598}
    601599//******************************************************************************
     
    615613//******************************************************************************
    616614//******************************************************************************
    617 BOOL WIN32API SetWindowTextW( HWND arg1, LPCWSTR arg2)
    618 {
    619  char *astring = UnicodeToAsciiString((LPWSTR)arg2);
    620  BOOL  rc;
    621 
    622    rc = SetWindowTextA(arg1, (LPCSTR)astring);
    623    dprintf(("USER32:  SetWindowTextW %X %s returned %d\n", arg1, astring, rc));
    624    FreeAsciiString(astring);
    625    return(rc);
     615BOOL WIN32API SetWindowTextW( HWND hwnd, LPCWSTR lpsz)
     616{
     617   Win32BaseWindow *window;
     618
     619    window = Win32BaseWindow::GetWindowFromHandle(hwnd);
     620    if(!window) {
     621        dprintf(("SetWindowTextA, window %x not found", hwnd));
     622        return 0;
     623    }
     624    dprintf(("SetWindowTextW %x", hwnd));
     625    return window->SetWindowText((LPSTR)lpsz);
    626626}
    627627/*******************************************************************
Note: See TracChangeset for help on using the changeset viewer.