这个方法可以读取MessageCenter里面的历史消息吗?
这个是要和.r资源配合的。您可以到SDK的C++例子中的.r中找有关MessageList的定义。比如
MessageList MESSAGELISTID_SclTxCel = { { { 0, "Identify element" }, { 1, "Accept/Reject" }, { 2, "Scale All" }, { 3, "Scale Single" }, { 4, "Scale Fence" }, { 5, "Rotate All" }, { 6, "Rotate Single" }, { 7, "Rotate Fence" }, { 8, "%d Text %d Node %d Cell elements changed"}, { 9, "Unable to load command table." }, { 10, "Unable to load SclRotTC" }, } };
MESSAGELISTID_SclTxCel就是这个listId,0、1到10则是stringId。其目的是不要将任何字符串放入源代码中,这样便于将来软件的多语言化。比如,想将英文变成中文,只需要将.r文件发给翻译公司翻译后重编译一下即可。
Answer Verified By: 鑫 杨
谢谢符老师