Changeset 21463 for trunk/src/user32
- Timestamp:
- Sep 29, 2010, 12:46:01 AM (15 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r21461 r21463 562 562 LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz) 563 563 { 564 LONG retLen = WinQueryWindowText(hwnd, length, lpsz); 565 OemToCharBuffA(lpsz, lpsz, retLen); 566 lpsz[retLen] = '\0'; 567 return retLen; 564 return WinQueryWindowText(hwnd, length, lpsz); 568 565 } 569 566 //****************************************************************************** … … 571 568 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz) 572 569 { 573 PSZ psz = NULL; 574 if(lpsz) { 575 psz = (PSZ)_smalloc(strlen(lpsz) + 1); 576 CharToOemA(lpsz, psz); 577 } 578 BOOL rc = WinSetWindowText(hwnd, psz); 579 if (psz) { 580 _sfree(psz); 581 } 582 return rc; 570 return WinSetWindowText(hwnd, lpsz); 583 571 } 584 572 //****************************************************************************** … … 586 574 BOOL OSLibWinSetTitleBarText(HWND hwnd, LPSTR lpsz) 587 575 { 588 PSZ psz = NULL; 589 if(lpsz) { 590 psz = (PSZ)_smalloc(strlen(lpsz) + 1); 591 CharToOemA(lpsz, psz); 592 } 593 BOOL rc = WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), psz); 594 if (psz) { 595 _sfree(psz); 596 } 597 return rc; 576 return WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), lpsz); 598 577 } 599 578 //****************************************************************************** -
trunk/src/user32/win32wbase.cpp
r21372 r21463 528 528 //****************************************************************************** 529 529 //****************************************************************************** 530 static BOOL OSLibWinSetTitleBarTextA(HWND hwnd, LPSTR lpsz) 531 { 532 LPSTR psz = NULL; 533 if(lpsz) { 534 psz = (LPSTR)_smalloc(strlen(lpsz) + 1); 535 CharToOemA(lpsz, psz); 536 } 537 BOOL rc = OSLibWinSetTitleBarText(hwnd, psz); 538 if (psz) { 539 _sfree(psz); 540 } 541 return rc; 542 } 543 //****************************************************************************** 544 //****************************************************************************** 530 545 BOOL Win32BaseWindow::MsgCreate(HWND hwndOS2) 531 546 { … … 620 635 621 636 if(fOS2Look) { 622 OSLibWinSetTitleBarText (OS2HwndFrame, windowNameA);637 OSLibWinSetTitleBarTextA(OS2HwndFrame, windowNameA); 623 638 } 624 639 } … … 1635 1650 } 1636 1651 if(fOS2Look) { 1637 OSLibWinSetTitleBarText (OS2HwndFrame, getWindowNameA());1652 OSLibWinSetTitleBarTextA(OS2HwndFrame, getWindowNameA()); 1638 1653 } 1639 1654 } … … 2211 2226 } 2212 2227 if(fOS2Look) { 2213 OSLibWinSetTitleBarText (OS2HwndFrame, getWindowNameA());2228 OSLibWinSetTitleBarTextA(OS2HwndFrame, getWindowNameA()); 2214 2229 } 2215 2230 }
Note:
See TracChangeset
for help on using the changeset viewer.