Solved

Header in ListView control

Posted on 1998-12-12
1
368 Views
Last Modified: 2013-12-03
How can I get the header control in ListView control?
We have a PropertySheet with 5 tabs. In one tab of this PropertySheet there is a dialog and a ListView control. The first time that we paint this dialog, the ListView control don't paint well. I posted a meesage to ListView for repaint and the rows are ok, but the header is ¿hide?.
If we go to another tab and return to the ListView, then it looks well.

If I get the handle of the header, I can force it to display, but I haven't this handle.

I'm programming in BC++ 5.0
Sorry, my english is very bad.
0
Comment
Question by:tui
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1417186
1. MFC version, pList is a pointer to a CListCtrl,
      CWnd * pChild = pList->GetWindow( GW_CHILD ) ;
      if ( pChild == NULL ) return ;
      ASSERT_VALID(pChild) ;
pWnd is a pointer to the CHeaderCtrl


2. API version

HWND hChild = GetWindow( hList, GW_CHILD ) ;

hList is HWND of the list control
hChild is HWND of the header



Remember in either case the return from GetWindow can be NULL if the header can't be found (it's not created yet, or you don't have on your list)

HWND hWndHeader =
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now