Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在多行编辑控件中获取当前行号?
从 文档 中EM_LINEFROMCHAR,如果您传递-1as wParam,您将获得包含插入符号的行的行号(如果有,则为选择的开始)。
EM_LINEFROMCHAR
-1
wParam
查看EM_LINEFROMCHAR窗口消息。
您是否尝试检查 MSDN 索引以查找以 EM_* 开头的任何内容。如果你这样做了,你会发现 EM_LINEFROMCHAR、EM_LINEINDEX、EM_LINELENGTH 等,这可能可以解决你的问题