| 1205 | } |
| 1206 | |
| 1207 | CDuiString CRichEditUI::GetText() const |
| 1208 | { |
| 1209 | long lLen = GetTextLength(GTL_DEFAULT); |
| 1210 | LPTSTR lpText = NULL; |
| 1211 | GETTEXTEX gt; |
| 1212 | gt.flags = GT_DEFAULT; |
| 1213 | #ifdef _UNICODE |
| 1214 | gt.cb = sizeof(TCHAR) * (lLen + 1) ; |
| 1215 | gt.codepage = 1200; |
| 1216 | lpText = new TCHAR[lLen + 1]; |
| 1217 | ::ZeroMemory(lpText, (lLen + 1) * sizeof(TCHAR)); |
| 1218 | #else |
| 1219 | gt.cb = sizeof(TCHAR) * lLen * 2 + 1; |
| 1220 | gt.codepage = CP_ACP; |
| 1221 | lpText = new TCHAR[lLen * 2 + 1]; |
| 1222 | ::ZeroMemory(lpText, (lLen * 2 + 1) * sizeof(TCHAR)); |
| 1223 | #endif |
| 1224 | gt.lpDefaultChar = NULL; |
| 1225 | gt.lpUsedDefChar = NULL; |
| 1226 | TxSendMessage(EM_GETTEXTEX, (WPARAM)>, (LPARAM)lpText, 0); |
| 1227 | CDuiString sText(lpText); |
| 1228 | delete[] lpText; |
| 1229 | return sText; |
| 1230 | } |
| 1231 | |
| 1232 | void CRichEditUI::SetText(LPCTSTR pstrText) |
| 1233 | { |
nothing calls this directly
no outgoing calls
no test coverage detected