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.
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
Forcecast
Hey, i have the same problem.
I tried to use ListView_SetItemPosition, but it's just no way working
If you have to deal with text-items it's no problem.. you can just set LCFMT_CENTER fpr the column.
AFAIK, the only way round this is to use an owner-drawn control.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.