[英]Meaning of the parameters for EM_EXLINEFROMCHAR
The parameter for EM_EXLINEFROMCHAR
and EM_LINEFROMCHAR
are different. EM_EXLINEFROMCHAR
和EM_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_GETSEL
或EM_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.