GetClientRect...was ist falsch?!
-
Hi
Ich hab nen Texteditor und will das ich den gesamten Text in CString speichern will. Das mach ich mit
void GetText(const CPoint &ptStart, const CPoint &ptEnd, CString &text);und so will ich ihn kriegen:
CPoint ptSelStart, ptSelEnd; CRect rect; GetClientRect(&rect); ptSelStart.x = rect.top; ptSelStart.y = rect.left; ptSelEnd.x = rect.right; ptSelEnd.y = rect.bottom; GetText(m_ptSavedSelStart,m_ptSavedSelEnd,strTemp);aber ich kriege immer einen Fehler der auf GetText zeigt...woran könnte das liegen. so funktionierts:
CPoint ptSelStart, ptSelEnd; GetSelection(ptSelStart, ptSelEnd); GetText(ptSelStart, ptSelEnd, strTemp);aber das müsste ich den ganzen Text immer markieren...und das will ich nicht.kan mir jmd helfen?!

PS: Benutze CrytalTextView von Codeproject.com