开发者

MFC CTreeCtrl max visible item text length

I have an application that outputs large amounts of text data to an MFC tree control. When I call SetItemText() with a long string (larger then 1000+ char) only the first ~250 chars are displayed in the control. But when I call GetItemText() on the item the entire string is returned (1000+ chars)

My questions a开发者_如何学Cre;

  • Is there a MAX visible string length for a MFC tree control?
  • Is there any way to increase the visible limit?

I have included example text code below

// In header 
CTreeCtrl   m_Tree;

// In .cpp file
void CTestDlg::OnDiagnosticsDebug()
{
    CString csText;
    CString csItemText;
    csText.Format( _T("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789") );
    for( int i = 0 ; i < 10 ; i ++ ) {
        csItemText += csText ;
    }

    bool b = m_Tree.SetItemText( m_Tree.GetRootItem(), csItemText ); 
    return ; 
}


See description of TVMITEM ("pszText" member).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜