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

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Protecting business operations means shifting the priorities around availability from disaster recovery to business continuity. Enterprises are shifting their focus from recovery from a disaster to preventing the disaster in the first place. With this change in mindset, disaster recovery is no longer the first line of defense; the organizations with a smarter business continuity practice are less impacted when disasters strike. This SmartSelect will provide insight to help guide your enterprise toward better …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds