firefox
2010-06-13 08:46:13 UTC
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;
}
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;
}