简体   繁体   中英

Meaning of the parameters for EM_EXLINEFROMCHAR

The parameter for EM_EXLINEFROMCHAR and EM_LINEFROMCHAR are different.

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. MSDN unfortunately doesn't explain it.

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. So best not to take any chances. Getting the current caret position is trivial using EM_GETSEL or EM_EXGETSEL .

Unlike the EM_LINEFROMCHAR documentation, which explicitly states that -1 is supported and what it represents.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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