Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hiding a row in CListCtrl

2 views
Skip to first unread message

jared...@hotmail.com

unread,
Feb 6, 2008, 11:18:26 AM2/6/08
to
This has been asked on a few different posts, but I hope I can add a
different spin to the question.

I need to hide a row in CListCtrl rather than delete/insert a row. I
realize hiding a row isn't supported, but has anybody successfully
simulated a hidden row, such as setting the height of a row to zero?

Thanks,
Jared

Igor Tandetnik

unread,
Feb 6, 2008, 11:36:56 AM2/6/08
to
jared...@hotmail.com wrote:
> I need to hide a row in CListCtrl rather than delete/insert a row. I
> realize hiding a row isn't supported, but has anybody successfully
> simulated a hidden row, such as setting the height of a row to zero?

Why not "simulate" a hidden row by deleting it?
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


David Ching

unread,
Feb 6, 2008, 11:44:37 AM2/6/08
to
<jared...@hotmail.com> wrote in message
news:0bbe5295-efca-41c8...@v67g2000hse.googlegroups.com...

Setting the height to 0 means each row has variable height, which means
owner draw, which means complex. Instead, why not just delete/re-insert the
row?

-- David


Christian ASTOR

unread,
Feb 6, 2008, 12:39:26 PM2/6/08
to
On 6 fév, 17:44, "David Ching" <d...@remove-this.dcsoft.com> wrote:

> > I need to hide a row in CListCtrl rather than delete/insert a row. I
> > realize hiding a row isn't supported, but has anybody successfully
> > simulated a hidden row, such as setting the height of a row to zero?
>
> Setting the height to 0 means each row has variable height, which means
> owner draw, which means complex.

An OD ListView has fixed row height.
The row height can be changed with a MSFlexGrid.

Tom Serface

unread,
Feb 6, 2008, 1:39:29 PM2/6/08
to
If you use a virtual list control you could flag hidden rows and just return
the "next ones" skipping hidden ones when requested. It would take a little
management code in the GetDispInfo() function and you'd have to be careful
not to delete the wrong rows and stuff like that...

Tom

<jared...@hotmail.com> wrote in message
news:0bbe5295-efca-41c8...@v67g2000hse.googlegroups.com...

jared...@hotmail.com

unread,
Feb 7, 2008, 6:25:13 PM2/7/08
to
On Feb 6, 11:39 am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> If you use a virtual list control you could flag hidden rows and just return
> the "next ones" skipping hidden ones when requested.  It would take a little
> management code in the GetDispInfo() function and you'd have to be careful
> not to delete the wrong rows and stuff like that...
>
> Tom
>
> <jared_ha...@hotmail.com> wrote in message

>
> news:0bbe5295-efca-41c8...@v67g2000hse.googlegroups.com...
>
>
>
> > This has been asked on a few different posts, but I hope I can add a
> > different spin to the question.
>
> > I need to hide a row in CListCtrl rather than delete/insert a row. I
> > realize hiding a row isn't supported, but has anybody successfully
> > simulated a hidden row, such as setting the height of a row to zero?
>
> > Thanks,
> >Jared- Hide quoted text -
>
> - Show quoted text -

Thanks for the quick responses. I'll go with inserting/deleting a row,
which seems to be the simplest option.

Thanks,
Jared

0 new messages