Posted on 1998-03-11
I would like to use a header in my CScrollView. First, I derived a class from CHeaderCtrl, and
overrided the CHeaderCtrl::DrawItem. Then I in my view class, I declared an object of
that derived class called "header:" In my view's OnInitialUpdate, I make the following
int status = header.Create(HDS_HORZ | CCS_TOP | WS_VISIBLE, rect, CWnd::GetParent(), 1);
hd.pszText = "Item #";
hd.cchTextMax = 7;
hd.mask = HDI_TEXT;
HD_ITEM *hd_ptr = &hd;
ds.itemAction = ODA_DRAWENTIRE;
DRAWITEMSTRUCT *d_ptr = &ds;
Yet, all I get in the view is a grey rectangle. What do I need to put in my override of the
DrawItem function to make this work? If this is not the problem, then what is?
Thanks in Advance!!