Drawing the headers on a List Control
Jeff Wishnie -- jwishnie@swellsoft.com Friday, January 12, 1996 I'm using an MFC 4.0 CListCtrl in Report View to display several rows of multi-columned information. I use button headers to let the user select which column to sort by. I would like to place an icon in the header that is currently the sort key (like in Microsoft Exchanges InBox window). Is there an obvious way to do this? I've been messing with the owner-draw callbacks, but they only seem to let me draw items, not the headers themselves. Any help greatly appreciated. - Jeff jwishnie@swellsoft.com 415 437-0922 (w)
Mike Blaszczak -- mikeblas@msn.com Tuesday, January 16, 1996 You need to make the header control in the list view owner draw. The list control will reflect the ownerdraw messages up to you. .B ekiM ---------- From: owner-mfc-l@netcom.com on behalf of Jeff Wishnie Sent: Friday, January 12, 1996 19:47 To: mfc-l@netcom.com Subject: Drawing the headers on a List Control I'm using an MFC 4.0 CListCtrl in Report View to display several rows of multi-columned information. I use button headers to let the user select which column to sort by. I would like to place an icon in the header that is currently the sort key (like in Microsoft Exchanges InBox window). Is there an obvious way to do this? I've been messing with the owner-draw callbacks, but they only seem to let me draw items, not the headers themselves. Any help greatly appreciated. - Jeff jwishnie@swellsoft.com 415 437-0922 (w)
Raymond Fergerson -- rwf@CAMIS.Stanford.EDU Wednesday, January 17, 1996 How do you get a handle to the header control to set its style? I don't see any way to do this with CListCtrl. Ray Mike Blaszczak wrote: > > You need to make the header control in the list view owner draw. The list > control will reflect the ownerdraw messages up to you. > > .B ekiM > ---------- > From: owner-mfc-l@netcom.com on behalf of Jeff Wishnie > Sent: Friday, January 12, 1996 19:47 > To: mfc-l@netcom.com > Subject: Drawing the headers on a List Control > > I'm using an MFC 4.0 CListCtrl in Report View to display several rows of > multi-columned information. I use button headers to let the user select > which column to sort by. > > I would like to place an icon in the header that is currently the sort key > (like in Microsoft Exchanges InBox window). Is there an obvious way to do > this? I've been messing with the owner-draw callbacks, but they only seem to > let me draw items, not the headers themselves. > > Any help greatly appreciated. > > - Jeff > jwishnie@swellsoft.com > 415 437-0922 (w)
Jeff Wishnie -- jwishnie@swellsoft.com Sunday, January 28, 1996 At 12:32 PM 16-01-96 UT, you wrote: >You need to make the header control in the list view owner draw. The list >control will reflect the ownerdraw messages up to you. > Yes, but how do I get a pointer to the header control? I can't find access through the API. - Jeff >.B ekiM >---------- >From: owner-mfc-l@netcom.com on behalf of Jeff Wishnie >Sent: Friday, January 12, 1996 19:47 >To: mfc-l@netcom.com >Subject: Drawing the headers on a List Control > >I'm using an MFC 4.0 CListCtrl in Report View to display several rows of >multi-columned information. I use button headers to let the user select >which column to sort by. > >I would like to place an icon in the header that is currently the sort key >(like in Microsoft Exchanges InBox window). Is there an obvious way to do >this? I've been messing with the owner-draw callbacks, but they only seem to >let me draw items, not the headers themselves. > >Any help greatly appreciated. > >- Jeff >jwishnie@swellsoft.com >415 437-0922 (w) > > > jwishnie@swellsoft.com 415 552-3125(w)
Joseph Koral -- jkoral@ftp.com Tuesday, January 30, 1996 > You need to make the header control in the list view owner draw. > The list control will reflect the ownerdraw messages up to you. >>Yes, but how do I get a pointer to the header control? >> I can't find access through the API. Q: How can I get the HWND to the CHeaderCtrl that the CListCtrl is using? A: CListCtrl* pListCtrl = (CListCtrl *) GetDlgItem(IDC_YOURLISTVIEW); ASSERT(pListCtrl != NULL); CHeaderCtrl* pHeaderCtrl = (CHeaderCtrl *) pListCtrl->GetDlgItem(0); ASSERT(pHeaderCtrl != NULL);
| Вернуться в корень Архива |