why I am unable to insert text after insertion? RRS feed

  • Question

  • I want to insert some characters after insertion,but the text inserted is before insertion.

    the code segment :

    ......//ignore some codes and definitioans

      ITfContext *pContext=GetContext();//GetContext is custom-function.
      ITfRange* range(NULL);
      wchar_t *pTxBuf=m_ImeData->TxBuffer;

      if( SUCCEEDED(hr) )
       TF_SELECTION ts={0};
       ULONG nSels(0); 
       ULONG len=wcslen(pTxBuf);
       LONG n(0);

    Friday, September 7, 2012 9:03 AM


  • You are getting the beginning of the selection and then replacing that range. If you want to set the text at the end of the selection then collapse your range to the end of the selection.


    • Marked as answer by Min ZhuMember Tuesday, October 9, 2012 6:39 AM
    Tuesday, September 11, 2012 12:01 AM