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

Method GetSelText

DuiLib/Control/UIRichEdit.cpp:1302–1316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1300}
1301
1302CDuiString CRichEditUI::GetSelText() const
1303{
1304 if( !m_pTwh ) return CDuiString();
1305 CHARRANGE cr;
1306 cr.cpMin = cr.cpMax = 0;
1307 TxSendMessage(EM_EXGETSEL, 0, (LPARAM)&cr, 0);
1308 LPWSTR lpText = NULL;
1309 lpText = new WCHAR[cr.cpMax - cr.cpMin + 1];
1310 ::ZeroMemory(lpText, (cr.cpMax - cr.cpMin + 1) * sizeof(WCHAR));
1311 TxSendMessage(EM_GETSELTEXT, 0, (LPARAM)lpText, 0);
1312 CDuiString sText;
1313 sText = (LPCWSTR)lpText;
1314 delete[] lpText;
1315 return sText;
1316}
1317
1318int CRichEditUI::SetSelAll()
1319{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected