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

  • The hunger for IIoT-enabled solutions is driving companies to seek out reliable, secure IIoT platforms that can handle industrial-grade IoT capabilities. What features and capabilities should companies expect in an IIoT platform? Until now, developing an IIoT solution has required the costly, time-intensive effort of platform building, as developers create technology stacks from scratch to handle the hardware, firmware, software, edge computing, analytics, business systems integration, and more. This …

  • IT is in a continual battle to simplify and "do more with the same, or less," but the continued growth of data has drastically increased the complexity and cost of deploying, managing, and processing data using traditional IT infrastructure components. One key component — enterprise storage and the underlying software that controls the storage — is fortunately evolving nearly as fast as the data is growing. This ESG Lab Review documents the results of hands-on testing of the WekaIO Matrix …

Most Popular Programming Stories

More for Developers

RSS Feeds

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