Changeset 21461
- Timestamp:
- Sep 28, 2010, 10:10:19 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/win32api.h (modified) (1 diff)
-
src/user32/oslibwin.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/win32api.h
r10600 r21461 200 200 BOOL WIN32API CloseHandle(HANDLE); 201 201 202 BOOL WIN32API CharToOemBuffA( LPCSTR s, LPSTR d, DWORD len ); 202 BOOL WIN32API OemToCharA(LPCSTR s, LPSTR d); 203 BOOL WIN32API OemToCharBuffA(LPCSTR s, LPSTR d, DWORD len); 204 BOOL WIN32API CharToOemA(LPCSTR s, LPSTR d); 205 BOOL WIN32API CharToOemBuffA(LPCSTR s, LPSTR d, DWORD len); 203 206 LPSTR WIN32API CharPrevA(LPCSTR start, LPCSTR ptr); 204 207 -
trunk/src/user32/oslibwin.cpp
r10549 r21461 562 562 LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz) 563 563 { 564 return WinQueryWindowText(hwnd, length, lpsz); 564 LONG retLen = WinQueryWindowText(hwnd, length, lpsz); 565 OemToCharBuffA(lpsz, lpsz, retLen); 566 lpsz[retLen] = '\0'; 567 return retLen; 565 568 } 566 569 //****************************************************************************** … … 568 571 BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz) 569 572 { 570 return WinSetWindowText(hwnd, lpsz); 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; 571 583 } 572 584 //****************************************************************************** … … 574 586 BOOL OSLibWinSetTitleBarText(HWND hwnd, LPSTR lpsz) 575 587 { 576 return WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), lpsz); 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; 577 598 } 578 599 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.
