本文介绍了UNICODE中的Scintilla SCI_GETTEXT消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
::SendMessage (curScintilla, SCI_SETKEYSUNICODE, true, 0);
int nLength = ::SendMessage(curScintilla, SCI_GETLENGTH, 0, NULL);
TCHAR * pBuffer = new TCHAR[nLength + 1];
::memset ((void *)pBuffer, 0, sizeof(TCHAR) * (nLength + 1));
int nTempLength = (int) ::SendMessage(curScintilla, SCI_GETTEXT, nLength + 1, (LPARAM)pBuffer);
strText.append(pBuffer);
delete pBuffer;
SCI_GETTEXT返回象形文字。
我需要做什么来获取文字?
谢谢。
SCI_GETTEXT returns hieroglyphs.
What do I need to do to get text?
Thanks.
推荐答案
nLength = ::SendMessage(curScintilla, SCI_GETLENGTH, 0, NULL);
CHAR * pBuffer = new CHAR[nLength + 1];
::memset ((void *)pBuffer, 0, sizeof(CHAR) * (nLength + 1));
int nTempLength = (int) ::SendMessageA(curScintilla, SCI_GETTEXT, nLength + 1, (LPARAM)pBuffer);
delete pBuffer;
这篇关于UNICODE中的Scintilla SCI_GETTEXT消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!