does it even compiles?
virtual int DrawText(
LPCTSTR lpszString,
int nCount,
LPRECT lpRect,
UINT nFormat
);
int DrawText(
const CString& str,
LPRECT lpRect,
UINT nFormat
);
drawtext needs a pointer to a RECT you need to use &rect in your code, but then you are using DT_CALCRECT which will return you the needed width and height of your rect, you can do a first call to DrawText to get the needed dimenions of the rect and then draw it something like:
CDC* pDC = GetDC();
CRect rect(0, 0, 0, 0);
CString sComment = "this is a comment bigggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg comment 2 2 2"
pDC->DrawText(sComment, &rect, DT_CALCRECT | DT_LEFT | DT_WORDBREAK | DT_NOPREFIX | DT_TOP);
pDC->DrawText(sComment, &rect, DT_LEFT | DT_WORDBREAK | DT_NOPREFIX | DT_TOP);
int iheight = rect.Height();
that should help