MCPcopy Create free account
hub / github.com/cinience/RedisStudio / GetTextRange

Method GetTextRange

DuiLib/Control/UIRichEdit.cpp:1386–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1384}
1385
1386CDuiString CRichEditUI::GetTextRange(long nStartChar, long nEndChar) const
1387{
1388 TEXTRANGEW tr = { 0 };
1389 tr.chrg.cpMin = nStartChar;
1390 tr.chrg.cpMax = nEndChar;
1391 LPWSTR lpText = NULL;
1392 lpText = new WCHAR[nEndChar - nStartChar + 1];
1393 ::ZeroMemory(lpText, (nEndChar - nStartChar + 1) * sizeof(WCHAR));
1394 tr.lpstrText = lpText;
1395 TxSendMessage(EM_GETTEXTRANGE, 0, (LPARAM)&tr, 0);
1396 CDuiString sText;
1397 sText = (LPCWSTR)lpText;
1398 delete[] lpText;
1399 return sText;
1400}
1401
1402void CRichEditUI::HideSelection(bool bHide, bool bChangeStyle)
1403{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected