Get previous item in outline


In the previous section, we defined an overloaded version of GetNextItem() which returns the next item in the outline as if the outline were completely expanded. We now define its counterpart: GetPrevItem(). This function uses the GetLastItem() defined in an earlier section.
 
// GetNextItem  - Get previous item as if outline was completely expanded
// Returns              - The item immediately above the reference item
// hItem                - The reference item
HTREEITEM CTreeCtrlX::GetPrevItem( HTREEITEM hItem )
{
        HTREEITEM       hti;

        hti = GetPrevSiblingItem(hItem);
        if( hti == NULL )
                hti = GetParentItem(hItem);
        else
                hti = GetLastItem(hti);
        return hti;
}



Comments

  • GetLastItem() ???

    Posted by Legacy on 03/27/2000 12:00am

    Originally posted by: SARRAT

    Where can i found the code of the GetLastItem() function please ?

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • On-demand Event Event Date: March 27, 2014 Teams need to deliver quality software faster and need integrated agile planning, task tracking, source control, auto deploy with continuous builds and a configurable process to adapt to the way you work. Rational Team Concert and DevOps Services (JazzHub) have everything you need to build great software, integrated seamlessly together right out of the box or available immediately in the cloud. And with the Rational Team Concert Client, you can connect your …

  • Live Event Date: April 22, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Database professionals — whether developers or DBAs — can often save valuable time by learning to get the most from their new or existing productivity tools. Whether you're responsible for managing database projects, performing database health checks and reporting, analyzing code, or measuring software engineering metrics, it's likely you're not taking advantage of some of the lesser-known features of Toad from Dell. Attend this live …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds