CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: Listview, center align subitem image

Threaded View

  1. #1
    Join Date
    Mar 2011

    Listview, center align subitem image

    Hey all,

    I'm testing around with the listview control with WinAPI using C++ and the use of it is quite
    straightforward but there is one thing that I can't tackle up until now.

    As the title indicates, the listview contains multiple columns and rows. This means I got multiple
    subitems. I already gave the subitems an image in the form of an icon. The thing which is giving
    me a hard time is the alignment of these icons.

    By research I know that the first column is fixed to a left alignment and the rest is free to adapt.
    I used the keyword "LVCFMT_BITMAP_ON_RIGHT" when setting the format for each column and
    this only effects the icons in the column header but not the subitems of that column.

    So to put it simple, why does the header alignment only gets effected by this as you would expect that all of the content gets set to this property.

    Btw, I'm developing on a Windows XP atm using visual studio 2008.

    P.s.: I attached a sample project which I use for quick testing.

    Thanks in progress

    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)