初学windows编程 在做notepad的查找功能, 我想实现 从当前游标位置向前或向后查找,但是怎么得到当前的游标位置呢?谢谢大家!!

解决方案 »

  1.   

    msdn里面没找到阿 给点提示阿 大爷
      

  2.   

    你是不是要得到插入符的位置:GetCaretPos(...)?
      

  3.   

    摘自MSDN:CEdit::GetSel 
    DWORD GetSel( ) const;void GetSel( int& nStartChar, int& nEndChar ) const;Return ValueThe version that returns a DWORD returns a value that contains the starting position in the low-order word and the position of the first nonselected character after the end of the selection in the high-order word.ParametersnStartCharReference to an integer that will receive the position of the first character in the current selection.nEndCharReference to an integer that will receive the position of the first nonselected character past the end of the current selection.ResCall this function to get the starting and ending character positions of the current selection (if any) in an edit control, using either the return value or the parameters.