UNICODE中的Scintilla SCI_GETTEXT消息 [英] Scintilla SCI_GETTEXT message in UNICODE

查看:101
本文介绍了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.

推荐答案

根据文档 [ ^ ],此消息返回ASCII字符。
According to the documentation[^], this message returns ASCII characters.


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消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆