Using sub-stings in non report view

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

I wanted a CListCtrl in icon view mode only (no switch to other view modes), but tried to "store" additional string information in subitems.

So I've useed used ...

        SetItemText (nIndex, 1, strMoreInfo)
and according to the help it returned Nonzero for "successful". but then later on when I tried to use that string with
        GetItemText (iItem, 1);
it return sucessful with nothing. :( The string was gone.

To make a long story short, one can't store subitems without a header. So an easy solution is to define two "blind" headers like ...

        for(int iHeader=0; iHeader < 2; iHeader++)
        {
                InsertColumn (iHeader, "header", LVCFMT_LEFT, -1, iHeader);
        }
and you can store whatever string you want in subitem.



Comments

  • There are no comments yet. Be the first to comment!

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

Top White Papers and Webcasts

  • In this highly valued report, you'll learn the results of "The Forrester Wave™: Hybrid Integration For Enterprises, Q4 2016" extensive research of the top Hybrid Integration Solutions, including each product's overall ranking, specific capabilities and strengths and weaknesses.

  • Thanks to the pervasive use of virtualization, hybrid cloud, and software–defined architectures — enterprise IT infrastructures are impossibly complex. Performance monitoring solutions are critical for enabling IT teams to identify key bottlenecks and emergent issues, for understanding which workloads are more demanding in terms of resource contention, and for cost effective capacity and resource planning. Read this IDC Customer Spotlight for a glimpse into real–world implementations and use …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date