Solved

Header in ListView control

Posted on 1998-12-12
1
369 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

23 Experts available now in Live!

Get 1:1 Help Now