1

Topic: How to change style CHeaderCtrl

It is necessary to take CHeaderCtrl from created ClistCtrl and to appropriate to it style HDS_NOSIZING that it was impossible to change the sizes of columns.


CHeaderCtrl *p_head = mListControll. GetHeaderCtrl ();

And that I do not know further

2

Re: How to change style CHeaderCtrl

.
wink
So is more correct, but  does not work.


LVCOLUMN lvc;

lvc.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;

lvc.pszText = _T ("TEXt");

lvc.fmt = LVCFMT_FIXED_WIDTH;

lvc.cx = 145;


mListController. InsertColumn (0, &lvc);


Still found a variant with interception HDN_BEGINTRACK, but there it is visible the cursor on boundary of columns.


Who knows as to block  the size of a column in CListCtrl, prompt .

3

Re: How to change style CHeaderCtrl

"kibadachi" <23298@users.rn> informed/informed in news the following:
...

> Sorri.
wink
> So is more correct, but  does not work.
>
> LVCOLUMN lvc;
> lvc.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
> lvc.pszText = _T ("TEXt");
> lvc.fmt = LVCFMT_FIXED_WIDTH;
> lvc.cx = 145;
>
> mListController. InsertColumn (0, &lvc);
>
> Still found a variant with interception HDN_BEGINTRACK, but there it is visible the cursor on boundary of columns.
>
> Who knows as to block  the size of a column in CListCtrl, prompt .

To intercept message HDM_HITTEST and in structure HDHITTESTINFO always to remove flag HHT_ONDIVOPEN