Re: CHeaderCtrl question
From: Adrian ~ FoobarSoftware.com (AdrianFoobarSoftwarecom_at_discussions.microsoft.com)
Date: 08/17/04
- Next message: Janiv Ratson: "Re: CScrollView in mdi"
- Previous message: William DePalo [MVP VC++]: "Re: createDIBsection failed"
- In reply to: Jeff Partch [MVP]: "Re: CHeaderCtrl question"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 07:27:02 -0700
Use this:
cListCtrl.SetExtendedStyle( LVS_EX_HEADERDRAGDROP );
"Jeff Partch [MVP]" wrote:
> "Bill" <xg1@hotmail.com> wrote in message
> news:%239zfp0dgEHA.644@tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I try to add the HDS_DRAGDROP to the header control of a list control:
> >
> > void CTestView::OnInitialUpdate()
> > {
> > CView::OnInitialUpdate();
> >
> > // TODO: Add your specialized code here and/or call the base class
> > CHeaderCtrl *cHeaderCtrl;
> > BOOL b;
> >
> >
> cListCtrl.Create(LVS_REPORT|WS_VISIBLE|WS_CHILD|WS_BORDER,CRect(10,10,300,20
> > 0),this,1);
> > cListCtrl.InsertColumn(0,"Date",LVCFMT_LEFT,100);
> > cListCtrl.InsertColumn(1,"Name",LVCFMT_LEFT,200);
> > cHeaderCtrl=cListCtrl.GetHeaderCtrl();
> > b=cHeaderCtrl->ModifyStyleEx(0,HDS_DRAGDROP); // returns 1
> > }
> >
> > This doesn't work. Can anyone tell me why? Thanks in advance.
>
> At a guess, I'd say it's most likely because HDS_DRAGDROP is not an extended
> window style. You might look into using ModifyStyle, or see if there's any
> merit in the LVS_EX_HEADERDRAGDROP extended listview style you can set using
> CListCtrl::SetExtendedStyle.
> --
> Jeff Partch [VC++ MVP]
>
>
>
- Next message: Janiv Ratson: "Re: CScrollView in mdi"
- Previous message: William DePalo [MVP VC++]: "Re: createDIBsection failed"
- In reply to: Jeff Partch [MVP]: "Re: CHeaderCtrl question"
- Messages sorted by: [ date ] [ thread ]