简体   繁体   English

EM_EXLINEFROMCHAR 参数的含义

[英]Meaning of the parameters for EM_EXLINEFROMCHAR

The parameter for EM_EXLINEFROMCHAR and EM_LINEFROMCHAR are different. EM_EXLINEFROMCHAREM_LINEFROMCHAR的参数不同。

While I can find the example of the latter the former does not produce any useful links.虽然我可以找到后者的例子,但前者并没有产生任何有用的链接。

What I wonder is - if I pass -1 just like in EM_LINEFROMCHAR to EM_EXLINEFROMCHAR for the current line where the caret is located will it work properly.我想知道的是 - 如果我像在EM_LINEFROMCHAR中一样将-1传递给EM_EXLINEFROMCHAR以用于插入符号所在的当前行,它将正常工作。 MSDN unfortunately doesn't explain it.不幸的是,MSDN 没有解释它。

TIA!!蒂亚!!

Unfortunately, the documentation for EM_EXLINEFROMCHAR only says that the lParam is a "Zero-based index of the character", there is no mention of whether -1 is allowed or not.不幸的是, EM_EXLINEFROMCHAR的文档只说lParam是“字符的从零开始的索引”,没有提到是否允许-1 So best not to take any chances.所以最好不要冒险。 Getting the current caret position is trivial using EM_GETSEL or EM_EXGETSEL .使用EM_GETSELEM_EXGETSEL获取当前插入符号 position 是微不足道的。

Unlike the EM_LINEFROMCHAR documentation, which explicitly states that -1 is supported and what it represents.EM_LINEFROMCHAR文档不同,该文档明确指出支持-1以及它代表什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM