From: Pavel A. on

Wrong NG.
--pa

"firefox" <���@hotmail.com> wrote in message
news:OrnNc2bDLHA.4388(a)TK2MSFTNGP04.phx.gbl...
> I use richedit text service as the attached.
> Why when I call TxSendMessage, the return value is OLE_E_INVALIDRECT?
> Anyone can help me? Thanks a lot.
> The attached is the source code.
>
> int CRichDrawText::CharFromPos(POINT pt)
> {
> LRESULT lres;
>
> HRESULT hr;
> POINT ptTemp = { 0 };
>
> //LPARAM lParam = MAKELPARAM(pt.x, pt.y);
>
> LONG lPos;
> m_TextServ->OnTxUIActivate();
> m_TextServ->TxGetBaseLinePos(&lPos);
> hr = m_TextServ->TxSendMessage(EM_CHARFROMPOS, 0, (LPARAM)&pt/*or
> &ptTemp*/, &lres);
> return lres;
> }
>
>
>
>