Print Page | Close Window

BUG CXTPTreeBase::GetLastItem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=19120
Printed Date: 06 June 2024 at 9:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG CXTPTreeBase::GetLastItem
Posted By: MacW
Subject: BUG CXTPTreeBase::GetLastItem
Date Posted: 30 October 2011 at 1:20pm
In
HTREEITEM CXTPTreeBase::GetLastItem(HTREEITEM hItem) const

The following statement produces an infinite loop when hItem has no children:

    while (m_pTreeCtrl->ItemHasChildren(hItem) != NULL)
    {
        // Find the last child of hItem
        htiNext = m_pTreeCtrl->GetChildItem(hItem);
        while (htiNext != NULL)
        {
            hItem = htiNext;
            htiNext = m_pTreeCtrl->GetNextSiblingItem(htiNext);
        }
    }




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net