| 441 | } |
| 442 | |
| 443 | CStringA CSciEdit::StringForControl(const CString& text) |
| 444 | { |
| 445 | CStringA sTextA; |
| 446 | #ifdef UNICODE |
| 447 | int codepage = static_cast<int>(SendMessage(SCI_GETCODEPAGE)); |
| 448 | int reslen = WideCharToMultiByte(codepage, 0, text, text.GetLength(), 0, 0, 0, 0); |
| 449 | WideCharToMultiByte(codepage, 0, text, text.GetLength(), sTextA.GetBuffer(reslen), reslen, 0, 0); |
| 450 | sTextA.ReleaseBuffer(reslen); |
| 451 | #else |
| 452 | sTextA = text; |
| 453 | #endif |
| 454 | ATLTRACE("string length %d\n", sTextA.GetLength()); |
| 455 | return sTextA; |
| 456 | } |
| 457 | |
| 458 | void CSciEdit::SetText(const CString& sText) |
| 459 | { |
no test coverage detected