roger's picture

Windows ListView Control Returns -1 From LVM_INSERTITEM

I just spent the best part of a morning chasing this one down, so I thought I'd share it with you:

If you try calling CListCtrl::InsertItem (or LVM_INSERTITEM), using LPSTR_TEXTCALLBACK, you can't use either of the LVS_SORTASCENDING or LVS_SORTDESCENDING styles for the list view.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <br> <code> <dd> <dl> <dt> <hr> <h1> <h2> <h3> <i> <img> <li> <ol> <p> <pre> <table> <td> <th> <tr> <tt> <u> <ul>
  • Images can be added to this post.

More information about formatting options