True, I prefer to return what you set it to, so if you need to alter it, you can.
The code to actually calculate the "real" rectangle is here (in C++):
// returns the text rectangle, if any, noramlized
RECT CMUSHView::GetTextRectangle (const bool bIncludeBorder)
{
CMUSHclientDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CRect TextRectangle (pDoc->m_TextRectangle);
RECT r;
GetClientRect (&r);
if (pDoc->m_TextRectangle != CRect (0, 0, 0, 0))
{
// they can use -n on right/bottom to indicate offset from side
if (TextRectangle.right <= 0)
{
TextRectangle.right += r.right;
// ensure not negative
TextRectangle.right = max (TextRectangle.right, TextRectangle.left + 20);
}
if (TextRectangle.bottom <= 0)
{
TextRectangle.bottom += r.bottom;
// ensure not negative
TextRectangle.bottom = max (TextRectangle.bottom, TextRectangle.top + 20);
}
if (bIncludeBorder)
TextRectangle.InflateRect (pDoc->m_TextRectangleBorderOffset, pDoc->m_TextRectangleBorderOffset);
return TextRectangle;
}
return r;
} // end of CMUSHView::GetTextRectangle
Basically, pDoc->m_TextRectangle is what you supplied to the TextRectangle call.
The call to GetClientRect above returns the same as GetInfo 280 and 281, as Worstje said. So, armed with those pieces of information, you can calculate exactly what the program considers to the the rectangle at a given moment (bearing in mind it may change if you resize the window).