Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Header in ListView control

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 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