How to insert a triangle (delta) in header of list contrl ?
-
I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.
-
I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.
pc_dev wrote:
in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header?
It's not built-in to the control but you can owner-draw the header and add one yourself. Mark
-
pc_dev wrote:
in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header?
It's not built-in to the control but you can owner-draw the header and add one yourself. Mark
-
Not sure but I did this in the past and maybe did it with an image rather than owner draw.
led mike
You can put images in column headers? I'm going to look into that. I need something similar :) Thanks man, Mark
-
I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.
-
pc_dev wrote:
in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header?
It's not built-in to the control but you can owner-draw the header and add one yourself. Mark
Yes found the old project. Used a ImageList and then:
HDITEM hItem;
ZeroMemory( &hItem, sizeof(hItem));
hItem.mask = HDI_IMAGE | HDI_FORMAT;
_pList->GetHeaderCtrl()->GetItem( nCol, &hItem);
hItem.iImage = nImg;
hItem.fmt = HDF_LEFT | HDF_IMAGE | HDF_STRING | HDF_BITMAP_ON_RIGHT;led mike
-
Yes found the old project. Used a ImageList and then:
HDITEM hItem;
ZeroMemory( &hItem, sizeof(hItem));
hItem.mask = HDI_IMAGE | HDI_FORMAT;
_pList->GetHeaderCtrl()->GetItem( nCol, &hItem);
hItem.iImage = nImg;
hItem.fmt = HDF_LEFT | HDF_IMAGE | HDF_STRING | HDF_BITMAP_ON_RIGHT;led mike
Cool! Thank you! It's as easy as tab controls :)
-
I am using list control (report view) in windows List control headers contain a triangle shape which moves its direction when we click on the respective header showing sort order how can this delta be inserted in header? An other query please Is it possible to have multiple lines in an item or subitem of list control? I would be extremly thankful for providing the solutions to above problems.
This feature is built-in to commctrl v6, see here for sample code: clickety[^]
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ");