Changeset 821 for trunk/src/user32/new/window.cpp
- Timestamp:
- Sep 4, 1999, 9:42:30 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/window.cpp
r760 r821 1 /* $Id: window.cpp,v 1.2 1 1999-08-31 17:14:52sandervl Exp $ */1 /* $Id: window.cpp,v 1.22 1999-09-04 19:42:30 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 558 558 } 559 559 dprintf(("GetWindowTextLength %x", hwnd)); 560 return window->GetWindowTextLength A();560 return window->GetWindowTextLength(); 561 561 } 562 562 //****************************************************************************** … … 565 565 { 566 566 Win32BaseWindow *window; 567 int rc; 567 568 568 569 window = Win32BaseWindow::GetWindowFromHandle(hwnd); … … 571 572 return 0; 572 573 } 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; 575 577 } 576 578 //****************************************************************************** … … 585 587 int WIN32API GetWindowTextW(HWND hwnd, LPWSTR lpsz, int cch) 586 588 { 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); 600 598 } 601 599 //****************************************************************************** … … 615 613 //****************************************************************************** 616 614 //****************************************************************************** 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); 615 BOOL 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); 626 626 } 627 627 /*******************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.