Discussion:
Why return OLE_E_INVALIDRECT?
(too old to reply)
firefox
2010-06-13 08:46:13 UTC
Permalink
I use richedit text service as the attached.

Why wen I call TxSendMessage, the return value is OLE_E_INVALIDRECT?

Anyone can help me? Thanks a lot.

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, &lres);
return lres;
}
Leo Davidson
2010-06-13 14:47:26 UTC
Permalink
This post might be inappropriate. Click to display it.
firefox
2010-06-17 01:28:02 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...