首页  编辑  

获取选择文本的语言标识

Tags: /超级猛料/VCL/Memo&Edit&Richedit/RichEdit、RxRichEdit/   Date Created:
获取选择文本的语言标识
var
 cf: TCharFormat2;
begin
 fillchar(cf, sizeof(cf), 0);
 cf.cbSize := sizeof( cf );
 cf.dwMask := CFM_LCID;
 richedit1.Perform( EM_GETCHARFORMAT, SCF_SELECTION, lparam(@cf));
 ...here Loword(cf.lcid) should have the language identifier